31 lines
808 B
TypeScript
31 lines
808 B
TypeScript
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
|
|
import { Contact } from "./Contact";
|
|
import { Document } from "./Document";
|
|
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
|
|
import { CustomerNotary } from "../..";
|
|
|
|
export namespace Customer {
|
|
export class ICustomer {
|
|
@IsNotEmpty()
|
|
public uuid!: string;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public status!: CustomerNotary.ECustomerStatus;
|
|
|
|
@IsNotEmpty({ groups: ["create"] })
|
|
public contact!: Contact.IContact;
|
|
|
|
@IsDate()
|
|
public created_at: Date | null = null;
|
|
|
|
@IsDate()
|
|
public updated_at: Date | null = null;
|
|
|
|
@IsOptional()
|
|
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
|
|
|
|
@IsOptional()
|
|
documents?: Document.IDocument[];
|
|
}
|
|
}
|