Merge branch 'main' of https://git.shiblysolution.id/BRITL/entity
This commit is contained in:
48
src/entity/remit_mutation.ts
Normal file
48
src/entity/remit_mutation.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinTable } from "typeorm";
|
||||
import { RemitPartner } from "./remit_partners";
|
||||
|
||||
@Entity("remit_mutation", { schema: "remits" })
|
||||
export class RemitMutation {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
type: "uuid",
|
||||
default: () => "uuid_generate_v4()",
|
||||
})
|
||||
refId: string;
|
||||
|
||||
@ManyToOne(() => RemitPartner, { onDelete: "CASCADE" })
|
||||
@JoinTable()
|
||||
partner: RemitPartner;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
amount: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
status: string;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
}
|
||||
@ -136,6 +136,12 @@ export class RemitPartner {
|
||||
})
|
||||
status: String;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 64,
|
||||
})
|
||||
balance: String;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -23,7 +23,7 @@ export class RemitRegion {
|
||||
type: "uuid",
|
||||
default: () => "uuid_generate_v4()",
|
||||
})
|
||||
pastoId: string;
|
||||
postoId: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
|
||||
@ -82,6 +82,7 @@ import { RemitPartner } from "./entity/remit_partners";
|
||||
import { RemitRegion } from "./entity/remit_region";
|
||||
import { RemitTransfer } from "./entity/remit_tansfer";
|
||||
import { RemitTopup } from "./entity/remit_topup";
|
||||
import { RemitMutation } from "./entity/remit_mutation";
|
||||
|
||||
export {
|
||||
User, //
|
||||
@ -175,4 +176,5 @@ export {
|
||||
RemitRegion,
|
||||
RemitTransfer,
|
||||
RemitTopup,
|
||||
RemitMutation,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user