refactor user accounts structure

This commit is contained in:
2026-03-16 00:33:40 +03:30
parent d2215b9f04
commit 0ad6a3200e
118 changed files with 18774 additions and 8764 deletions
@@ -0,0 +1,24 @@
import { ApiProperty, PartialType } from '@nestjs/swagger'
import { IsEnum, IsOptional, IsString } from 'class-validator'
import { AccountStatus, AccountType } from 'generated/prisma/enums'
export class CreateAccountDto {
@IsString()
@ApiProperty()
username: string
@IsString()
@ApiProperty()
password: string
@IsEnum(AccountType)
@ApiProperty({ enum: AccountType })
type: AccountType
}
export class UpdateAccountDto extends PartialType(CreateAccountDto) {
@IsOptional()
@IsEnum(AccountStatus)
@ApiProperty({ enum: AccountStatus })
status?: AccountStatus
}