update
This commit is contained in:
@ -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 { TrxConfigBankType } from "../types/trx";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_banks", { schema: "trx" })
|
||||
export class TrxConfigBank {
|
||||
@ -20,6 +21,10 @@ export class TrxConfigBank {
|
||||
})
|
||||
name: string;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
default: "indonesia",
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_booms", { schema: "trx" })
|
||||
export class TrxConfigBoom {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigBoom {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_business_entities", { schema: "trx" })
|
||||
export class TrxConfigBusinessEntity {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigBusinessEntity {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_business_fields", { schema: "trx" })
|
||||
export class TrxConfigBusinessField {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigBusinessField {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_channels", { schema: "trx" })
|
||||
export class TrxConfigChannel {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigChannel {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_educations", { schema: "trx" })
|
||||
export class TrxConfigEducation {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigEducation {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_identity_types", { schema: "trx" })
|
||||
export class TrxConfigIdentityType {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigIdentityType {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
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;
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_occupations", { schema: "trx" })
|
||||
export class TrxConfigOccupation {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigOccupation {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_products", { schema: "trx" })
|
||||
export class TrxConfigProduct {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigProduct {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_purposes", { schema: "trx" })
|
||||
export class TrxConfigPurpose {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigPurpose {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_relations", { schema: "trx" })
|
||||
export class TrxConfigRelation {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigRelation {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_religions", { schema: "trx" })
|
||||
export class TrxConfigReligion {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigReligion {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_source_incomes", { schema: "trx" })
|
||||
export class TrxConfigSourceIncome {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigSourceIncome {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
import { Status } from "../types/status";
|
||||
import { TrxLanguage } from "./trx_languages";
|
||||
import { TrxConfigLanguage } from "./trx_config_language";
|
||||
|
||||
@Entity("trx_config_strs", { schema: "trx" })
|
||||
export class TrxConfigStr {
|
||||
@ -22,6 +23,10 @@ export class TrxConfigStr {
|
||||
})
|
||||
status: Status;
|
||||
|
||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
||||
@JoinColumn()
|
||||
language: TrxConfigLanguage;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@ -39,4 +39,5 @@ 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 "../entity/trx_config_language";
|
||||
export * from "../types/trx";
|
||||
|
||||
Reference in New Issue
Block a user