update
This commit is contained in:
@ -13,7 +13,7 @@ export class TrxCif {
|
||||
number: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
nullable: false,
|
||||
})
|
||||
generated_at: Date;
|
||||
|
||||
|
||||
@ -21,12 +21,6 @@ export class TrxCompany {
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 4096,
|
||||
})
|
||||
description: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
@ -41,7 +35,7 @@ export class TrxCompany {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
unique: true,
|
||||
length: 256,
|
||||
})
|
||||
pic_phone: string;
|
||||
|
||||
@ -2,19 +2,13 @@ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateCol
|
||||
|
||||
import { Status } from "../types/status";
|
||||
import { TrxCompany } from "./trx_companies";
|
||||
import { TrxCif } from "./trx_cifs";
|
||||
|
||||
@Entity("trx_company_accounts", { schema: "trx" })
|
||||
export class TrxCompanyAccount {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
length: 256,
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
@ -27,32 +21,13 @@ export class TrxCompanyAccount {
|
||||
})
|
||||
account_number: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
account_holder: string;
|
||||
|
||||
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinTable()
|
||||
company: TrxCompany;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
last_trans_at: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256,
|
||||
})
|
||||
last_trans_ref_number: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "float8",
|
||||
})
|
||||
last_trans_amount: number;
|
||||
@ManyToOne(() => TrxCif, { onDelete: "NO ACTION", nullable: true })
|
||||
@JoinTable()
|
||||
cif: TrxCif;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
|
||||
@ -11,11 +11,18 @@ export class TrxCompanyUser {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
unique: true,
|
||||
length: 64,
|
||||
})
|
||||
email: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
length: 256,
|
||||
})
|
||||
phone: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
@ -25,7 +32,7 @@ export class TrxCompanyUser {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
unique: true,
|
||||
length: 64,
|
||||
})
|
||||
username: string;
|
||||
|
||||
58
src/entity/trx_registration.ts
Normal file
58
src/entity/trx_registration.ts
Normal file
@ -0,0 +1,58 @@
|
||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||
import { TrxCompany } from "./trx_companies";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxCif } from "./trx_cifs";
|
||||
|
||||
@Entity("trx_registrations", { schema: "trx" })
|
||||
export class TrxRegistration {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
unique: true,
|
||||
})
|
||||
code: string;
|
||||
|
||||
@ManyToOne(() => TrxCompany, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
company: TrxCompany;
|
||||
|
||||
@ManyToOne(() => TrxCif, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
cif: TrxCif;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@Column({ nullable: true })
|
||||
registration_at: Date;
|
||||
|
||||
@Column({ nullable: true, length: 256 })
|
||||
registration_by: string;
|
||||
|
||||
@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;
|
||||
}
|
||||
@ -25,3 +25,4 @@ export * from "../entity/trx_region_munisipos";
|
||||
export * from "../entity/trx_region_administrativus";
|
||||
export * from "../entity/trx_region_aldeias";
|
||||
export * from "../entity/trx_region_sucos";
|
||||
export * from "../entity/trx_registration";
|
||||
|
||||
8
src/types/trx.ts
Normal file
8
src/types/trx.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export enum TrxTransactionStatusType {
|
||||
"verify" = "verify",
|
||||
"open" = "open",
|
||||
"progress" = "progress",
|
||||
"close" = "close",
|
||||
"reject" = "reject",
|
||||
"approved" = "approved",
|
||||
}
|
||||
Reference in New Issue
Block a user