661e417619
- Move src/data/{api,dto,schemas} directories to src/data/services/*
- Update all relative imports across the codebase to reference new paths
- Use CSS color tokens for splash button gradient in splash-button.module.css
- Add responsive sizes attribute to splash background image
- Add JSDoc documentation to splash-background component referencing original Dart implementation
31 lines
731 B
TypeScript
31 lines
731 B
TypeScript
/**
|
|
* 发送验证码请求 DTO
|
|
*/
|
|
import {
|
|
SendCodeRequestSchema,
|
|
type SendCodeRequestInput,
|
|
type SendCodeRequestData,
|
|
} from "@/data/services/schemas/auth/send_code_request";
|
|
|
|
export class SendCodeRequest {
|
|
declare readonly email: string;
|
|
|
|
private constructor(input: SendCodeRequestInput) {
|
|
const data = SendCodeRequestSchema.parse(input);
|
|
Object.assign(this, data);
|
|
Object.freeze(this);
|
|
}
|
|
|
|
static from(input: SendCodeRequestInput): SendCodeRequest {
|
|
return new SendCodeRequest(input);
|
|
}
|
|
|
|
static fromJson(json: unknown): SendCodeRequest {
|
|
return SendCodeRequest.from(json as SendCodeRequestInput);
|
|
}
|
|
|
|
toJson(): SendCodeRequestData {
|
|
return SendCodeRequestSchema.parse(this);
|
|
}
|
|
}
|