From 8c86a7916a9eba374fc0638dc80f6fd6aabdd504 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 13 Mar 2021 22:15:20 +0900 Subject: [PATCH] Fix Schema (#7347) --- src/models/entities/drive-file.ts | 2 +- src/models/repositories/antenna.ts | 18 +++++++++++++----- src/models/repositories/drive-file.ts | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/models/entities/drive-file.ts b/src/models/entities/drive-file.ts index 680a40bc0..698dfac22 100644 --- a/src/models/entities/drive-file.ts +++ b/src/models/entities/drive-file.ts @@ -77,7 +77,7 @@ export class DriveFile { default: {}, comment: 'The any properties of the DriveFile. For example, it includes image width/height.' }) - public properties: Record; + public properties: { width?: number; height?: number; avgColor?: string }; @Index() @Column('boolean') diff --git a/src/models/repositories/antenna.ts b/src/models/repositories/antenna.ts index 0f0a5c017..84e082bd2 100644 --- a/src/models/repositories/antenna.ts +++ b/src/models/repositories/antenna.ts @@ -56,16 +56,24 @@ export const packedAntennaSchema = { type: 'array' as const, optional: false as const, nullable: false as const, items: { - type: 'string' as const, - optional: false as const, nullable: false as const + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'string' as const, + optional: false as const, nullable: false as const + } } }, - execludeKeywords: { + excludeKeywords: { type: 'array' as const, optional: false as const, nullable: false as const, items: { - type: 'string' as const, - optional: false as const, nullable: false as const + type: 'array' as const, + optional: false as const, nullable: false as const, + items: { + type: 'string' as const, + optional: false as const, nullable: false as const + } } }, src: { diff --git a/src/models/repositories/drive-file.ts b/src/models/repositories/drive-file.ts index 5085c76e9..bc1e37489 100644 --- a/src/models/repositories/drive-file.ts +++ b/src/models/repositories/drive-file.ts @@ -197,12 +197,12 @@ export const packedDriveFileSchema = { properties: { width: { type: 'number' as const, - optional: false as const, nullable: false as const, + optional: true as const, nullable: false as const, example: 1280 }, height: { type: 'number' as const, - optional: false as const, nullable: false as const, + optional: true as const, nullable: false as const, example: 720 }, avgColor: {