summaryrefslogtreecommitdiff
path: root/packages/backend/src/models/schema/clip.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/models/schema/clip.ts')
-rw-r--r--packages/backend/src/models/schema/clip.ts38
1 files changed, 38 insertions, 0 deletions
diff --git a/packages/backend/src/models/schema/clip.ts b/packages/backend/src/models/schema/clip.ts
new file mode 100644
index 0000000000..f0ee2ce0c4
--- /dev/null
+++ b/packages/backend/src/models/schema/clip.ts
@@ -0,0 +1,38 @@
+export const packedClipSchema = {
+ type: 'object',
+ properties: {
+ id: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ example: 'xxxxxxxxxx',
+ },
+ createdAt: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'date-time',
+ },
+ userId: {
+ type: 'string',
+ optional: false, nullable: false,
+ format: 'id',
+ },
+ user: {
+ type: 'object',
+ ref: 'UserLite',
+ optional: false, nullable: false,
+ },
+ name: {
+ type: 'string',
+ optional: false, nullable: false,
+ },
+ description: {
+ type: 'string',
+ optional: false, nullable: true,
+ },
+ isPublic: {
+ type: 'boolean',
+ optional: false, nullable: false,
+ },
+ },
+} as const;