49 lines
879 B
TypeScript
49 lines
879 B
TypeScript
import { IsDate } from "class-validator";
|
|
import Address from "./Address";
|
|
import Resource from "../Resource";
|
|
import { Expose, Type } from "class-transformer";
|
|
|
|
export default class Contact extends Resource {
|
|
@Expose()
|
|
public uid?: string;
|
|
|
|
@Expose()
|
|
public first_name!: string;
|
|
|
|
@Expose()
|
|
public last_name!: string;
|
|
|
|
@Expose()
|
|
public email!: string;
|
|
|
|
@Expose()
|
|
public cell_phone_number!: string;
|
|
|
|
@Expose()
|
|
public phone_number?: string | null = null;
|
|
|
|
@Expose()
|
|
public civility!: ECivility | string;
|
|
|
|
@Expose()
|
|
@Type(() => Address)
|
|
public address?: Address;
|
|
|
|
@Expose()
|
|
@IsDate()
|
|
public birthdate?: Date | null = null;
|
|
|
|
@Expose()
|
|
@IsDate()
|
|
public created_at: Date | null = null;
|
|
|
|
@Expose()
|
|
@IsDate()
|
|
public updated_at: Date | null = null;
|
|
}
|
|
export enum ECivility {
|
|
MALE = "MALE",
|
|
FEMALE = "FEMALE",
|
|
OTHERS = "OTHERS",
|
|
}
|