diff --git a/server/domain/task/model/taskMethod.ts b/server/domain/task/model/taskMethod.ts index 5fcaa7b..32c6ec9 100644 --- a/server/domain/task/model/taskMethod.ts +++ b/server/domain/task/model/taskMethod.ts @@ -4,7 +4,7 @@ import type { UserDto } from 'common/types/user'; import { labelValidator } from 'common/validators/task'; import { brandedId } from 'service/brandedId'; import { ulid } from 'ulid'; -import type { TaskCreateServerVal, TaskDeleteVal, TaskEntity, TaskSaveVal } from './taskEntity'; +import type { TaskCreateServerVal, TaskDeleteVal, TaskEntity, TaskSaveVal } from './taskType'; export const taskMethod = { create: (user: UserDto, val: TaskCreateServerVal): TaskSaveVal => { diff --git a/server/domain/task/model/taskEntity.ts b/server/domain/task/model/taskType.ts similarity index 100% rename from server/domain/task/model/taskEntity.ts rename to server/domain/task/model/taskType.ts diff --git a/server/domain/task/repository/taskCommand.ts b/server/domain/task/repository/taskCommand.ts index 61af45a..9fd4bff 100644 --- a/server/domain/task/repository/taskCommand.ts +++ b/server/domain/task/repository/taskCommand.ts @@ -1,7 +1,7 @@ import type { Prisma } from '@prisma/client'; import assert from 'assert'; import { s3 } from 'service/s3Client'; -import type { TaskDeleteVal, TaskSaveVal } from '../model/taskEntity'; +import type { TaskDeleteVal, TaskSaveVal } from '../model/taskType'; export const taskCommand = { save: async (tx: Prisma.TransactionClient, val: TaskSaveVal): Promise => { diff --git a/server/domain/task/repository/taskQuery.ts b/server/domain/task/repository/taskQuery.ts index 5d24af4..4ee4610 100644 --- a/server/domain/task/repository/taskQuery.ts +++ b/server/domain/task/repository/taskQuery.ts @@ -2,7 +2,7 @@ import type { Prisma, Task, User } from '@prisma/client'; import type { DtoId, MaybeId } from 'common/types/brandedId'; import { brandedId } from 'service/brandedId'; import { depend } from 'velona'; -import type { TaskEntity } from '../model/taskEntity'; +import type { TaskEntity } from '../model/taskType'; const toEntity = (prismaTask: Task & { Author: User }): TaskEntity => ({ id: brandedId.task.entity.parse(prismaTask.id), diff --git a/server/domain/task/service/taskValidator.ts b/server/domain/task/service/taskValidator.ts index 3e06d43..b336fb6 100644 --- a/server/domain/task/service/taskValidator.ts +++ b/server/domain/task/service/taskValidator.ts @@ -2,7 +2,7 @@ import { multipartFileValidator } from 'api/$relay'; import type { TaskUpdateDoneDto } from 'common/types/task'; import { brandedId } from 'service/brandedId'; import { z } from 'zod'; -import type { TaskCreateServerVal } from '../model/taskEntity'; +import type { TaskCreateServerVal } from '../model/taskType'; export const taskValidator = { taskCreate: z.object({ diff --git a/server/domain/task/service/toTaskDto.ts b/server/domain/task/service/toTaskDto.ts index ddc502f..12f3059 100644 --- a/server/domain/task/service/toTaskDto.ts +++ b/server/domain/task/service/toTaskDto.ts @@ -1,7 +1,7 @@ import type { TaskDto } from 'common/types/task'; import { brandedId } from 'service/brandedId'; import { s3 } from 'service/s3Client'; -import type { TaskEntity } from '../model/taskEntity'; +import type { TaskEntity } from '../model/taskType'; export const toTaskDto = async (task: TaskEntity): Promise => ({ ...task, diff --git a/server/domain/task/useCase/taskUseCase.ts b/server/domain/task/useCase/taskUseCase.ts index ed4a747..e9ed211 100644 --- a/server/domain/task/useCase/taskUseCase.ts +++ b/server/domain/task/useCase/taskUseCase.ts @@ -3,8 +3,8 @@ import type { TaskDto, TaskUpdateDoneDto } from 'common/types/task'; import type { UserDto } from 'common/types/user'; import { transaction } from 'service/prismaClient'; import { taskEvent } from '../event/taskEvent'; -import type { TaskCreateServerVal } from '../model/taskEntity'; import { taskMethod } from '../model/taskMethod'; +import type { TaskCreateServerVal } from '../model/taskType'; import { taskCommand } from '../repository/taskCommand'; import { taskQuery } from '../repository/taskQuery'; import { toTaskDto } from '../service/toTaskDto'; diff --git a/server/domain/user/model/userMethod.ts b/server/domain/user/model/userMethod.ts index 48346b5..079b510 100644 --- a/server/domain/user/model/userMethod.ts +++ b/server/domain/user/model/userMethod.ts @@ -1,6 +1,6 @@ import { brandedId } from 'service/brandedId'; import type { JwtUser } from 'service/types'; -import type { UserEntity } from './userEntity'; +import type { UserEntity } from './userType'; export const userMethod = { create: (jwtUser: JwtUser): UserEntity => ({ diff --git a/server/domain/user/model/userEntity.ts b/server/domain/user/model/userType.ts similarity index 100% rename from server/domain/user/model/userEntity.ts rename to server/domain/user/model/userType.ts diff --git a/server/domain/user/repository/userCommand.ts b/server/domain/user/repository/userCommand.ts index feed1ff..5ea59cc 100644 --- a/server/domain/user/repository/userCommand.ts +++ b/server/domain/user/repository/userCommand.ts @@ -1,5 +1,5 @@ import type { Prisma } from '@prisma/client'; -import type { UserEntity } from '../model/userEntity'; +import type { UserEntity } from '../model/userType'; export const userCommand = { save: async (tx: Prisma.TransactionClient, user: UserEntity): Promise => { diff --git a/server/domain/user/repository/userQuery.ts b/server/domain/user/repository/userQuery.ts index bb89dee..dbced27 100644 --- a/server/domain/user/repository/userQuery.ts +++ b/server/domain/user/repository/userQuery.ts @@ -1,6 +1,6 @@ import type { Prisma, User } from '@prisma/client'; import { brandedId } from 'service/brandedId'; -import type { UserEntity } from '../model/userEntity'; +import type { UserEntity } from '../model/userType'; const toUserEntity = (prismaUser: User): UserEntity => ({ id: brandedId.user.entity.parse(prismaUser.id), diff --git a/server/domain/user/service/toUserDto.ts b/server/domain/user/service/toUserDto.ts index 46b42d0..923387d 100644 --- a/server/domain/user/service/toUserDto.ts +++ b/server/domain/user/service/toUserDto.ts @@ -1,6 +1,6 @@ import type { UserDto } from 'common/types/user'; import { brandedId } from 'service/brandedId'; -import type { UserEntity } from '../model/userEntity'; +import type { UserEntity } from '../model/userType'; export const toUserDto = (user: UserEntity): UserDto => ({ ...user, diff --git a/server/tests/api/private/di.test.ts b/server/tests/api/private/di.test.ts index f21d8a8..e9528a9 100644 --- a/server/tests/api/private/di.test.ts +++ b/server/tests/api/private/di.test.ts @@ -2,7 +2,7 @@ import type { Prisma } from '@prisma/client'; import controller from 'api/private/tasks/di/controller'; import type { DtoId } from 'common/types/brandedId'; import type { UserDto } from 'common/types/user'; -import type { TaskEntity } from 'domain/task/model/taskEntity'; +import type { TaskEntity } from 'domain/task/model/taskType'; import fastify from 'fastify'; import { brandedId } from 'service/brandedId'; import { ulid } from 'ulid';