♻️ refacto add namespace and delete enum

This commit is contained in:
hugolxt 2023-03-22 18:50:25 +01:00
parent d279ab876a
commit b212ff5085
149 changed files with 2294 additions and 2179 deletions

6
dist/index.d.ts vendored
View File

@ -72,3 +72,9 @@ export { default as IOfficeFolderHasCustomerCustomer } from "./Interfaces/Custom
export { default as IOfficeFolderHasStakeholderCustomer } from "./Interfaces/Customer/IOfficeFolderHasStakeholder"; export { default as IOfficeFolderHasStakeholderCustomer } from "./Interfaces/Customer/IOfficeFolderHasStakeholder";
export { default as IUserCustomer } from "./Interfaces/Customer/IUser"; export { default as IUserCustomer } from "./Interfaces/Customer/IUser";
export { default as ICustomerHasNotificationCustomer } from "./Interfaces/Customer/IUserHasNotification"; export { default as ICustomerHasNotificationCustomer } from "./Interfaces/Customer/IUserHasNotification";
export declare type ECivility = "MALE" | "FEMALE" | "OTHERS";
export declare type EFolderStatus = "LIVE" | "ARCHIVED";
export declare type EOfficeStatus = "ACTIVATED" | "DESACTIVATED";
export declare type ENotificationStatus = "READ" | "UNREAD";
export declare type ECustomerStatus = "VALIDATED" | "PENDING" | "ERRONED";
export declare type EDocumentStatus = "ASKED" | "DEPOSITED" | "VALIDATED" | "ANCHORED" | "REFUSED";

View File

@ -1,16 +0,0 @@
export type ECivility = "MALE" | "FEMALE" | "OTHERS"
export type EFolderStatus = "LIVE" | "ARCHIVED"
export type EOfficeStatus = "ACTIVATED" | "DESACTIVATED"
export type ENotificationStatus = "READ" | "UNREAD"
export type ECustomerStatus = "VALIDATED" | "PENDING" | "ERRONED"
export type EDocumentStatus = "ASKED" | "DEPOSITED" | "VALIDATED" | "ANCHORED" | "REFUSED"

View File

@ -0,0 +1,31 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Office } from "./Office";
export namespace Address {
export 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?: Office.IOffice;
@IsOptional()
public contacts?: Contact.IContact;
}
}

View File

@ -0,0 +1,45 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactNotary } from "../..";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ContactNotary.ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
}

View File

@ -0,0 +1,30 @@
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[];
}
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,36 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,38 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Customer } from "./Customer";
import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
import { DocumentNotary } from "../..";
export namespace Document {
export class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: DocumentNotary.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: OfficeFolder.IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: Customer.ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: File.IFile[];
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
}

View File

@ -0,0 +1,24 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export namespace DocumentHistory {
export class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: Document.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,38 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { Document } from "./Document";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
export namespace DocumentType {
export class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export namespace File {
export class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -1,29 +0,0 @@
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;
}

View File

@ -1,19 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDocument from "./IDocument";
export default class IBlockchainAnchor {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public smartSigJobId!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: IDocument[];
}

View File

@ -1,43 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { ECivility } from "../../Enums/Enums";
import IUser from "./IUser";
import ICustomer from "./ICustomer";
import IAddress from "./IAddress";
export default class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: IUser;
@IsOptional()
public customers?: ICustomer;
}

View File

@ -1,28 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IContact from "./IContact";
import { ECustomerStatus } from "../../Enums/Enums";
import IDocument from "./IDocument";
import IOfficeFolderHasCustomer from "./IOfficeFolderHasCustomer";
export default class ICustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: ECustomerStatus;
@IsNotEmpty({ groups: ["create"] })
public contact!: IContact;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: IOfficeFolderHasCustomer[];
@IsOptional()
documents?: IDocument[];
}

View File

@ -1,24 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IOfficeFolder from "./IOfficeFolder";
import IDeedHasDocumentType from "./IDeedHasDocumentType";
import IDeedType from "./IDeedTypes";
export default class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: IDeedHasDocumentType[];
@IsOptional()
public office_folder?: IOfficeFolder;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import IDeed from "./IDeed";
import IDocumentType from "./IDocumentType";
export default class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import IDeedType from "./IDeedTypes";
import IDocumentType from "./IDocumentType";
export default class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,34 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDeedTypeHasDocumentType from "./IDeedTypeHasDocumentType";
import IOffice from "./IOffice";
import IDeed from "./IDeed";
export default class IDeedTypes {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: IDeed[];
@IsOptional()
public deed_type_has_document_types?: IDeedTypeHasDocumentType[];
}

