diff --git a/dictation_server/src/api/odms/openapi.json b/dictation_server/src/api/odms/openapi.json index aedfdbe..3d38853 100644 --- a/dictation_server/src/api/odms/openapi.json +++ b/dictation_server/src/api/odms/openapi.json @@ -2358,7 +2358,7 @@ }, "duration": { "type": "string", - "description": "音声ファイルの録音時間(yyyy-mm-ddThh:mm:ss.sss)" + "description": "音声ファイルの録音時間(ミリ秒の整数値)" }, "createdDate": { "type": "string", @@ -2510,7 +2510,7 @@ }, "audioDuration": { "type": "string", - "description": "音声ファイルの録音時間(yyyy-mm-ddThh:mm:ss.sss)" + "description": "音声ファイルの録音時間(ミリ秒の整数値)" }, "audioCreatedDate": { "type": "string", diff --git a/dictation_server/src/features/files/files.service.ts b/dictation_server/src/features/files/files.service.ts index f18c6fd..7cc1de7 100644 --- a/dictation_server/src/features/files/files.service.ts +++ b/dictation_server/src/features/files/files.service.ts @@ -22,7 +22,7 @@ export class FilesService { * @param url アップロード先Blob Storage(ファイル名含む) * @param authorId 自分自身(ログイン認証)したAuthorID * @param fileName 音声ファイル名 - * @param duration 音声ファイルの録音時間(yyyy-mm-ddThh:mm:ss.sss) + * @param duration 音声ファイルの録音時間(ミリ秒の整数値) * @param createdDate 音声ファイルの録音作成日時(開始日時)(yyyy-mm-ddThh:mm:ss.sss)' * @param finishedDate 音声ファイルの録音作成終了日時(yyyy-mm-ddThh:mm:ss.sss) * @param uploadedDate 音声ファイルのアップロード日時(yyyy-mm-ddThh:mm:ss.sss) diff --git a/dictation_server/src/features/files/types/types.ts b/dictation_server/src/features/files/types/types.ts index 5136d3b..92c1144 100644 --- a/dictation_server/src/features/files/types/types.ts +++ b/dictation_server/src/features/files/types/types.ts @@ -46,7 +46,7 @@ export class AudioUploadFinishedRequest { @ApiProperty({ description: '音声ファイル名' }) fileName: string; @ApiProperty({ - description: '音声ファイルの録音時間(yyyy-mm-ddThh:mm:ss.sss)', + description: '音声ファイルの録音時間(ミリ秒の整数値)', }) duration: string; @ApiProperty({ diff --git a/dictation_server/src/features/tasks/tasks.service.spec.ts b/dictation_server/src/features/tasks/tasks.service.spec.ts index 45fa463..07d44c1 100644 --- a/dictation_server/src/features/tasks/tasks.service.spec.ts +++ b/dictation_server/src/features/tasks/tasks.service.spec.ts @@ -2,7 +2,7 @@ import { makeDefaultTasksRepositoryMockValue, makeDefaultUsersRepositoryMockValue, makeTasksServiceMock, -} from '../tasks/test/tasks.service.mock'; +} from './test/tasks.service.mock'; import { HttpException, HttpStatus } from '@nestjs/common'; import { makeErrorResponse } from '../../common/error/makeErrorResponse'; @@ -60,8 +60,8 @@ describe('TasksService', () => { ], priority: '00', status: 'Uploaded', - transcriptionFinishedDate: '', - transcriptionStartedDate: '', + transcriptionFinishedDate: undefined, + transcriptionStartedDate: undefined, typist: undefined, url: 'test/test.zip', workType: 'WorkType', @@ -258,8 +258,8 @@ describe('TasksService', () => { ], priority: '00', status: 'Uploaded', - transcriptionFinishedDate: '', - transcriptionStartedDate: '', + transcriptionFinishedDate: undefined, + transcriptionStartedDate: undefined, typist: undefined, url: 'test/test.zip', workType: 'WorkType', diff --git a/dictation_server/src/features/tasks/types/convert.ts b/dictation_server/src/features/tasks/types/convert.ts index 12a6351..fcd164e 100644 --- a/dictation_server/src/features/tasks/types/convert.ts +++ b/dictation_server/src/features/tasks/types/convert.ts @@ -49,8 +49,8 @@ const createTask = ( priority: task.priority, status: task.status, jobNumber: task.job_number, - transcriptionFinishedDate: task.finished_at?.toISOString() ?? '', // XXX Responseの型がnullableでないとおかしいのでdevelopマージ前に修正を行う[2023/06/07 17:43] - transcriptionStartedDate: task.started_at?.toISOString() ?? '', // XXX Responseの型がnullableでないとおかしいのでdevelopマージ前に修正を行う[2023/06/07 17:43] + transcriptionFinishedDate: task.finished_at?.toISOString(), + transcriptionStartedDate: task.started_at?.toISOString(), authorId: file.author_id, workType: file.work_type_id, audioCreatedDate: file.started_at.toISOString(), diff --git a/dictation_server/src/features/tasks/types/types.ts b/dictation_server/src/features/tasks/types/types.ts index a738634..381f73b 100644 --- a/dictation_server/src/features/tasks/types/types.ts +++ b/dictation_server/src/features/tasks/types/types.ts @@ -97,7 +97,7 @@ export class Task { @ApiProperty({ description: '音声ファイル名' }) fileName: string; @ApiProperty({ - description: '音声ファイルの録音時間(yyyy-mm-ddThh:mm:ss.sss)', + description: '音声ファイルの録音時間(ミリ秒の整数値)', }) audioDuration: string; @ApiProperty({ @@ -140,10 +140,16 @@ export class Task { '音声ファイルのファイルステータス Uploaded / Pending / InProgress / Finished / Backup', }) status: string; - @ApiProperty({ description: '文字起こし開始日時(yyyy-mm-ddThh:mm:ss.sss)' }) - transcriptionStartedDate: string; - @ApiProperty({ description: '文字起こし終了日時(yyyy-mm-ddThh:mm:ss.sss)' }) - transcriptionFinishedDate: string; + @ApiProperty({ + required: false, + description: '文字起こし開始日時(yyyy-mm-ddThh:mm:ss.sss)', + }) + transcriptionStartedDate?: string | undefined; + @ApiProperty({ + required: false, + description: '文字起こし終了日時(yyyy-mm-ddThh:mm:ss.sss)', + }) + transcriptionFinishedDate?: string | undefined; } export class TasksResponse {