feat: 支持课后评价与成长档案
完成后即可评价并订阅提醒,馆主可记录体测、笔记与成长照片,首页展示匿名星级均分。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
21
packages/server/src/user/dto/member-progress.dto.ts
Normal file
21
packages/server/src/user/dto/member-progress.dto.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { IsBoolean, IsDateString, IsNumber, IsOptional, IsString, Max, MaxLength, Min, MinLength, Matches } from 'class-validator'
|
||||
export class BodyMetricDto {
|
||||
@IsDateString() @Matches(/^\d{4}-\d{2}-\d{2}$/) recordedAt!: string
|
||||
@IsOptional() @IsNumber() @Min(1) @Max(500) weight?: number
|
||||
@IsOptional() @IsNumber() @Min(1) @Max(75) bodyFat?: number
|
||||
@IsOptional() @IsNumber() @Min(10) @Max(300) waist?: number
|
||||
@IsOptional() @IsNumber() @Min(10) @Max(300) hip?: number
|
||||
@IsOptional() @IsNumber() @Min(-50) @Max(100) flexibility?: number
|
||||
@IsOptional() @IsString() @MaxLength(200) remark?: string
|
||||
}
|
||||
export class MemberNoteDto {
|
||||
@IsString() @MinLength(1) @MaxLength(1000) content!: string
|
||||
@IsBoolean() shared!: boolean
|
||||
@IsOptional() @IsString() bookingId?: string
|
||||
}
|
||||
export class ProgressPhotoDto {
|
||||
@IsDateString() @Matches(/^\d{4}-\d{2}-\d{2}$/) recordedAt!: string
|
||||
@IsString() @MaxLength(200) caption!: string
|
||||
@IsString() @MaxLength(100) fileName!: string
|
||||
}
|
||||
export class PhotoConsentDto { @IsBoolean() consent!: boolean }
|
||||
Reference in New Issue
Block a user