update
This commit is contained in:
60
src/entity/trx_verifications.ts
Normal file
60
src/entity/trx_verifications.ts
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
import bcrypt from "bcryptjs";
|
||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
||||||
|
import { TrxVerificationPurposeType, TrxVerificationStatus, TrxVerificationType } from "../types/trx";
|
||||||
|
|
||||||
|
@Entity("trx_verifications", { schema: "trx" })
|
||||||
|
export class TrxVerification {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
purpose: TrxVerificationPurposeType;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
type: TrxVerificationType;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
target: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
token: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
status: TrxVerificationStatus;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
expired_at: Date;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
})
|
||||||
|
verified_at: Date;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
}
|
||||||
@ -43,6 +43,7 @@ export * from "../entity/trx_partner_user_activities";
|
|||||||
export * from "../entity/trx_partner_user_refresh_tokens";
|
export * from "../entity/trx_partner_user_refresh_tokens";
|
||||||
export * from "../entity/trx_partner_users";
|
export * from "../entity/trx_partner_users";
|
||||||
|
|
||||||
|
export * from "../entity/trx_verifications";
|
||||||
export * from "../entity/trx_customers";
|
export * from "../entity/trx_customers";
|
||||||
export * from "../entity/trx_customer_accounts";
|
export * from "../entity/trx_customer_accounts";
|
||||||
export * from "../entity/trx_customer_users";
|
export * from "../entity/trx_customer_users";
|
||||||
|
|||||||
@ -1,3 +1,18 @@
|
|||||||
|
export enum TrxVerificationType {
|
||||||
|
"phone" = "phone",
|
||||||
|
"email" = "email",
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum TrxVerificationPurposeType {
|
||||||
|
"register" = "register",
|
||||||
|
"transaction" = "transaction",
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum TrxVerificationStatus {
|
||||||
|
"unverify" = "unverify",
|
||||||
|
"verify" = "verify",
|
||||||
|
}
|
||||||
|
|
||||||
export enum TrxCustomerType {
|
export enum TrxCustomerType {
|
||||||
"personal" = "personal",
|
"personal" = "personal",
|
||||||
"business" = "business",
|
"business" = "business",
|
||||||
|
|||||||
Reference in New Issue
Block a user