diff --git a/src/entity/remit_indo_cities.ts b/src/entity/remit_indo_cities.ts new file mode 100644 index 0000000..d66b930 --- /dev/null +++ b/src/entity/remit_indo_cities.ts @@ -0,0 +1,43 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm"; +import { Status } from "../types/status"; +import { RemitMunisipo } from "./remit_munisipos"; +import { RemitAdministrativu } from "./remit_administrativus"; +import { RemitSuco } from "./remit_sucos"; +import { RemitIndoProvince } from "./remit_indo_provinces"; + +@Entity("remit_indo_cities", { schema: "remits" }) +export class RemitIndoCity { + @PrimaryGeneratedColumn("uuid") + id: string; + + @ManyToOne(() => RemitIndoProvince, { onDelete: "RESTRICT" }) + @JoinColumn() + province: RemitIndoProvince; + + @Column({ + nullable: true, + length: 256, + }) + name: 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; +} diff --git a/src/entity/remit_indo_provinces.ts b/src/entity/remit_indo_provinces.ts new file mode 100644 index 0000000..a978337 --- /dev/null +++ b/src/entity/remit_indo_provinces.ts @@ -0,0 +1,38 @@ +import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm"; +import { Status } from "../types/status"; +import { RemitMunisipo } from "./remit_munisipos"; +import { RemitAdministrativu } from "./remit_administrativus"; +import { RemitSuco } from "./remit_sucos"; + +@Entity("remit_indo_provinces", { schema: "remits" }) +export class RemitIndoProvince { + @PrimaryGeneratedColumn("uuid") + id: string; + + @Column({ + nullable: true, + length: 256, + }) + name: 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; +} diff --git a/src/index.ts b/src/index.ts index eb42e66..d692f1e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -118,6 +118,8 @@ import { RemitConfigTransactionType } from "./entity/remit_config_transaction_ty import { RemitConfigChannel } from "./entity/remit_config_channels"; import { RemitConfigTransactionInfo } from "./entity/remit_config_transaction_infos"; import { RemitConfigBoom } from "./entity/remit_config_booms"; +import { RemitIndoProvince } from "./entity/remit_indo_provinces"; +import { RemitIndoCity } from "./entity/remit_indo_cities"; import { RemitPartnerType, // @@ -404,6 +406,8 @@ export { RemitConfigChannel, RemitConfigTransactionInfo, RemitConfigBoom, + RemitIndoProvince, + RemitIndoCity, TcelConfig, TcelLog, };