wip: clip

This commit is contained in:
syuilo
2020-11-15 12:04:54 +09:00
parent ea33d61a90
commit d53c55ecb5
15 changed files with 699 additions and 11 deletions

View File

@ -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;
}

View File

@ -16,6 +16,7 @@ export class ClipRepository extends Repository<Clip> {
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.'
},
},
};