mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2026-02-16 00:03:48 +00:00
13 lines
250 B
TypeScript
13 lines
250 B
TypeScript
import { Rule, RuleType } from "@midwayjs/decorator";
|
|
|
|
export class TestDTO {
|
|
|
|
@Rule(RuleType.string().required())
|
|
firstName: string;
|
|
|
|
@Rule(RuleType.string().max(10))
|
|
lastName: string;
|
|
|
|
@Rule(RuleType.number().max(60))
|
|
age: number;
|
|
} |