shopping list

This commit is contained in:
cupcakearmy
2019-05-23 16:55:02 +02:00
parent 63d4b4a0fe
commit c50a37b08a
10 changed files with 207 additions and 4 deletions

24
api/src/entities/item.ts Normal file
View File

@@ -0,0 +1,24 @@
import { BaseEntity, Column, Entity, PrimaryColumn } from 'typeorm'
import UUID from 'uuid/v4'
@Entity()
export default class Item extends BaseEntity {
@PrimaryColumn()
id!: string
@Column()
text: string
@Column()
done: boolean
constructor(text: string, done: boolean = false) {
super()
this.id = UUID()
this.text = text
this.done = done
}
}