create token decorator and consumer module

This commit is contained in:
2026-03-16 17:56:51 +03:30
parent 0ad6a3200e
commit 69e9a0d082
38 changed files with 1027 additions and 66 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
}