Skip to content

Instantly share code, notes, and snippets.

@govorov
Last active October 17, 2017 22:33
Show Gist options
  • Save govorov/baba5b8581fda84d53d27991bdd67b74 to your computer and use it in GitHub Desktop.
Save govorov/baba5b8581fda84d53d27991bdd67b74 to your computer and use it in GitHub Desktop.
//
// 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