misskey/packages/backend/src/models/json-schema/flash.ts

57 lines
1 KiB
TypeScript
Raw Normal View History

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
2023-02-17 07:06:52 +01:00
export const packedFlashSchema = {
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',
},
userId: {
2023-02-17 07:06:52 +01:00
type: 'string',
optional: false, nullable: false,
format: 'id',
2023-02-17 07:06:52 +01:00
},
user: {
type: 'object',
ref: 'UserLite',
2023-02-17 07:06:52 +01:00
optional: false, nullable: false,
},
title: {
2023-02-17 07:06:52 +01:00
type: 'string',
optional: false, nullable: false,
},
summary: {
2023-02-17 07:06:52 +01:00
type: 'string',
optional: false, nullable: false,
},
script: {
type: 'string',
2023-02-17 07:06:52 +01:00
optional: false, nullable: false,
},
likedCount: {
type: 'number',
optional: false, nullable: true,
},
isLiked: {
type: 'boolean',
optional: true, nullable: false,
},
},
} as const;