140 lines
3.4 KiB
TypeScript
140 lines
3.4 KiB
TypeScript
|
|
import { ApiProperty } from "@nestjs/swagger";
|
||
|
|
import { Transform } from "class-transformer";
|
||
|
|
import { IsDefined, IsInt, IsNumber, IsOptional, IsString, Min, ValidateIf } from "class-validator";
|
||
|
|
|
||
|
|
export class CreateTableRecordDTO {
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString({ message: "Property P_USERID must be a string" })
|
||
|
|
@IsDefined({ message: "Property P_USERID is required" })
|
||
|
|
P_USERID: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString({ message: "Property P_TABLEFULLDESC must be a string" })
|
||
|
|
@IsDefined({ message: "Property P_TABLEFULLDESC is required" })
|
||
|
|
P_TABLEFULLDESC: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class CreateParamRecordDTO {
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsNumber()
|
||
|
|
P_SPID?: number;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString()
|
||
|
|
P_PARAMTYPE: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString()
|
||
|
|
P_PARAMDESC: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString()
|
||
|
|
P_PARAMVALUE: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE1?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE2?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE3?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE4?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE5?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsNumber()
|
||
|
|
P_SORTSEQ: number;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString()
|
||
|
|
P_USERID: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class UpdateParamRecordDTO {
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsNumber()
|
||
|
|
P_SPID?: number;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsNumber()
|
||
|
|
P_PARAMID: number;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString()
|
||
|
|
P_PARAMDESC: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE1?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE2?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE3?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE4?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: false })
|
||
|
|
@IsOptional()
|
||
|
|
@IsString()
|
||
|
|
P_ADDLPARAMVALUE5?: string;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsNumber()
|
||
|
|
P_SORTSEQ: number;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString()
|
||
|
|
P_USERID: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class getParamValuesDTO {
|
||
|
|
@IsInt({ message: "Property P_SPID must be a whole number" })
|
||
|
|
@IsNumber({}, { message: "Property P_SPID must be a number" })
|
||
|
|
@Min(0, { message: "Property P_SPID must be at least 0" })
|
||
|
|
@Transform(({ value }) => Number(value))
|
||
|
|
@IsOptional()
|
||
|
|
P_SPID?: number;
|
||
|
|
|
||
|
|
@IsString({ message: "Property P_PARAMTYPE must be a string" })
|
||
|
|
@IsOptional()
|
||
|
|
P_PARAMTYPE?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export class ActivateOrInactivateParamRecordDTO {
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsNumber({}, { message: "Property P_PARAMID must be a number" })
|
||
|
|
@IsDefined({ message: "Property P_PARAMID is required" })
|
||
|
|
P_PARAMID: number;
|
||
|
|
|
||
|
|
@ApiProperty({ required: true })
|
||
|
|
@IsString({ message: "Property P_USERID must be a string" })
|
||
|
|
@IsDefined({ message: "Property P_USERID is required" })
|
||
|
|
P_USERID: string;
|
||
|
|
}
|