Created
May 19, 2022 13:51
-
-
Save glommer/8df31d1babe46978b4dbe2ffbb2f1b22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" | |
@Entity() | |
export class Photo { | |
@PrimaryGeneratedColumn() | |
id: number | |
@Column({ | |
length: 100, | |
}) | |
name: string | |
@Column("text") | |
description: string | |
@Column() | |
filename: string | |
@Column("double") | |
views: number | |
@Column() | |
isPublished: boolean | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment