diff options
Diffstat (limited to 'server/models/video/video-channel.ts')
-rw-r--r-- | server/models/video/video-channel.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index 4a50af265..8498143fe 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { | 1 | import { |
2 | AllowNull, BeforeDestroy, BelongsTo, Column, CreatedAt, DefaultScope, ForeignKey, HasMany, Is, Model, Scopes, Table, | 2 | AllowNull, BeforeDestroy, BelongsTo, Column, CreatedAt, DefaultScope, ForeignKey, HasMany, Is, Model, Scopes, Table, |
3 | UpdatedAt, Default | 3 | UpdatedAt, Default, DataType |
4 | } from 'sequelize-typescript' | 4 | } from 'sequelize-typescript' |
5 | import { ActivityPubActor } from '../../../shared/models/activitypub' | 5 | import { ActivityPubActor } from '../../../shared/models/activitypub' |
6 | import { VideoChannel } from '../../../shared/models/videos' | 6 | import { VideoChannel } from '../../../shared/models/videos' |
@@ -14,6 +14,7 @@ import { AccountModel } from '../account/account' | |||
14 | import { ActorModel } from '../activitypub/actor' | 14 | import { ActorModel } from '../activitypub/actor' |
15 | import { getSort, throwIfNotValid } from '../utils' | 15 | import { getSort, throwIfNotValid } from '../utils' |
16 | import { VideoModel } from './video' | 16 | import { VideoModel } from './video' |
17 | import { CONSTRAINTS_FIELDS } from '../../initializers' | ||
17 | 18 | ||
18 | enum ScopeNames { | 19 | enum ScopeNames { |
19 | WITH_ACCOUNT = 'WITH_ACCOUNT', | 20 | WITH_ACCOUNT = 'WITH_ACCOUNT', |
@@ -73,13 +74,13 @@ export class VideoChannelModel extends Model<VideoChannelModel> { | |||
73 | @AllowNull(true) | 74 | @AllowNull(true) |
74 | @Default(null) | 75 | @Default(null) |
75 | @Is('VideoChannelDescription', value => throwIfNotValid(value, isVideoChannelDescriptionValid, 'description')) | 76 | @Is('VideoChannelDescription', value => throwIfNotValid(value, isVideoChannelDescriptionValid, 'description')) |
76 | @Column | 77 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.VIDEO_CHANNELS.DESCRIPTION.max)) |
77 | description: string | 78 | description: string |
78 | 79 | ||
79 | @AllowNull(true) | 80 | @AllowNull(true) |
80 | @Default(null) | 81 | @Default(null) |
81 | @Is('VideoChannelSupport', value => throwIfNotValid(value, isVideoChannelSupportValid, 'support')) | 82 | @Is('VideoChannelSupport', value => throwIfNotValid(value, isVideoChannelSupportValid, 'support')) |
82 | @Column | 83 | @Column(DataType.STRING(CONSTRAINTS_FIELDS.VIDEO_CHANNELS.SUPPORT.max)) |
83 | support: string | 84 | support: string |
84 | 85 | ||
85 | @CreatedAt | 86 | @CreatedAt |