diff --git a/app/models/document.ts b/app/models/document.ts deleted file mode 100644 index ac0be0f..0000000 --- a/app/models/document.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Model, { attr, belongsTo } from '@ember-data/model'; - -import type UserModel from './user'; -import { ResourceType } from '@warp-drive/core-types/symbols'; - -export default class DocumentModel extends Model { - @attr() declare filename: string; - @attr() declare originalName: string; - @attr() declare path: string; - @attr() declare mimetype: string; - @attr() declare size: number; - @attr('date') declare updatedAt: Date; - @attr('date') declare createdAt: Date; - - @belongsTo('user', { - async: false, - inverse: 'documents', - }) declare user: UserModel; - - [ResourceType] = 'document' as const; -} diff --git a/app/models/user.ts b/app/models/user.ts index 931941a..779759a 100644 --- a/app/models/user.ts +++ b/app/models/user.ts @@ -1,5 +1,4 @@ -import Model, { attr, hasMany } from '@ember-data/model'; -import type DocumentModel from './document'; +import Model, { attr } from '@ember-data/model'; import { ResourceType } from '@warp-drive/core-types/symbols'; export default class UserModel extends Model { @@ -9,10 +8,6 @@ export default class UserModel extends Model { @attr('string') declare phone: string; @attr('string') declare role: string; @attr('string') declare password: string; - @hasMany('document', { - async: false, - inverse: 'user', - }) declare documents: DocumentModel[]; [ResourceType] = 'user' as const; }