diff options
author | 2024-02-10 18:37:40 -0700 | |
---|---|---|
committer | 2024-02-13 06:59:44 +0530 | |
commit | e1c47572a6235fd8fd20af888ac3a11c7ae1369d (patch) | |
tree | 2dccff36a441916d7014037cef3f7ce84a790cad /app/Models/Workspace.ts | |
parent | refactor: project maintenance (diff) | |
download | ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.gz ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.tar.zst ferdium-server-e1c47572a6235fd8fd20af888ac3a11c7ae1369d.zip |
updates
Diffstat (limited to 'app/Models/Workspace.ts')
-rw-r--r-- | app/Models/Workspace.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/app/Models/Workspace.ts b/app/Models/Workspace.ts index c960ae4..6c48c12 100644 --- a/app/Models/Workspace.ts +++ b/app/Models/Workspace.ts | |||
@@ -1,42 +1,42 @@ | |||
1 | import { DateTime } from 'luxon' | 1 | import { DateTime } from 'luxon'; |
2 | import { BaseModel, column, hasOne } from '@adonisjs/lucid/orm' | 2 | import { BaseModel, column, hasOne } from '@adonisjs/lucid/orm'; |
3 | import User from './User.js' | 3 | import User from './User.js'; |
4 | import { HasOne } from '@adonisjs/lucid/types/relations' | 4 | import { HasOne } from '@adonisjs/lucid/types/relations'; |
5 | 5 | ||
6 | export default class Workspace extends BaseModel { | 6 | export default class Workspace extends BaseModel { |
7 | @column({ isPrimary: true }) | 7 | @column({ isPrimary: true }) |
8 | public id: number | 8 | public id: number; |
9 | 9 | ||
10 | @column({ | 10 | @column({ |
11 | columnName: 'workspaceId', | 11 | columnName: 'workspaceId', |
12 | }) | 12 | }) |
13 | public workspaceId: string | 13 | public workspaceId: string; |
14 | 14 | ||
15 | @hasOne(() => User, { | 15 | @hasOne(() => User, { |
16 | foreignKey: 'userId', | 16 | foreignKey: 'userId', |
17 | }) | 17 | }) |
18 | public user: HasOne<typeof User> | 18 | public user: HasOne<typeof User>; |
19 | 19 | ||
20 | @column({ | 20 | @column({ |
21 | columnName: 'userId', | 21 | columnName: 'userId', |
22 | }) | 22 | }) |
23 | public userId: number | 23 | public userId: number; |
24 | 24 | ||
25 | @column() | 25 | @column() |
26 | public name: string | 26 | public name: string; |
27 | 27 | ||
28 | @column() | 28 | @column() |
29 | public order: number | 29 | public order: number; |
30 | 30 | ||
31 | @column() | 31 | @column() |
32 | public services: string | 32 | public services: string; |
33 | 33 | ||
34 | @column() | 34 | @column() |
35 | public data: string | 35 | public data: string; |
36 | 36 | ||
37 | @column.dateTime({ autoCreate: true }) | 37 | @column.dateTime({ autoCreate: true }) |
38 | public createdAt: DateTime | 38 | public createdAt: DateTime; |
39 | 39 | ||
40 | @column.dateTime({ autoCreate: true, autoUpdate: true }) | 40 | @column.dateTime({ autoCreate: true, autoUpdate: true }) |
41 | public updatedAt: DateTime | 41 | public updatedAt: DateTime; |
42 | } | 42 | } |