View File

@ -1,40 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import ICustomer from "./ICustomer";
import { EDocumentStatus } from "../../Enums/Enums";
import IOfficeFolder from "./IOfficeFolder";
import IDocumentType from "./IDocumentType";
import IBlockchainAnchor from "./IBlockchainAnchors";
import IDocumentHistory from "./IDocumentHistory";
import IFile from "./IFile";
export default class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: IDocumentType;
@IsOptional()
public blockchain_anchor?: IBlockchainAnchor;
@IsNotEmpty({ groups: ["create"] })
public folder!: IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: IFile[];
@IsOptional()
public document_history?: IDocumentHistory[];
}

View File

@ -1,23 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { EDocumentStatus } from "../../Enums/Enums";
import IDocument from "./IDocument";
export default class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,36 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDeedHasDocumentType from "./IDeedHasDocumentType";
import IDeedTypeHasDocumentType from "./IDeedTypeHasDocumentType";
import IDocument from "./IDocument";
export default class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: IDocument[];
@IsOptional()
public deed_has_document_types?: IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: IDeedTypeHasDocumentType[];
}

View File

@ -1,19 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDocument from "./IDocument";
export default class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,23 +0,0 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import IUserHasNotification from "./IUserHasNotification";
export default class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: IUserHasNotification[];
}

View File

@ -1,41 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IAddress from "./IAddress";
import { EOfficeStatus } from "../../Enums/Enums";
import IUser from "./IUser";
import IOfficeFolder from "./IOfficeFolder";
import IDeedType from "./IDeedTypes";
export default class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: IDeedType[];
@IsOptional()
users?: IUser[];
@IsOptional()
office_folders?: IOfficeFolder[];
}

View File

@ -1,48 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { EFolderStatus } from "../../Enums/Enums";
import IDeed from "./IDeed";
import IDocument from "./IDocument";
import IOffice from "./IOffice";
import IOfficeFolderHasCustomer from "./IOfficeFolderHasCustomer";
import IOfficeFolderHasStakeholder from "./IOfficeFolderHasStakeholder";
export default class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: IDocument[];
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import ICustomer from "./ICustomer";
import IOfficeFolder from "./IOfficeFolder";
export default class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import IOfficeFolder from "./IOfficeFolder";
import IUser from "./IUser";
export default class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,31 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IContact from "./IContact";
import IDocument from "./IDocument";
import OfficesEntity from "./IOffice";
import IOfficeFolderHasStakeholder from "./IOfficeFolderHasStakeholder";
export default class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: OfficesEntity;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: IDocument;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import INotification from "./INotification";
import IUser from "./IUser";
export default class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import { UserHasNotification } from "./UserHasNotification";
export namespace Notification {
export class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: UserHasNotification.IUserHasNotification[];
}
}

View File

@ -0,0 +1,43 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeNotary } from "../..";
export namespace Office {
export class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: OfficeNotary.EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: DeedType.IDeedType[];
@IsOptional()
users?: User.IUser[];
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
}

View File

@ -0,0 +1,50 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { OfficeFolderNotary } from "../..";
export namespace OfficeFolder {
export class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: OfficeFolderNotary.EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument[];
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Customer } from "./Customer";
import { OfficeFolder } from "./OfficeFolder";
export namespace OfficeFolderHasCustomer {
export class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: Customer.ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
export namespace OfficeFolderHasStakeholder {
export class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,33 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
export namespace User {
export class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument;
}
}

View File

@ -0,0 +1,23 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Notification } from "./Notification";
import { User } from "./User";
export namespace UserHasNotification {
export class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: Notification.INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export type ENotificationStatus = "READ" | "UNREAD";
}

View File

@ -0,0 +1,31 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Office } from "./Office";
export namespace Address {
export 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?: Office.IOffice;
@IsOptional()
public contacts?: Contact.IContact;
}
}

View File

@ -0,0 +1,45 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactNotary } from "../..";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ContactNotary.ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
}

View File

@ -0,0 +1,30 @@
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[];
}
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,36 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,38 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Customer } from "./Customer";
import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
import { DocumentNotary } from "../..";
export namespace Document {
export class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: DocumentNotary.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: OfficeFolder.IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: Customer.ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: File.IFile[];
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
}

