Update
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxCompanyAccount } from "./trx_company_accounts";
|
import { TrxCompanyAccount } from "./trx_company_accounts";
|
||||||
|
import { TrxCompanyUser } from "./trx_company_users";
|
||||||
|
|
||||||
@Entity("trx_companies", { schema: "trx" })
|
@Entity("trx_companies", { schema: "trx" })
|
||||||
export class TrxCompany {
|
export class TrxCompany {
|
||||||
@ -21,6 +22,13 @@ export class TrxCompany {
|
|||||||
})
|
})
|
||||||
code: string;
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
default: null,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
type: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 64,
|
length: 64,
|
||||||
@ -50,6 +58,15 @@ export class TrxCompany {
|
|||||||
@OneToMany(() => TrxCompanyAccount, (company_account) => company_account.company, { cascade: true, nullable: false })
|
@OneToMany(() => TrxCompanyAccount, (company_account) => company_account.company, { cascade: true, nullable: false })
|
||||||
company_account: TrxCompanyAccount[];
|
company_account: TrxCompanyAccount[];
|
||||||
|
|
||||||
|
@OneToMany(() => TrxCompanyUser, (company_user) => company_user.company, { cascade: true, nullable: false })
|
||||||
|
company_user: TrxCompanyUser[];
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 4096,
|
||||||
|
})
|
||||||
|
address: string;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -45,7 +45,7 @@ export class TrxCompanyUser {
|
|||||||
})
|
})
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
@OneToMany(() => TrxConfigLevel, (level) => level.id, { onDelete: "NO ACTION", nullable: false })
|
@OneToMany(() => TrxConfigLevel, (configLevel) => configLevel.user, { cascade: true })
|
||||||
level: TrxConfigLevel[];
|
level: TrxConfigLevel[];
|
||||||
|
|
||||||
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" })
|
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" })
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxConfigBankType } from "../types/trx";
|
import { TrxConfigBankType } from "../types/trx";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_banks", { schema: "trx" })
|
@Entity("trx_config_banks", { schema: "trx" })
|
||||||
export class TrxConfigBank {
|
export class TrxConfigBank {
|
||||||
@ -20,6 +21,10 @@ export class TrxConfigBank {
|
|||||||
})
|
})
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
default: "indonesia",
|
default: "indonesia",
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_booms", { schema: "trx" })
|
@Entity("trx_config_booms", { schema: "trx" })
|
||||||
export class TrxConfigBoom {
|
export class TrxConfigBoom {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigBoom {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_business_entities", { schema: "trx" })
|
@Entity("trx_config_business_entities", { schema: "trx" })
|
||||||
export class TrxConfigBusinessEntity {
|
export class TrxConfigBusinessEntity {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigBusinessEntity {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_business_fields", { schema: "trx" })
|
@Entity("trx_config_business_fields", { schema: "trx" })
|
||||||
export class TrxConfigBusinessField {
|
export class TrxConfigBusinessField {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigBusinessField {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_channels", { schema: "trx" })
|
@Entity("trx_config_channels", { schema: "trx" })
|
||||||
export class TrxConfigChannel {
|
export class TrxConfigChannel {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigChannel {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_educations", { schema: "trx" })
|
@Entity("trx_config_educations", { schema: "trx" })
|
||||||
export class TrxConfigEducation {
|
export class TrxConfigEducation {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigEducation {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_identity_types", { schema: "trx" })
|
@Entity("trx_config_identity_types", { schema: "trx" })
|
||||||
export class TrxConfigIdentityType {
|
export class TrxConfigIdentityType {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigIdentityType {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
63
src/entity/trx_config_language.ts
Normal file
63
src/entity/trx_config_language.ts
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../types/status";
|
||||||
|
|
||||||
|
@Entity("trx_config_languages", { schema: "trx" })
|
||||||
|
export class TrxConfigLanguage {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 128,
|
||||||
|
})
|
||||||
|
code: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 4096,
|
||||||
|
default: "",
|
||||||
|
})
|
||||||
|
eng: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 4096,
|
||||||
|
default: "",
|
||||||
|
})
|
||||||
|
tet: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 4096,
|
||||||
|
default: "",
|
||||||
|
})
|
||||||
|
ind: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
status: Status;
|
||||||
|
|
||||||
|
@Column()
|
||||||
|
@CreateDateColumn()
|
||||||
|
created_at: Date;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 255 })
|
||||||
|
created_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@UpdateDateColumn()
|
||||||
|
updated_at: Date;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 255, nullable: true })
|
||||||
|
updated_by: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deleted_at: Date;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 255, nullable: true })
|
||||||
|
deleted_by: string;
|
||||||
|
}
|
||||||
@ -22,6 +22,9 @@ export class TrxConfigLevel {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxCompanyUser, (user) => user.level, { onDelete: "CASCADE" })
|
||||||
|
user: TrxCompanyUser;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_occupations", { schema: "trx" })
|
@Entity("trx_config_occupations", { schema: "trx" })
|
||||||
export class TrxConfigOccupation {
|
export class TrxConfigOccupation {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigOccupation {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_products", { schema: "trx" })
|
@Entity("trx_config_products", { schema: "trx" })
|
||||||
export class TrxConfigProduct {
|
export class TrxConfigProduct {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigProduct {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_purposes", { schema: "trx" })
|
@Entity("trx_config_purposes", { schema: "trx" })
|
||||||
export class TrxConfigPurpose {
|
export class TrxConfigPurpose {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigPurpose {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
54
src/entity/trx_config_rate.ts
Normal file
54
src/entity/trx_config_rate.ts
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
|
|
||||||
|
import { Status } from "../types/status";
|
||||||
|
|
||||||
|
@Entity("trx_config_rates", { schema: "trx" })
|
||||||
|
export class TrxConfigRate {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
from: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
to: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
type: "float8",
|
||||||
|
})
|
||||||
|
value: Number;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
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;
|
||||||
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_relations", { schema: "trx" })
|
@Entity("trx_config_relations", { schema: "trx" })
|
||||||
export class TrxConfigRelation {
|
export class TrxConfigRelation {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigRelation {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_religions", { schema: "trx" })
|
@Entity("trx_config_religions", { schema: "trx" })
|
||||||
export class TrxConfigReligion {
|
export class TrxConfigReligion {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigReligion {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_source_incomes", { schema: "trx" })
|
@Entity("trx_config_source_incomes", { schema: "trx" })
|
||||||
export class TrxConfigSourceIncome {
|
export class TrxConfigSourceIncome {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigSourceIncome {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||||
import { Status } from "../types/status";
|
import { Status } from "../types/status";
|
||||||
import { TrxLanguage } from "./trx_languages";
|
import { TrxLanguage } from "./trx_languages";
|
||||||
|
import { TrxConfigLanguage } from "./trx_config_language";
|
||||||
|
|
||||||
@Entity("trx_config_strs", { schema: "trx" })
|
@Entity("trx_config_strs", { schema: "trx" })
|
||||||
export class TrxConfigStr {
|
export class TrxConfigStr {
|
||||||
@ -22,6 +23,10 @@ export class TrxConfigStr {
|
|||||||
})
|
})
|
||||||
status: Status;
|
status: Status;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
language: TrxConfigLanguage;
|
||||||
|
|
||||||
@Column()
|
@Column()
|
||||||
@CreateDateColumn()
|
@CreateDateColumn()
|
||||||
created_at: Date;
|
created_at: Date;
|
||||||
|
|||||||
79
src/entity/trx_recepient_swift.ts
Normal file
79
src/entity/trx_recepient_swift.ts
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { Status } from "../types/status";
|
||||||
|
import { TrxConfigNationality } from "./trx_config_nationalities";
|
||||||
|
import { TrxTransactionSwift } from "./trx_transaction_swift";
|
||||||
|
import { TrxConfigBank } from "./trx_config_banks";
|
||||||
|
|
||||||
|
@Entity("trx_recepient_swifts", { schema: "trx" })
|
||||||
|
export class TrxRecepientSwift {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@OneToOne(() => TrxTransactionSwift, (transaction_swift) => transaction_swift.recepient_swift, { onDelete: "CASCADE" })
|
||||||
|
transaction_swift: TrxTransactionSwift;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
iban: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
phone: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigBank, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
recepient_bank: TrxConfigBank;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
account_number: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 4096,
|
||||||
|
})
|
||||||
|
address: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigNationality, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
nationality: TrxConfigNationality;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
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;
|
||||||
|
}
|
||||||
72
src/entity/trx_sender_swift.ts
Normal file
72
src/entity/trx_sender_swift.ts
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { Status } from "../types/status";
|
||||||
|
import { TrxConfigNationality } from "./trx_config_nationalities";
|
||||||
|
import { TrxCompanyAccount } from "./trx_company_accounts";
|
||||||
|
import { TrxTransactionSwift } from "./trx_transaction_swift";
|
||||||
|
import { TrxConfigBank } from "./trx_config_banks";
|
||||||
|
|
||||||
|
@Entity("trx_sender_swifts", { schema: "trx" })
|
||||||
|
export class TrxSenderSwift {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@OneToOne(() => TrxTransactionSwift, (transaction) => transaction.sender_swift, { onDelete: "CASCADE" })
|
||||||
|
transaction_swift: TrxTransactionSwift;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
name: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
phone: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 4096,
|
||||||
|
})
|
||||||
|
address: string;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigNationality, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
nationality: TrxConfigNationality;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxCompanyAccount, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
company_account: TrxCompanyAccount;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigBank, { onDelete: "NO ACTION", nullable: false })
|
||||||
|
@JoinColumn()
|
||||||
|
sender_bank: TrxConfigBank;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 64,
|
||||||
|
})
|
||||||
|
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;
|
||||||
|
}
|
||||||
100
src/entity/trx_transaction_swift.ts
Normal file
100
src/entity/trx_transaction_swift.ts
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
||||||
|
import { TrxCompany } from "./trx_companies";
|
||||||
|
import { TrxConfigSourceIncome } from "./trx_config_source_incomes";
|
||||||
|
import { TrxSenderSwift } from "./trx_sender_swift";
|
||||||
|
import { TrxRecepientSwift } from "./trx_recepient_swift";
|
||||||
|
import { TrxTransaction } from "./trx_transactions";
|
||||||
|
import { TrxTransactionTypeStatus, TrxTransactionCorrespondentFees, TrxTransactionStatus } from "./../types/trx";
|
||||||
|
|
||||||
|
@Entity("trx_transaction_swifts", { schema: "trx" })
|
||||||
|
export class TrxTransactionSwift {
|
||||||
|
@PrimaryGeneratedColumn("uuid")
|
||||||
|
id: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: false,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
type_transaction: TrxTransactionTypeStatus;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
correspondent_fees: string;
|
||||||
|
|
||||||
|
@Column({ type: "float8" })
|
||||||
|
amount_overbooking: number;
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
transfer_amount: number;
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
transfer_total: number;
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
commission: number;
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
cost_of_sender: number;
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: true })
|
||||||
|
sub_total: number;
|
||||||
|
|
||||||
|
@Column({ type: "float8", nullable: false, default: 0 })
|
||||||
|
rate_idr: number;
|
||||||
|
|
||||||
|
@OneToOne(() => TrxTransaction, (transaction) => transaction.transaction_swift, { onDelete: "CASCADE" })
|
||||||
|
transaction: TrxTransaction;
|
||||||
|
|
||||||
|
@ManyToOne(() => TrxConfigSourceIncome, { onDelete: "NO ACTION", nullable: true })
|
||||||
|
@JoinColumn()
|
||||||
|
source_income: TrxConfigSourceIncome;
|
||||||
|
|
||||||
|
@OneToOne(() => TrxSenderSwift, (sender) => sender.transaction_swift, { cascade: true })
|
||||||
|
@JoinColumn()
|
||||||
|
sender_swift: TrxSenderSwift;
|
||||||
|
|
||||||
|
@OneToOne(() => TrxRecepientSwift, (recepient) => recepient.transaction_swift, { cascade: true })
|
||||||
|
@JoinColumn()
|
||||||
|
recepient_swift: TrxRecepientSwift;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 4096,
|
||||||
|
})
|
||||||
|
file: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 256,
|
||||||
|
})
|
||||||
|
bic: String;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
length: 4096,
|
||||||
|
})
|
||||||
|
invoice: 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;
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ import { TrxCompany } from "./trx_companies";
|
|||||||
import { TrxTransactionDomestic } from "./trx_transaction_domestic";
|
import { TrxTransactionDomestic } from "./trx_transaction_domestic";
|
||||||
import { TrxTransactionTransferStatus, TrxTransactionStatus } from "./../types/trx";
|
import { TrxTransactionTransferStatus, TrxTransactionStatus } from "./../types/trx";
|
||||||
import { TrxTransactionRemittance } from "./trx_transaction_remittance";
|
import { TrxTransactionRemittance } from "./trx_transaction_remittance";
|
||||||
|
import { TrxTransactionSwift } from "./trx_transaction_swift";
|
||||||
|
|
||||||
@Entity("trx_transactions", { schema: "trx" })
|
@Entity("trx_transactions", { schema: "trx" })
|
||||||
export class TrxTransaction {
|
export class TrxTransaction {
|
||||||
@ -21,6 +22,10 @@ export class TrxTransaction {
|
|||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
transaction_remittance: TrxTransactionRemittance;
|
transaction_remittance: TrxTransactionRemittance;
|
||||||
|
|
||||||
|
@OneToOne(() => TrxTransactionSwift, (transaction_swift) => transaction_swift.transaction, { cascade: true })
|
||||||
|
@JoinColumn()
|
||||||
|
transaction_swift: TrxTransactionSwift;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: false,
|
nullable: false,
|
||||||
length: 256,
|
length: 256,
|
||||||
@ -40,6 +45,42 @@ export class TrxTransaction {
|
|||||||
})
|
})
|
||||||
signatures: String;
|
signatures: String;
|
||||||
|
|
||||||
|
@Column({ type: "boolean", nullable: true })
|
||||||
|
is_maker_approved: boolean;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
maker_approved_by: string;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 4096, nullable: true })
|
||||||
|
maker_note: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
maker_approved_at: Date;
|
||||||
|
|
||||||
|
@Column({ type: "boolean", nullable: true })
|
||||||
|
is_checker_approved: boolean;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
checker_approved_by: string;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 4096, nullable: true })
|
||||||
|
checker_note: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
checker_approved_at: Date;
|
||||||
|
|
||||||
|
@Column({ type: "boolean", nullable: true })
|
||||||
|
is_signer_approved: boolean;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 100, nullable: true })
|
||||||
|
signer_approved_by: string;
|
||||||
|
|
||||||
|
@Column({ type: "varchar", length: 4096, nullable: true })
|
||||||
|
signer_note: string;
|
||||||
|
|
||||||
|
@Column({ nullable: true })
|
||||||
|
signer_approved_at: Date;
|
||||||
|
|
||||||
@Column({ type: "boolean", nullable: true })
|
@Column({ type: "boolean", nullable: true })
|
||||||
is_tl_approved: boolean;
|
is_tl_approved: boolean;
|
||||||
|
|
||||||
|
|||||||
@ -20,6 +20,8 @@ export * from "../entity/trx_config_levels";
|
|||||||
export * from "../entity/trx_config_occupations";
|
export * from "../entity/trx_config_occupations";
|
||||||
export * from "../entity/trx_config_products";
|
export * from "../entity/trx_config_products";
|
||||||
export * from "../entity/trx_config_purposes";
|
export * from "../entity/trx_config_purposes";
|
||||||
|
export * from "../entity/trx_config_language";
|
||||||
|
export * from "../entity/trx_config_rate";
|
||||||
export * from "../entity/trx_config_relations";
|
export * from "../entity/trx_config_relations";
|
||||||
export * from "../entity/trx_config_religions";
|
export * from "../entity/trx_config_religions";
|
||||||
export * from "../entity/trx_config_source_incomes";
|
export * from "../entity/trx_config_source_incomes";
|
||||||
@ -36,4 +38,7 @@ export * from "../entity/trx_recepient_domestic";
|
|||||||
export * from "../entity/trx_transaction_domestic";
|
export * from "../entity/trx_transaction_domestic";
|
||||||
export * from "../entity/trx_transaction_remittance";
|
export * from "../entity/trx_transaction_remittance";
|
||||||
export * from "../entity/trx_transactions";
|
export * from "../entity/trx_transactions";
|
||||||
|
export * from "../entity/trx_transaction_swift";
|
||||||
|
export * from "../entity/trx_sender_swift";
|
||||||
|
export * from "../entity/trx_recepient_swift";
|
||||||
export * from "../types/trx";
|
export * from "../types/trx";
|
||||||
|
|||||||
@ -5,6 +5,7 @@ export enum TrxTransactionStatus {
|
|||||||
"close" = "close",
|
"close" = "close",
|
||||||
"reject" = "reject",
|
"reject" = "reject",
|
||||||
"approved" = "approved",
|
"approved" = "approved",
|
||||||
|
"draft" = "draft",
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum TrxTransactionTypeStatus {
|
export enum TrxTransactionTypeStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user