mirror of
https://github.com/cupcakearmy/obolus.git
synced 2025-09-06 08:10:39 +00:00
shopping list
This commit is contained in:
24
api/src/entities/item.ts
Normal file
24
api/src/entities/item.ts
Normal 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
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user