View File

@ -0,0 +1,24 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export namespace DocumentHistory {
export class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: Document.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,38 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { Document } from "./Document";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
export namespace DocumentType {
export class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export namespace File {
export class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import { UserHasNotification } from "./UserHasNotification";
export namespace Notification {
export class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: UserHasNotification.IUserHasNotification[];
}
}

View File

@ -0,0 +1,43 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
import { OfficeNotary } from "../..";
export namespace Office {
export class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: OfficeNotary.EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: DeedType.IDeedType[];
@IsOptional()
users?: User.IUser[];
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
}

View File

@ -0,0 +1,50 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
import { OfficeFolderNotary } from "../..";
export namespace OfficeFolder {
export class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: OfficeFolderNotary.EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument[];
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Customer } from "./Customer";
import { OfficeFolder } from "./OfficeFolder";
export namespace OfficeFolderHasCustomer {
export class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: Customer.ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
export namespace OfficeFolderHasStakeholder {
export class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,33 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
export namespace User {
export class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument;
}
}

View File

@ -0,0 +1,23 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Notification } from "./Notification";
import { User } from "./User";
export namespace UserHasNotification {
export class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: Notification.INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
export type ENotificationStatus = "READ" | "UNREAD";
}

View File

@ -1,29 +0,0 @@
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;
}

View File

@ -1,43 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { ECivility } from "../../Enums/Enums";
import IUser from "./IUser";
import ICustomer from "./ICustomer";
import IAddress from "./IAddress";
export default class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: IUser;
@IsOptional()
public customers?: ICustomer;
}

View File

@ -1,28 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IContact from "./IContact";
import { ECustomerStatus } from "../../Enums/Enums";
import IDocument from "./IDocument";
import IOfficeFolderHasCustomer from "./IOfficeFolderHasCustomer";
export default class ICustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: ECustomerStatus;
@IsNotEmpty({ groups: ["create"] })
public contact!: IContact;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: IOfficeFolderHasCustomer[];
@IsOptional()
documents?: IDocument[];
}

View File

@ -1,24 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IOfficeFolder from "./IOfficeFolder";
import IDeedHasDocumentType from "./IDeedHasDocumentType";
import IDeedType from "./IDeedTypes";
export default class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: IDeedHasDocumentType[];
@IsOptional()
public office_folder?: IOfficeFolder;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import IDeed from "./IDeed";
import IDocumentType from "./IDocumentType";
export default class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import IDeedType from "./IDeedTypes";
import IDocumentType from "./IDocumentType";
export default class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,34 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDeedTypeHasDocumentType from "./IDeedTypeHasDocumentType";
import IOffice from "./IOffice";
import IDeed from "./IDeed";
export default class IDeedTypes {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: IDeed[];
@IsOptional()
public deed_type_has_document_types?: IDeedTypeHasDocumentType[];
}

View File

@ -1,36 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import ICustomer from "./ICustomer";
import { EDocumentStatus } from "../../Enums/Enums";
import IOfficeFolder from "./IOfficeFolder";
import IDocumentType from "./IDocumentType";
import IDocumentHistory from "./IDocumentHistory";
import IFile from "./IFile";
export default class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: IFile[];
@IsOptional()
public document_history?: IDocumentHistory[];
}

View File

@ -1,23 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { EDocumentStatus } from "../../Enums/Enums";
import IDocument from "./IDocument";
export default class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,36 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDeedHasDocumentType from "./IDeedHasDocumentType";
import IDeedTypeHasDocumentType from "./IDeedTypeHasDocumentType";
import IDocument from "./IDocument";
export default class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: IDocument[];
@IsOptional()
public deed_has_document_types?: IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: IDeedTypeHasDocumentType[];
}

View File

@ -1,19 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IDocument from "./IDocument";
export default class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,23 +0,0 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import IUserHasNotification from "./IUserHasNotification";
export default class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: IUserHasNotification[];
}

View File

@ -1,41 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IAddress from "./IAddress";
import { EOfficeStatus } from "../../Enums/Enums";
import IUser from "./IUser";
import IOfficeFolder from "./IOfficeFolder";
import IDeedType from "./IDeedTypes";
export default class IOffice{
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: IDeedType[];
@IsOptional()
users?: IUser[];
@IsOptional()
office_folders?: IOfficeFolder[];
}

