Notification.ts 521 B

123456789101112131415161718192021222324
  1. import {Attr, Str, Model, HasOne, Uid} from '@vuex-orm/core'
  2. import {NotificationMessage} from "~/models/Core/NotificationMessage";
  3. export class Notification extends Model {
  4. static entity = 'notifications'
  5. @Uid()
  6. id!: number | string | null
  7. @Str('')
  8. name!: string
  9. @HasOne(() => NotificationMessage, 'id')
  10. message!: NotificationMessage | null
  11. @Str(null, { nullable: true })
  12. type!: string|null
  13. @Str(null, { nullable: true })
  14. link!: string|null
  15. @Attr({})
  16. notificationUsers!: Array<string>
  17. }