重构 API 为 8 领域 + 应用层架构

将后端模块拆分为 domains、applications、shared 三层,结算计算器移入 domain 纯函数目录,API 路径与测试保持不变。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-02 14:48:41 +08:00
parent 14e49374ac
commit 4c92157299
47 changed files with 169 additions and 138 deletions

View File

@@ -0,0 +1,24 @@
import { IsString, MinLength } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class LoginDto {
@ApiProperty()
@IsString()
username!: string;
@ApiProperty()
@IsString()
@MinLength(1)
password!: string;
}
export class ChangePasswordDto {
@ApiProperty()
@IsString()
oldPassword!: string;
@ApiProperty()
@IsString()
@MinLength(8)
newPassword!: string;
}