View File

@ -1,48 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { EFolderStatus } from "../../Enums/Enums";
import IDeed from "./IDeed";
import IDocument from "./IDocument";
import IOffice from "./IOffice";
import IOfficeFolderHasCustomer from "./IOfficeFolderHasCustomer";
import IOfficeFolderHasStakeholder from "./IOfficeFolderHasStakeholder";
export default class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: IDocument[];
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import ICustomer from "./ICustomer";
import IOfficeFolder from "./IOfficeFolder";
export default class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import IOfficeFolder from "./IOfficeFolder";
import IUser from "./IUser";
export default class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -1,31 +0,0 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import IContact from "./IContact";
import IDocument from "./IDocument";
import OfficesEntity from "./IOffice";
import IOfficeFolderHasStakeholder from "./IOfficeFolderHasStakeholder";
export default class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: OfficesEntity;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: IDocument;
}

View File

@ -1,20 +0,0 @@
import { IsNotEmpty, IsDate } from "class-validator";
import INotification from "./INotification";
import IUser from "./IUser";
export default class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}

View File

@ -0,0 +1,31 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Office } from "./Office";
export namespace Address {
export 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?: Office.IOffice;
@IsOptional()
public contacts?: Contact.IContact;
}
}

View File

@ -0,0 +1,46 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
export type ECivility = "MALE" | "FEMALE" | "OTHERS";
}

View File

@ -0,0 +1,30 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
export namespace Customer {
export class ICustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public status!: 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[];
}
export type ECustomerStatus = "VALIDATED" | "PENDING" | "ERRONED";
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,36 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,43 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Customer } from "./Customer";
import { DocumentHistory } from "./DocumentHistory";
import { DocumentType } from "./DocumentType";
import { File } from "./File";
import { OfficeFolder } from "./OfficeFolder";
export namespace Document {
export class IDocument {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public folder!: OfficeFolder.IOfficeFolder;
@IsNotEmpty({ groups: ["create"] })
public depositor!: Customer.ICustomer;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public files?: File.IFile[];
@IsOptional()
public document_history?: DocumentHistory.IDocumentHistory[];
}
export type EDocumentStatus =
| "ASKED"
| "DEPOSITED"
| "VALIDATED"
| "ANCHORED"
| "REFUSED";
}

View File

