Last active
October 17, 2017 22:33
-
-
Save govorov/baba5b8581fda84d53d27991bdd67b74 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// | |
// entities/card.ts | |
// | |
import { | |
Entity, | |
PrimaryGeneratedColumn, | |
Column, | |
CreateDateColumn, | |
UpdateDateColumn, | |
} from 'typeorm'; | |
@Entity('cards') | |
export class Card { | |
@PrimaryGeneratedColumn('uuid') | |
id: string; | |
@CreateDateColumn() | |
created_at: Date; | |
@UpdateDateColumn() | |
updated_at: Date; | |
@Column('text') | |
title: string; | |
@Column('text', { | |
nullable: true, | |
}) | |
description: string; | |
@Column('boolean', { | |
default: "false", | |
}) | |
done: boolean; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment