This commit is contained in:
meusinfirmary
2025-03-28 03:16:35 +07:00
parent 5cbf37750e
commit ca51fe39a0
2 changed files with 14 additions and 3 deletions

View File

@ -1,4 +1,5 @@
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinTable } from "typeorm";
import { RemitPartner } from "./remit_partners";
@Entity("remit_mutation", { schema: "remits" })
export class RemitMutation {
@ -6,11 +7,15 @@ export class RemitMutation {
id: string;
@Column({
nullable: false,
length: 256,
type: "uuid",
default: () => "uuid_generate_v4()",
})
refId: string;
@ManyToOne(() => RemitPartner, { onDelete: "CASCADE" })
@JoinTable()
partner: RemitPartner;
@Column({
nullable: false,
length: 256,

View File

@ -136,6 +136,12 @@ export class RemitPartner {
})
status: String;
@Column({
nullable: true,
length: 64,
})
balance: String;
@Column()
@CreateDateColumn()
created_at: Date;