This commit is contained in:
fro1991
2025-11-04 22:27:31 +07:00
parent c640dd564c
commit f35f754b76
2 changed files with 88 additions and 0 deletions

View File

@ -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;
}

View File

@ -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",
}
////