update
This commit is contained in:
74
src/entity/trx_costs.ts
Normal file
74
src/entity/trx_costs.ts
Normal file
@ -0,0 +1,74 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxTypeCost } from "../types/trx";
|
||||
|
||||
@Entity("trx_costs", { schema: "trx" })
|
||||
export class TrxCost {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
type: "float8",
|
||||
})
|
||||
min_amount: number;
|
||||
|
||||
@Column({
|
||||
type: "float8",
|
||||
})
|
||||
max_amount: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
type: TrxTypeCost;
|
||||
|
||||
@Column({
|
||||
type: "float8",
|
||||
})
|
||||
cost: number;
|
||||
|
||||
@Column({
|
||||
type: "float8",
|
||||
})
|
||||
min_cost: number;
|
||||
|
||||
@Column({
|
||||
type: "float8",
|
||||
})
|
||||
max_cost: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 64,
|
||||
default: Status.Active,
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -10,6 +10,7 @@ export * from "../entity/trx_customer_user_refresh_tokens";
|
||||
export * from "../entity/trx_customer_user_activities";
|
||||
export * from "../entity/trx_customer_costs";
|
||||
export * from "../entity/trx_customer_slas";
|
||||
export * from "../entity/trx_costs";
|
||||
export * from "../entity/trx_countries";
|
||||
export * from "../entity/trx_currencies";
|
||||
export * from "../entity/trx_country_currencies";
|
||||
|
||||
@ -14,6 +14,11 @@ export enum TrxVerificationStatus {
|
||||
"expire" = "expire",
|
||||
}
|
||||
|
||||
export enum TrxTypeCost {
|
||||
"fix" = "fix",
|
||||
"percentage" = "percentage",
|
||||
}
|
||||
|
||||
export enum TrxCustomerStatus {
|
||||
"pending_supervisor" = "pending_supervisor",
|
||||
"pending_manager" = "pending_manager",
|
||||
|
||||
Reference in New Issue
Block a user