♻️ refacto add namespace and delete enum
This commit is contained in:
parent
d279ab876a
commit
b212ff5085
6
dist/index.d.ts
vendored
6
dist/index.d.ts
vendored
@ -72,3 +72,9 @@ export { default as IOfficeFolderHasCustomerCustomer } from "./Interfaces/Custom
|
||||
export { default as IOfficeFolderHasStakeholderCustomer } from "./Interfaces/Customer/IOfficeFolderHasStakeholder";
|
||||
export { default as IUserCustomer } from "./Interfaces/Customer/IUser";
|
||||
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";
|
||||
|
@ -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"
|
31
src/Interfaces/Admin/Address.ts
Normal file
31
src/Interfaces/Admin/Address.ts
Normal 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;
|
||||
}
|
||||
}
|
45
src/Interfaces/Admin/Contact.ts
Normal file
45
src/Interfaces/Admin/Contact.ts
Normal 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;
|
||||
}
|
||||
}
|
30
src/Interfaces/Admin/Customer.ts
Normal file
30
src/Interfaces/Admin/Customer.ts
Normal 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[];
|
||||
}
|
||||
}
|
25
src/Interfaces/Admin/Deed.ts
Normal file
25
src/Interfaces/Admin/Deed.ts
Normal 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;
|
||||
}
|
||||
}
|
21
src/Interfaces/Admin/DeedHasDocumentType.ts
Normal file
21
src/Interfaces/Admin/DeedHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
36
src/Interfaces/Admin/DeedType.ts
Normal file
36
src/Interfaces/Admin/DeedType.ts
Normal 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[];
|
||||
}
|
||||
}
|
22
src/Interfaces/Admin/DeedTypeHasDocumentType.ts
Normal file
22
src/Interfaces/Admin/DeedTypeHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
38
src/Interfaces/Admin/Document.ts
Normal file
38
src/Interfaces/Admin/Document.ts
Normal 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[];
|
||||
}
|
||||
}
|
24
src/Interfaces/Admin/DocumentHistory.ts
Normal file
24
src/Interfaces/Admin/DocumentHistory.ts
Normal 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;
|
||||
}
|
||||
}
|
38
src/Interfaces/Admin/DocumentType.ts
Normal file
38
src/Interfaces/Admin/DocumentType.ts
Normal 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[];
|
||||
}
|
||||
}
|
21
src/Interfaces/Admin/File.ts
Normal file
21
src/Interfaces/Admin/File.ts
Normal 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;
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
25
src/Interfaces/Admin/Notification.ts
Normal file
25
src/Interfaces/Admin/Notification.ts
Normal 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[];
|
||||
}
|
||||
}
|
43
src/Interfaces/Admin/Office.ts
Normal file
43
src/Interfaces/Admin/Office.ts
Normal 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[];
|
||||
}
|
||||
}
|
50
src/Interfaces/Admin/OfficeFolder.ts
Normal file
50
src/Interfaces/Admin/OfficeFolder.ts
Normal 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[];
|
||||
}
|
||||
}
|
21
src/Interfaces/Admin/OfficeFolderHasCustomer.ts
Normal file
21
src/Interfaces/Admin/OfficeFolderHasCustomer.ts
Normal 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;
|
||||
}
|
||||
}
|
22
src/Interfaces/Admin/OfficeFolderHasStakeholder.ts
Normal file
22
src/Interfaces/Admin/OfficeFolderHasStakeholder.ts
Normal 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;
|
||||
}
|
||||
}
|
33
src/Interfaces/Admin/User.ts
Normal file
33
src/Interfaces/Admin/User.ts
Normal 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;
|
||||
}
|
||||
}
|
23
src/Interfaces/Admin/UserHasNotification.ts
Normal file
23
src/Interfaces/Admin/UserHasNotification.ts
Normal 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";
|
||||
}
|
31
src/Interfaces/Client/Address.ts
Normal file
31
src/Interfaces/Client/Address.ts
Normal 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;
|
||||
}
|
||||
}
|
45
src/Interfaces/Client/Contact.ts
Normal file
45
src/Interfaces/Client/Contact.ts
Normal 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;
|
||||
}
|
||||
}
|
30
src/Interfaces/Client/Customer.ts
Normal file
30
src/Interfaces/Client/Customer.ts
Normal 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[];
|
||||
}
|
||||
}
|
25
src/Interfaces/Client/Deed.ts
Normal file
25
src/Interfaces/Client/Deed.ts
Normal 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;
|
||||
}
|
||||
}
|
21
src/Interfaces/Client/DeedHasDocumentType.ts
Normal file
21
src/Interfaces/Client/DeedHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
36
src/Interfaces/Client/DeedType.ts
Normal file
36
src/Interfaces/Client/DeedType.ts
Normal 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[];
|
||||
}
|
||||
}
|
22
src/Interfaces/Client/DeedTypeHasDocumentType.ts
Normal file
22
src/Interfaces/Client/DeedTypeHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
38
src/Interfaces/Client/Document.ts
Normal file
38
src/Interfaces/Client/Document.ts
Normal 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[];
|
||||
}
|
||||
}
|
24
src/Interfaces/Client/DocumentHistory.ts
Normal file
24
src/Interfaces/Client/DocumentHistory.ts
Normal 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;
|
||||
}
|
||||
}
|
38
src/Interfaces/Client/DocumentType.ts
Normal file
38
src/Interfaces/Client/DocumentType.ts
Normal 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[];
|
||||
}
|
||||
}
|
21
src/Interfaces/Client/File.ts
Normal file
21
src/Interfaces/Client/File.ts
Normal 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;
|
||||
}
|
||||
}
|
25
src/Interfaces/Client/Notification.ts
Normal file
25
src/Interfaces/Client/Notification.ts
Normal 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[];
|
||||
}
|
||||
}
|
43
src/Interfaces/Client/Office.ts
Normal file
43
src/Interfaces/Client/Office.ts
Normal 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[];
|
||||
}
|
||||
}
|
50
src/Interfaces/Client/OfficeFolder.ts
Normal file
50
src/Interfaces/Client/OfficeFolder.ts
Normal 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[];
|
||||
}
|
||||
}
|
21
src/Interfaces/Client/OfficeFolderHasCustomer.ts
Normal file
21
src/Interfaces/Client/OfficeFolderHasCustomer.ts
Normal 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;
|
||||
}
|
||||
}
|
22
src/Interfaces/Client/OfficeFolderHasStakeholder.ts
Normal file
22
src/Interfaces/Client/OfficeFolderHasStakeholder.ts
Normal 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;
|
||||
}
|
||||
}
|
33
src/Interfaces/Client/User.ts
Normal file
33
src/Interfaces/Client/User.ts
Normal 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;
|
||||
}
|
||||
}
|
23
src/Interfaces/Client/UserHasNotification.ts
Normal file
23
src/Interfaces/Client/UserHasNotification.ts
Normal 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";
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
31
src/Interfaces/Notary/Address.ts
Normal file
31
src/Interfaces/Notary/Address.ts
Normal 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;
|
||||
}
|
||||
}
|
46
src/Interfaces/Notary/Contact.ts
Normal file
46
src/Interfaces/Notary/Contact.ts
Normal 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";
|
||||
}
|
30
src/Interfaces/Notary/Customer.ts
Normal file
30
src/Interfaces/Notary/Customer.ts
Normal 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";
|
||||
}
|
25
src/Interfaces/Notary/Deed.ts
Normal file
25
src/Interfaces/Notary/Deed.ts
Normal 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;
|
||||
}
|
||||
}
|
21
src/Interfaces/Notary/DeedHasDocumentType.ts
Normal file
21
src/Interfaces/Notary/DeedHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
36
src/Interfaces/Notary/DeedType.ts
Normal file
36
src/Interfaces/Notary/DeedType.ts
Normal 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[];
|
||||
}
|
||||
}
|
22
src/Interfaces/Notary/DeedTypeHasDocumentType.ts
Normal file
22
src/Interfaces/Notary/DeedTypeHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
43
src/Interfaces/Notary/Document.ts
Normal file
43
src/Interfaces/Notary/Document.ts
Normal 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";
|
||||
}
|
24
src/Interfaces/Notary/DocumentHistory.ts
Normal file
24
src/Interfaces/Notary/DocumentHistory.ts
Normal 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;
|
||||
}
|
||||
}
|
38
src/Interfaces/Notary/DocumentType.ts
Normal file
38
src/Interfaces/Notary/DocumentType.ts
Normal 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[];
|
||||
}
|
||||
}
|
21
src/Interfaces/Notary/File.ts
Normal file
21
src/Interfaces/Notary/File.ts
Normal 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;
|
||||
}
|
||||
}
|
25
src/Interfaces/Notary/Notification.ts
Normal file
25
src/Interfaces/Notary/Notification.ts
Normal 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[];
|
||||
}
|
||||
}
|
43
src/Interfaces/Notary/Office.ts
Normal file
43
src/Interfaces/Notary/Office.ts
Normal 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";
|
||||
}
|
50
src/Interfaces/Notary/OfficeFolder.ts
Normal file
50
src/Interfaces/Notary/OfficeFolder.ts
Normal 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";
|
||||
}
|
21
src/Interfaces/Notary/OfficeFolderHasCustomer.ts
Normal file
21
src/Interfaces/Notary/OfficeFolderHasCustomer.ts
Normal 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;
|
||||
}
|
||||
}
|
22
src/Interfaces/Notary/OfficeFolderHasStakeholder.ts
Normal file
22
src/Interfaces/Notary/OfficeFolderHasStakeholder.ts
Normal 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;
|
||||
}
|
||||
}
|
33
src/Interfaces/Notary/User.ts
Normal file
33
src/Interfaces/Notary/User.ts
Normal 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;
|
||||
}
|
||||
}
|
22
src/Interfaces/Notary/UserHasNotification.ts
Normal file
22
src/Interfaces/Notary/UserHasNotification.ts
Normal 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;
|
||||
}
|
||||
}
|
31
src/Interfaces/SuperAdmin/Address.ts
Normal file
31
src/Interfaces/SuperAdmin/Address.ts
Normal 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;
|
||||
}
|
||||
}
|
45
src/Interfaces/SuperAdmin/Contact.ts
Normal file
45
src/Interfaces/SuperAdmin/Contact.ts
Normal 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;
|
||||
}
|
||||
}
|
30
src/Interfaces/SuperAdmin/Customer.ts
Normal file
30
src/Interfaces/SuperAdmin/Customer.ts
Normal 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[];
|
||||
}
|
||||
}
|
25
src/Interfaces/SuperAdmin/Deed.ts
Normal file
25
src/Interfaces/SuperAdmin/Deed.ts
Normal 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;
|
||||
}
|
||||
}
|
21
src/Interfaces/SuperAdmin/DeedHasDocumentType.ts
Normal file
21
src/Interfaces/SuperAdmin/DeedHasDocumentType.ts
Normal 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;
|
||||
}
|
||||
}
|
36
src/Interfaces/SuperAdmin/DeedType.ts
Normal file
36
src/Interfaces/SuperAdmin/DeedType.ts
Normal 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[];
|
||||
}
|
||||
}
|
22
src/Interfaces/SuperAdmin/DeedTypeHasDocumentType.ts
Normal file
22
src/Interfaces/SuperAdmin/DeedTypeHasDocumentType.ts
Normal 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
Loading…
x
Reference in New Issue
Block a user