diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-03-10 14:22:37 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-03-10 14:22:37 +0900 |
| commit | 5de8930058c28be983ea38b04acec528e7c79577 (patch) | |
| tree | 741487a20234ba1c5200d9a2a442e4503a38483e /packages/backend/src/models/json-schema/flash.ts | |
| parent | :art: (diff) | |
| download | misskey-5de8930058c28be983ea38b04acec528e7c79577.tar.gz misskey-5de8930058c28be983ea38b04acec528e7c79577.tar.bz2 misskey-5de8930058c28be983ea38b04acec528e7c79577.zip | |
refactor: rename schema to json-schema
Diffstat (limited to 'packages/backend/src/models/json-schema/flash.ts')
| -rw-r--r-- | packages/backend/src/models/json-schema/flash.ts | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/packages/backend/src/models/json-schema/flash.ts b/packages/backend/src/models/json-schema/flash.ts new file mode 100644 index 0000000000..8471a138ec --- /dev/null +++ b/packages/backend/src/models/json-schema/flash.ts @@ -0,0 +1,51 @@ +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', + }, + title: { + type: 'string', + optional: false, nullable: false, + }, + summary: { + type: 'string', + optional: false, nullable: false, + }, + script: { + type: 'string', + optional: false, nullable: false, + }, + userId: { + type: 'string', + optional: false, nullable: false, + format: 'id', + }, + user: { + type: 'object', + ref: 'UserLite', + optional: false, nullable: false, + }, + likedCount: { + type: 'number', + optional: false, nullable: true, + }, + isLiked: { + type: 'boolean', + optional: true, nullable: false, + }, + }, +} as const; |