From d53c55ecb512be114b394955da22e2450d01e379 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Nov 2020 12:04:54 +0900 Subject: wip: clip --- src/models/entities/clip.ts | 6 ++++++ src/models/repositories/clip.ts | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'src/models') diff --git a/src/models/entities/clip.ts b/src/models/entities/clip.ts index 37d21f73b1..66b5b8847e 100644 --- a/src/models/entities/clip.ts +++ b/src/models/entities/clip.ts @@ -35,4 +35,10 @@ export class Clip { default: false }) public isPublic: boolean; + + @Column('varchar', { + length: 2048, nullable: true, default: null, + comment: 'The description of the Clip.' + }) + public description: string | null; } diff --git a/src/models/repositories/clip.ts b/src/models/repositories/clip.ts index 9644ceec7e..7cc3fb7110 100644 --- a/src/models/repositories/clip.ts +++ b/src/models/repositories/clip.ts @@ -16,6 +16,7 @@ export class ClipRepository extends Repository { id: clip.id, createdAt: clip.createdAt.toISOString(), name: clip.name, + description: clip.description, }; } } @@ -42,5 +43,10 @@ export const packedClipSchema = { optional: false as const, nullable: false as const, description: 'The name of the Clip.' }, + description: { + type: 'string' as const, + optional: false as const, nullable: true as const, + description: 'The description of the Clip.' + }, }, }; -- cgit v1.2.3-freya