30 lines
604 B
TypeScript
30 lines
604 B
TypeScript
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
|
|
import IContact from "./IContact";
|
|
import IOffice from "./IOffice";
|
|
|
|
export default class IAddress {
|
|
@IsNotEmpty()
|
|
public uuid!: string;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public address!: string;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public city!: string;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public zip_code!: number;
|
|
|
|
@IsDate()
|
|
public created_at: Date | null = null;
|
|
|
|
@IsDate()
|
|
public updated_at: Date | null = null;
|
|
|
|
@IsOptional()
|
|
public office?: IOffice;
|
|
|
|
@IsOptional()
|
|
public contacts?: IContact;
|
|
}
|