iceshrimp-legacy/packages/backend/src/models/schema/gallery-post.ts
ThatOneCalculator 6b00abf05c
refactor: 🎨 rome
2023-01-12 20:40:33 -08:00

84 lines
1.3 KiB
TypeScript

export const packedGalleryPostSchema = {
type: "object",
properties: {
id: {
type: "string",
optional: false,
nullable: false,
format: "id",
example: "xxxxxxxxxx",
},
createdAt: {
type: "string",
optional: false,
nullable: false,
format: "date-time",
},
updatedAt: {
type: "string",
optional: false,
nullable: false,
format: "date-time",
},
title: {
type: "string",
optional: false,
nullable: false,
},
description: {
type: "string",
optional: false,
nullable: true,
},
userId: {
type: "string",
optional: false,
nullable: false,
format: "id",
},
user: {
type: "object",
ref: "UserLite",
optional: false,
nullable: false,
},
fileIds: {
type: "array",
optional: true,
nullable: false,
items: {
type: "string",
optional: false,
nullable: false,
format: "id",
},
},
files: {
type: "array",
optional: true,
nullable: false,
items: {
type: "object",
optional: false,
nullable: false,
ref: "DriveFile",
},
},
tags: {
type: "array",
optional: true,
nullable: false,
items: {
type: "string",
optional: false,
nullable: false,
},
},
isSensitive: {
type: "boolean",
optional: false,
nullable: false,
},
},
} as const;