update
This commit is contained in:
70
src/entity/trx_sms_logs.ts
Normal file
70
src/entity/trx_sms_logs.ts
Normal file
@ -0,0 +1,70 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { TrxSmsStatus, TrxSmsType } from "../types/trx";
|
||||
|
||||
@Entity("trx_sms_logs", { schema: "trx" })
|
||||
export class TrxSmsLog {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 4096,
|
||||
})
|
||||
type: TrxSmsType;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 4096,
|
||||
})
|
||||
phone: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
type: "text",
|
||||
})
|
||||
content: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
request_at: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "text",
|
||||
})
|
||||
response: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
response_at: Date;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
default: TrxSmsStatus.process,
|
||||
})
|
||||
status: TrxSmsStatus;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -41,6 +41,7 @@ export * from "../types/paging";
|
||||
export * from "../types/role";
|
||||
export * from "../types/status";
|
||||
export * from "../types/email";
|
||||
export * from "../types/sms";
|
||||
export * from "../types/pull";
|
||||
export * from "../types/category_source";
|
||||
export * from "../types/category";
|
||||
|
||||
@ -22,6 +22,7 @@ export * from "../entity/trx_transaction_slas";
|
||||
export * from "../entity/trx_transaction_amls";
|
||||
export * from "../entity/trx_transaction_signatures";
|
||||
export * from "../entity/trx_email_logs";
|
||||
export * from "../entity/trx_sms_logs";
|
||||
export * from "../entity/trx_maintenances";
|
||||
export * from "../entity/trx_maintenance_details";
|
||||
export * from "../entity/trx_maintenance_slas";
|
||||
|
||||
13
src/types/sms.ts
Normal file
13
src/types/sms.ts
Normal file
@ -0,0 +1,13 @@
|
||||
export class SmsBody {
|
||||
application: string;
|
||||
to: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export enum SmsTrxFrom {
|
||||
"non_reply" = "non_reply",
|
||||
"registration" = "registration",
|
||||
"verification" = "verification",
|
||||
"transaction" = "transaction",
|
||||
"info" = "info",
|
||||
}
|
||||
@ -104,6 +104,18 @@ export enum TrxTransactionRemark {
|
||||
"cancel" = "Cancel",
|
||||
}
|
||||
|
||||
export enum TrxSmsType {
|
||||
"verification" = "verification",
|
||||
"registration" = "registration",
|
||||
"transaction" = "transaction",
|
||||
}
|
||||
|
||||
export enum TrxSmsStatus {
|
||||
"process" = "process",
|
||||
"success" = "success",
|
||||
"fail" = "fail",
|
||||
}
|
||||
|
||||
export enum TrxEmailType {
|
||||
"verification" = "verification",
|
||||
"registration" = "registration",
|
||||
@ -149,5 +161,3 @@ export enum TrxMaintenanceActionType {
|
||||
"update" = "update",
|
||||
"delete" = "delete",
|
||||
}
|
||||
|
||||
////
|
||||
|
||||
Reference in New Issue
Block a user