diff --git a/src/entity/trx_email_logs.ts b/src/entity/trx_email_logs.ts new file mode 100644 index 0000000..72f9df5 --- /dev/null +++ b/src/entity/trx_email_logs.ts @@ -0,0 +1,72 @@ +import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm"; +import { Status } from "../types/status"; +import { TrxEmailStatus, TrxEmailType, TrxIdentityType } from "../types/trx"; +import { TrxCountry } from "./trx_countries"; +import { TrxOccupation } from "./trx_occupations"; + +@Entity("trx_email_logs", { schema: "trx" }) +export class TrxEmail { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: false, + length: 4096, + }) + type: TrxEmailType; + + @Column({ + nullable: false, + length: 4096, + }) + email: string; + + @Column({ + nullable: false, + type: "text", + }) + content: string; + + @Column({ + nullable: false, + }) + request_at: Date; + + @Column({ + nullable: false, + type: "text", + }) + response: string; + + @Column({ + nullable: true, + }) + response_at: Date; + + @Column({ + nullable: false, + length: 64, + }) + status: TrxEmailStatus; + + @Column() + @CreateDateColumn() + created_at: Date; + + @Column({ nullable: true, length: 256 }) + created_by: string; + + @Column({ nullable: true }) + @UpdateDateColumn() + updated_at: Date; + + @Column({ nullable: true, length: 256 }) + updated_by: string; + + @Column({ nullable: true }) + @DeleteDateColumn() + deleted_at: Date; + + @Column({ nullable: true, length: 256 }) + deleted_by: string; +} diff --git a/src/types/trx.ts b/src/types/trx.ts index eba2cea..0cba36f 100644 --- a/src/types/trx.ts +++ b/src/types/trx.ts @@ -83,4 +83,20 @@ export enum TrxTransactionRemark { "cancel" = "Cancel", } +export enum TrxEmailType { + "verification" = "verification", + "transaction" = "transaction", +} + +export enum TrxEmailStatus { + "process" = "process", + "success" = "success", + "fail" = "fail", +} + +export enum TrxMaintenanceType { + "operational" = "operational", + "business" = "business", +} + ////