Skip to content

Instantly share code, notes, and snippets.

@glommer
Created May 19, 2022 13:51
Show Gist options
  • Save glommer/8df31d1babe46978b4dbe2ffbb2f1b22 to your computer and use it in GitHub Desktop.
Save glommer/8df31d1babe46978b4dbe2ffbb2f1b22 to your computer and use it in GitHub Desktop.
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