aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-rw-r--r--server/models/video/video-channel.ts7
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 @@
1import { 1import {
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'
5import { ActivityPubActor } from '../../../shared/models/activitypub' 5import { ActivityPubActor } from '../../../shared/models/activitypub'
6import { VideoChannel } from '../../../shared/models/videos' 6import { VideoChannel } from '../../../shared/models/videos'
@@ -14,6 +14,7 @@ import { AccountModel } from '../account/account'
14import { ActorModel } from '../activitypub/actor' 14import { ActorModel } from '../activitypub/actor'
15import { getSort, throwIfNotValid } from '../utils' 15import { getSort, throwIfNotValid } from '../utils'
16import { VideoModel } from './video' 16import { VideoModel } from './video'
17import { CONSTRAINTS_FIELDS } from '../../initializers'
17 18
18enum ScopeNames { 19enum 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