@ -0,0 +1,24 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export namespace DocumentHistory {
export class IDocumentHistory {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_status!: Document.EDocumentStatus;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public refused_reason: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,38 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { Document } from "./Document";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
export namespace DocumentType {
export class IDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public public_description!: string;
@IsOptional()
public private_description: string | null = null;
@IsDate()
public archived_at: Date | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public documents?: Document.IDocument[];
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Document } from "./Document";
export namespace File {
export class IFile {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document!: Document.IDocument;
@IsOptional()
public file_path: string | null = null;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsUrl, IsOptional } from "class-validator";
import { UserHasNotification } from "./UserHasNotification";
export namespace Notification {
export class INotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public message!: string;
@IsNotEmpty({ groups: ["create"] })
@IsUrl()
public redirection_url!: string;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
user_has_notifications?: UserHasNotification.IUserHasNotification[];
}
}

View File

@ -0,0 +1,43 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { DeedType } from "./DeedType";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
export namespace Office {
export class IOffice {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public crpcen!: string;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsNotEmpty({ groups: ["create"] })
public office_status!: EOfficeStatus;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
deed_types?: DeedType.IDeedType[];
@IsOptional()
users?: User.IUser[];
@IsOptional()
office_folders?: OfficeFolder.IOfficeFolder[];
}
export type EOfficeStatus = "ACTIVATED" | "DESACTIVATED";
}

View File

@ -0,0 +1,50 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasCustomer } from "./OfficeFolderHasCustomer";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
export namespace OfficeFolder {
export class IOfficeFolder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public folder_number!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsOptional()
public description: string | null = null;
@IsOptional()
public archived_description: string | null = null;
@IsNotEmpty({ groups: ["create"] })
public status!: EFolderStatus;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_customers?: OfficeFolderHasCustomer.IOfficeFolderHasCustomer[];
@IsOptional()
office_folder_has_stakeholder?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument[];
}
export type EFolderStatus = "LIVE" | "ARCHIVED";
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Customer } from "./Customer";
import { OfficeFolder } from "./OfficeFolder";
export namespace OfficeFolderHasCustomer {
export class IOfficeFolderHasCustomer {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public customer!: Customer.ICustomer;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { OfficeFolder } from "./OfficeFolder";
import { User } from "./User";
export namespace OfficeFolderHasStakeholder {
export class IOfficeFolderHasStakeholder {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user_stakeholder!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public office_folder!: OfficeFolder.IOfficeFolder;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,33 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Document } from "./Document";
import { Office } from "./Office";
import { OfficeFolderHasStakeholder } from "./OfficeFolderHasStakeholder";
export namespace User {
export class IUser {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public idNot!: string;
@IsNotEmpty({ groups: ["create"] })
public contact!: Contact.IContact;
@IsNotEmpty({ groups: ["create"] })
public office_membership!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
office_folder_has_stakeholders?: OfficeFolderHasStakeholder.IOfficeFolderHasStakeholder[];
@IsOptional()
documents?: Document.IDocument;
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Notification } from "./Notification";
import { User } from "./User";
export namespace UserHasNotification {
export class IUserHasNotification {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public user!: User.IUser;
@IsNotEmpty({ groups: ["create"] })
public notification!: Notification.INotification;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,31 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Contact } from "./Contact";
import { Office } from "./Office";
export namespace Address {
export 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?: Office.IOffice;
@IsOptional()
public contacts?: Contact.IContact;
}
}

View File

@ -0,0 +1,45 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Address } from "./Address";
import { Customer } from "./Customer";
import { User } from "./User";
import { ContactNotary } from "../..";
export namespace Contact {
export class IContact {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public first_name!: string;
@IsNotEmpty({ groups: ["create"] })
public last_name!: string;
@IsNotEmpty({ groups: ["create"] })
public email!: string;
@IsOptional()
public phone_number!: string;
@IsOptional()
public cell_phone_number!: string;
@IsNotEmpty({ groups: ["create"] })
public civility!: ContactNotary.ECivility;
@IsNotEmpty({ groups: ["create"] })
public address!: Address.IAddress;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public users?: User.IUser;
@IsOptional()
public customers?: Customer.ICustomer;
}
}

View File

@ -0,0 +1,30 @@
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[];
}
}

View File

@ -0,0 +1,25 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { DeedType } from "./DeedType";
import { DeedHasDocumentType } from "./DeedHasDocumentType";
import { OfficeFolder } from "./OfficeFolder";
export namespace Deed {
export class IDeed {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed_has_document_types?: DeedHasDocumentType.IDeedHasDocumentType[];
@IsOptional()
public office_folder?: OfficeFolder.IOfficeFolder;
}
}

View File

@ -0,0 +1,21 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { Deed } from "./Deed";
import { DocumentType } from "./DocumentType";
export namespace DeedHasDocumentType {
export class IDeedHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed!: Deed.IDeed;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

View File

@ -0,0 +1,36 @@
import { IsNotEmpty, IsDate, IsOptional } from "class-validator";
import { Deed } from "./Deed";
import { DeedTypeHasDocumentType } from "./DeedTypeHasDocumentType";
import { Office } from "./Office";
export namespace DeedType {
export class IDeedType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public name!: string;
@IsNotEmpty({ groups: ["create"] })
public description!: string;
@IsDate()
public archived_at: Date | null = null;
@IsNotEmpty({ groups: ["create"] })
public office!: Office.IOffice;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
@IsOptional()
public deed?: Deed.IDeed[];
@IsOptional()
public deed_type_has_document_types?: DeedTypeHasDocumentType.IDeedTypeHasDocumentType[];
}
}

View File

@ -0,0 +1,22 @@
import { IsNotEmpty, IsDate } from "class-validator";
import { DeedType } from "./DeedType";
import { DocumentType } from "./DocumentType";
export namespace DeedTypeHasDocumentType {
export class IDeedTypeHasDocumentType {
@IsNotEmpty()
public uuid!: string;
@IsNotEmpty({ groups: ["create"] })
public document_type!: DocumentType.IDocumentType;
@IsNotEmpty({ groups: ["create"] })
public deed_type!: DeedType.IDeedType;
@IsDate()
public created_at: Date | null = null;
@IsDate()
public updated_at: Date | null = null;
}
}

Some files were not shown because too many files have changed in this diff Show More