aboutsummaryrefslogtreecommitdiffstats
path: root/app/Models/Recipe.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/Recipe.ts')
-rw-r--r--app/Models/Recipe.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/app/Models/Recipe.ts b/app/Models/Recipe.ts
new file mode 100644
index 0000000..fce5f3d
--- /dev/null
+++ b/app/Models/Recipe.ts
@@ -0,0 +1,23 @@
1import { DateTime } from 'luxon';
2import { BaseModel, column } from '@ioc:Adonis/Lucid/Orm';
3
4export default class Recipe extends BaseModel {
5 @column({ isPrimary: true })
6 public id: number;
7
8 @column()
9 public name: string;
10
11 @column()
12 public recipeId: string;
13
14 // TODO: Type the data object.
15 @column()
16 public data: object;
17
18 @column.dateTime({ autoCreate: true })
19 public createdAt: DateTime;
20
21 @column.dateTime({ autoCreate: true, autoUpdate: true })
22 public updatedAt: DateTime;
23}