2024-11-21 15:34:20 +00:00
|
|
|
import Model, { attr, hasMany, type AsyncHasMany } from '@ember-data/model';
|
|
|
|
import type AccountModel from './account';
|
|
|
|
import type MediaMetadataModel from './media-metadata';
|
|
|
|
import type OriginServer from './origin-server';
|
2024-11-20 14:39:24 +00:00
|
|
|
|
2024-11-20 15:11:11 +00:00
|
|
|
export default class Note extends Model {
|
2024-11-21 15:34:20 +00:00
|
|
|
@attr declare content: string;
|
|
|
|
@attr declare originServer: OriginServer;
|
|
|
|
@attr declare originServerId: number;
|
|
|
|
@attr declare reactionCount: number;
|
|
|
|
@attr declare createdAt: Date;
|
|
|
|
@attr declare updatedAt: Date;
|
|
|
|
@attr declare author: AccountModel;
|
|
|
|
@attr declare authorId: string;
|
|
|
|
@attr declare contentWarning?: string;
|
|
|
|
@attr declare inReplyToId?: string;
|
|
|
|
@attr declare quotesId?: string;
|
|
|
|
@attr declare emoteIds?: Array<string>;
|
2024-11-20 14:39:24 +00:00
|
|
|
@hasMany('media-metadata')
|
2024-11-21 15:34:20 +00:00
|
|
|
declare attachments: AsyncHasMany<MediaMetadataModel>;
|
|
|
|
@attr declare attachmentIds: Array<string>;
|
|
|
|
@attr declare accessLevel: number;
|
|
|
|
@hasMany('account') declare pings?: AsyncHasMany<AccountModel>;
|
|
|
|
@attr declare pingIds?: Array<string>;
|
|
|
|
@attr declare reactionIds: Array<number>;
|
2024-11-20 14:39:24 +00:00
|
|
|
}
|
2024-11-20 15:11:11 +00:00
|
|
|
|
|
|
|
declare module 'ember-data/types/registries/model' {
|
|
|
|
export default interface ModelRegistry {
|
2024-11-21 15:34:20 +00:00
|
|
|
note: Note;
|
2024-11-20 15:11:11 +00:00
|
|
|
}
|
|
|
|
}
|