* refactor: v2 api remove defaultScheduleId from create user input * refactor: ensure user from test is deleted * fix: oauth-client-users test and allow deleting oauth users
27 lines
574 B
TypeScript
27 lines
574 B
TypeScript
import { IsTimeFormat } from "@/modules/users/inputs/validators/is-time-format";
|
|
import { IsWeekStart } from "@/modules/users/inputs/validators/is-week-start";
|
|
import { IsNumber, IsOptional, IsTimeZone, IsString, Validate } from "class-validator";
|
|
|
|
export class CreateUserInput {
|
|
@IsString()
|
|
email!: string;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
name?: string;
|
|
|
|
@IsNumber()
|
|
@IsOptional()
|
|
@Validate(IsTimeFormat)
|
|
timeFormat?: number;
|
|
|
|
@IsString()
|
|
@IsOptional()
|
|
@Validate(IsWeekStart)
|
|
weekStart?: string;
|
|
|
|
@IsTimeZone()
|
|
@IsOptional()
|
|
timeZone?: string;
|
|
}
|