aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/account/account.ts')
-rw-r--r--server/models/account/account.ts13
1 files changed, 7 insertions, 6 deletions
diff --git a/server/models/account/account.ts b/server/models/account/account.ts
index d33353af7..665ecd595 100644
--- a/server/models/account/account.ts
+++ b/server/models/account/account.ts
@@ -17,10 +17,11 @@ import {
17 UpdatedAt 17 UpdatedAt
18} from 'sequelize-typescript' 18} from 'sequelize-typescript'
19import { ModelCache } from '@server/models/model-cache' 19import { ModelCache } from '@server/models/model-cache'
20import { AttributesOnly } from '@shared/core-utils'
20import { Account, AccountSummary } from '../../../shared/models/actors' 21import { Account, AccountSummary } from '../../../shared/models/actors'
21import { isAccountDescriptionValid } from '../../helpers/custom-validators/accounts' 22import { isAccountDescriptionValid } from '../../helpers/custom-validators/accounts'
22import { CONSTRAINTS_FIELDS, SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants' 23import { CONSTRAINTS_FIELDS, SERVER_ACTOR_NAME, WEBSERVER } from '../../initializers/constants'
23import { sendDeleteActor } from '../../lib/activitypub/send' 24import { sendDeleteActor } from '../../lib/activitypub/send/send-delete'
24import { 25import {
25 MAccount, 26 MAccount,
26 MAccountActor, 27 MAccountActor,
@@ -30,19 +31,19 @@ import {
30 MAccountSummaryFormattable, 31 MAccountSummaryFormattable,
31 MChannelActor 32 MChannelActor
32} from '../../types/models' 33} from '../../types/models'
33import { ActorModel } from '../activitypub/actor' 34import { ActorModel } from '../actor/actor'
34import { ActorFollowModel } from '../activitypub/actor-follow' 35import { ActorFollowModel } from '../actor/actor-follow'
36import { ActorImageModel } from '../actor/actor-image'
35import { ApplicationModel } from '../application/application' 37import { ApplicationModel } from '../application/application'
36import { ActorImageModel } from './actor-image'
37import { ServerModel } from '../server/server' 38import { ServerModel } from '../server/server'
38import { ServerBlocklistModel } from '../server/server-blocklist' 39import { ServerBlocklistModel } from '../server/server-blocklist'
40import { UserModel } from '../user/user'
39import { getSort, throwIfNotValid } from '../utils' 41import { getSort, throwIfNotValid } from '../utils'
40import { VideoModel } from '../video/video' 42import { VideoModel } from '../video/video'
41import { VideoChannelModel } from '../video/video-channel' 43import { VideoChannelModel } from '../video/video-channel'
42import { VideoCommentModel } from '../video/video-comment' 44import { VideoCommentModel } from '../video/video-comment'
43import { VideoPlaylistModel } from '../video/video-playlist' 45import { VideoPlaylistModel } from '../video/video-playlist'
44import { AccountBlocklistModel } from './account-blocklist' 46import { AccountBlocklistModel } from './account-blocklist'
45import { UserModel } from './user'
46 47
47export enum ScopeNames { 48export enum ScopeNames {
48 SUMMARY = 'SUMMARY' 49 SUMMARY = 'SUMMARY'
@@ -141,7 +142,7 @@ export type SummaryOptions = {
141 } 142 }
142 ] 143 ]
143}) 144})
144export class AccountModel extends Model { 145export class AccountModel extends Model<Partial<AttributesOnly<AccountModel>>> {
145 146
146 @AllowNull(false) 147 @AllowNull(false)
147 @Column 148 @Column