initial setup
This commit is contained in:
@ -1,37 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"
|
|
||||||
|
|
||||||
@Entity("asset_fixed_classifications")
|
|
||||||
export class AssetFixedClassification {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, unique: true })
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
description: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
created_by: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
updated_by: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
deleted_by: string
|
|
||||||
}
|
|
||||||
@ -1,52 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinTable } from "typeorm"
|
|
||||||
import { AssetFixedClassification } from "./asset_fixed_classification"
|
|
||||||
import { AssetFixedTypeType } from "../types/asset"
|
|
||||||
|
|
||||||
@Entity("asset_fixed_types")
|
|
||||||
export class AssetFixedType {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetFixedClassification, { onDelete: "CASCADE" })
|
|
||||||
@JoinTable()
|
|
||||||
fixed_classification: AssetFixedClassification
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, unique: true })
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
description: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
type: AssetFixedTypeType
|
|
||||||
|
|
||||||
@Column({ type: "float8", default: 0 })
|
|
||||||
depreciation_percent: number
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
depreciation_month: number
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
created_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
updated_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
deleted_by: string
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn, JoinTable } from "typeorm"
|
|
||||||
import { AssetGoodCategory } from "./asset_good_category"
|
|
||||||
import { AssetFixedType } from "./asset_fixed_type"
|
|
||||||
|
|
||||||
@Entity("asset_goods")
|
|
||||||
export class AssetGood {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetGoodCategory, { onDelete: "CASCADE" })
|
|
||||||
@JoinTable()
|
|
||||||
good_category: AssetGoodCategory
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetFixedType, { onDelete: "CASCADE" })
|
|
||||||
@JoinTable()
|
|
||||||
fixed_type: AssetFixedType
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, unique: true })
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
description: string
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: false, default: 0 })
|
|
||||||
price: number
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50 })
|
|
||||||
unit: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, default: "active" })
|
|
||||||
status: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
created_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
updated_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
deleted_by: string
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"
|
|
||||||
|
|
||||||
@Entity("asset_good_categories")
|
|
||||||
export class AssetGoodCategory {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
description: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, nullable: true })
|
|
||||||
status: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
created_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
updated_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
deleted_by: string
|
|
||||||
}
|
|
||||||
@ -1,127 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetSupplier } from "./asset_supplier";
|
|
||||||
import { AssetInventoryCondition } from "../types/asset"
|
|
||||||
import { AssetPurchaseGoodsReceipt } from "./asset_purchase_goods_receipt";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
import { AssetGood } from "./asset_good";
|
|
||||||
import { Branch } from "./branchs";
|
|
||||||
|
|
||||||
@Entity("asset_inventories")
|
|
||||||
export class AssetInventory {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchaseGoodsReceipt, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase_goods_receipt: AssetPurchaseGoodsReceipt;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrder, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order: AssetRequestOrder;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetGood, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
good: AssetGood;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
serial: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
notes: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
acquired_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
acquired_price: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
book_value: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
insured_value: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
current_value: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
premi_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
condition: AssetInventoryCondition;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
branch_id: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
branch_code: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
branch_name: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
department_id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
department_name: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
employee_id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
employee_name: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { AssetInventory } from "./asset_inventories";
|
|
||||||
|
|
||||||
@Entity("asset_inventory_attributes")
|
|
||||||
export class AssetInventoryAttribute {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetInventory, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
inventory: AssetInventory;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { AssetInventory } from "./asset_inventories";
|
|
||||||
import { AssetInventoryDepreciation } from "./asset_inventory_depreciations";
|
|
||||||
|
|
||||||
@Entity("asset_inventory_depreciation_logs")
|
|
||||||
export class AssetInventoryDepreciationLog {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetInventoryDepreciation, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
depreciation: AssetInventoryDepreciation;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetInventory, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
inventory: AssetInventory;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
purchase_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "int2" })
|
|
||||||
month: number;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
period: Date;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
percent: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
initial_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
depreciation_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
loss_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
current_value: number;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { AssetInventory } from "./asset_inventories";
|
|
||||||
|
|
||||||
@Entity("asset_inventory_depreciations")
|
|
||||||
export class AssetInventoryDepreciation {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetInventory, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
inventory: AssetInventory;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
purchase_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "int2" })
|
|
||||||
month: number;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
period: Date;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
percent: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
initial_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
depreciation_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
loss_value: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
current_value: number;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { AssetInventory } from "./asset_inventories";
|
|
||||||
import { AssetInventoryCondition } from "../types/asset";
|
|
||||||
|
|
||||||
@Entity("asset_inventory_histories")
|
|
||||||
export class AssetInventoryHistory {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetInventory, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
inventory: AssetInventory;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
branch_id: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
branch_code: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
branch_name: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
department_id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
department_name: string;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
||||||
employee_id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
employee_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
start_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
condition_start: AssetInventoryCondition;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
note_start: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
end_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
condition_end: AssetInventoryCondition;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
note_end: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,82 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetSupplier } from "./asset_supplier";
|
|
||||||
|
|
||||||
@Entity("asset_purchases")
|
|
||||||
export class AssetPurchase {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetSupplier, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
supplier: AssetSupplier;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
purchase_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 255 })
|
|
||||||
department_id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
department_name: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({ type: 'float8', nullable: true })
|
|
||||||
sub_total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
discount: number;
|
|
||||||
|
|
||||||
|
|
||||||
@Column({ type: 'float8', nullable: true })
|
|
||||||
tax_percent: number;
|
|
||||||
|
|
||||||
@Column({ type: 'float8', nullable: true })
|
|
||||||
tax_amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
status: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,69 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
|
|
||||||
|
|
||||||
@Entity("asset_purchase_goods_receipts")
|
|
||||||
export class AssetPurchaseGoodsReceipt {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
receipt_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
balance: number;
|
|
||||||
|
|
||||||
@Column({ length: 64, default: 'N' })
|
|
||||||
is_inventoried: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
inventoried_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
import { AssetPurchaseGoodsReceipt } from "./asset_purchase_goods_receipt";
|
|
||||||
import { AssetPurchaseRequestOrder } from "./asset_purchase_request_order";
|
|
||||||
import { AssetRequestOrderGood } from "./asset_request_order_good";
|
|
||||||
import { AssetGood } from "./asset_good";
|
|
||||||
|
|
||||||
|
|
||||||
@Entity("asset_purchase_good_receipt_goods")
|
|
||||||
export class AssetPurchaseGoodReceiptGood {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchaseGoodsReceipt, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase_goods_receipt: AssetPurchaseGoodsReceipt;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchaseRequestOrder, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase_request_order: AssetPurchaseRequestOrder;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrder, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order: AssetRequestOrder;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrderGood, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order_good: AssetRequestOrderGood;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetGood, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
good: AssetGood;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
balance: number;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,141 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
import { AssetPurchaseGoodsReceipt } from "./asset_purchase_goods_receipt";
|
|
||||||
import { AssetPurchaseRequestOrder } from "./asset_purchase_request_order";
|
|
||||||
import { AssetRequestOrderGood } from "./asset_request_order_good";
|
|
||||||
import { AssetGood } from "./asset_good";
|
|
||||||
import { AssetSupplier } from "./asset_supplier";
|
|
||||||
|
|
||||||
|
|
||||||
@Entity("asset_purchase_invoices")
|
|
||||||
export class AssetPurchaseInvoice {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchaseGoodsReceipt, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase_goods_receipt: AssetPurchaseGoodsReceipt
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetSupplier, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
supplier: AssetSupplier;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, unique: true })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
invoice_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
receive_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
due_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
sub_total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
discount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
tax_percent: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
tax_amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
status: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@Column({ type: 'boolean', nullable: true })
|
|
||||||
is_finance_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
||||||
finance_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
finance_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
finance_approved_note: string;
|
|
||||||
|
|
||||||
@Column({ type: 'boolean', nullable: true })
|
|
||||||
is_gm_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
||||||
gm_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
gm_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
gm_approved_note: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
payment_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
payment_file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 255
|
|
||||||
})
|
|
||||||
payment_by: string;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
payment_note: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,84 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
import { AssetPurchaseGoodsReceipt } from "./asset_purchase_goods_receipt";
|
|
||||||
import { AssetPurchaseRequestOrder } from "./asset_purchase_request_order";
|
|
||||||
import { AssetRequestOrderGood } from "./asset_request_order_good";
|
|
||||||
import { AssetGood } from "./asset_good";
|
|
||||||
|
|
||||||
|
|
||||||
@Entity("asset_purchase_purchase_bond_realization_goods")
|
|
||||||
export class AssetPurchaseBondRealizationGood {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchaseGoodsReceipt, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase_goods_receipt: AssetPurchaseGoodsReceipt;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchaseRequestOrder, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase_request_order: AssetPurchaseRequestOrder;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrder, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order: AssetRequestOrder;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrderGood, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order_good: AssetRequestOrderGood;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetGood, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
good: AssetGood;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
price: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
difference: number;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,114 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
import { AssetPurchaseGoodsReceipt } from "./asset_purchase_goods_receipt";
|
|
||||||
import { AssetPurchaseRequestOrder } from "./asset_purchase_request_order";
|
|
||||||
import { AssetRequestOrderGood } from "./asset_request_order_good";
|
|
||||||
import { AssetGood } from "./asset_good";
|
|
||||||
|
|
||||||
|
|
||||||
@Entity("asset_purchase_realizations")
|
|
||||||
export class AssetPurchaseRealization {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, unique: true })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
realization_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
difference: number;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
status: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@Column({ type: 'boolean', nullable: true })
|
|
||||||
is_spv_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
||||||
spv_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
spv_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
spv_approved_note: string;
|
|
||||||
|
|
||||||
@Column({ type: 'boolean', nullable: true })
|
|
||||||
is_finance_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
||||||
finance_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
finance_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
finance_approved_note: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
payment_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
payment_file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 255
|
|
||||||
})
|
|
||||||
payment_by: string;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
payment_note: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, JoinTable, ManyToOne, DeleteDateColumn } from "typeorm";
|
|
||||||
import { AssetPurchase } from "./asset_purchase";
|
|
||||||
import { AssetRequestOrder } from "./asset_request_order";
|
|
||||||
|
|
||||||
@Entity("asset_purchase_request_orders")
|
|
||||||
export class AssetPurchaseRequestOrder {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetPurchase, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
purchase: AssetPurchase;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrder, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order: AssetRequestOrder;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,129 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn, JoinTable } from "typeorm";
|
|
||||||
import { AssetRequestOrderCategory } from "./asset_request_order_category";
|
|
||||||
import { AssetSupplier } from "./asset_supplier";
|
|
||||||
|
|
||||||
@Entity("asset_request_orders")
|
|
||||||
export class AssetRequestOrder {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrderCategory, { onDelete: "CASCADE" })
|
|
||||||
@JoinTable()
|
|
||||||
request_order_category: AssetRequestOrderCategory;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
department_id: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
department_name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetSupplier, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
supplier: AssetSupplier;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, unique: true, nullable: true })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50 })
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "date",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
request_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: false, default: 0 })
|
|
||||||
rate_idr: number;
|
|
||||||
|
|
||||||
@Column({ type: "int2" })
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
sub_total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
discount: number;
|
|
||||||
|
|
||||||
@Column({ type: "int2", nullable: true })
|
|
||||||
tax_percent: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
tax_amount: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 4096 })
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
nota_dinas: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, default: "pending" })
|
|
||||||
status: string;
|
|
||||||
|
|
||||||
@Column({ type: "boolean", nullable: true })
|
|
||||||
is_spv_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
spv_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
spv_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
spv_approved_note: string;
|
|
||||||
|
|
||||||
@Column({ type: "boolean", nullable: true })
|
|
||||||
is_ga_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
ga_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
ga_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
ga_approved_note: string;
|
|
||||||
|
|
||||||
@Column({ type: "boolean", nullable: true })
|
|
||||||
is_gm_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
gm_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
gm_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
gm_approved_note: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm"
|
|
||||||
|
|
||||||
@Entity("asset_request_order_categories")
|
|
||||||
export class AssetRequestOrderCategory {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, unique: true })
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 50, nullable: true })
|
|
||||||
status: string
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
created_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
updated_by: string
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
deleted_by: string
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
import {
|
|
||||||
Entity,
|
|
||||||
PrimaryGeneratedColumn,
|
|
||||||
Column,
|
|
||||||
ManyToOne,
|
|
||||||
JoinColumn,
|
|
||||||
JoinTable
|
|
||||||
} from 'typeorm';
|
|
||||||
import { AssetRequestOrder } from './asset_request_order';
|
|
||||||
import { AssetGood } from './asset_good';
|
|
||||||
|
|
||||||
@Entity('asset_request_order_goods')
|
|
||||||
export class AssetRequestOrderGood {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetRequestOrder, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
request_order: AssetRequestOrder;
|
|
||||||
|
|
||||||
@ManyToOne(() => AssetGood, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
good: AssetGood;
|
|
||||||
|
|
||||||
@Column({ type: 'float8', nullable: false, default: 0 })
|
|
||||||
rate_idr: number;
|
|
||||||
|
|
||||||
@Column({ type: 'int' })
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({ type: 'varchar', length: 50 })
|
|
||||||
unit: string;
|
|
||||||
|
|
||||||
@Column({ type: 'float8' })
|
|
||||||
price: number;
|
|
||||||
|
|
||||||
@Column({ type: 'float8' })
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({ type: 'text', nullable: true })
|
|
||||||
description: string;
|
|
||||||
}
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
import {
|
|
||||||
Entity,
|
|
||||||
PrimaryGeneratedColumn,
|
|
||||||
Column,
|
|
||||||
CreateDateColumn,
|
|
||||||
UpdateDateColumn,
|
|
||||||
DeleteDateColumn
|
|
||||||
} from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('asset_suppliers')
|
|
||||||
export class AssetSupplier {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true, unique: true })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
@Column({ length: 512, nullable: true })
|
|
||||||
address: string;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
pic_name: string;
|
|
||||||
|
|
||||||
@Column({ length: 64, nullable: true })
|
|
||||||
pic_phone: string;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
pic_email: string;
|
|
||||||
|
|
||||||
@Column({ length: 64, nullable: false })
|
|
||||||
status: string;
|
|
||||||
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ length: 256, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,255 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BankGaransiType } from "./bank_garansi_type";
|
|
||||||
import { BankGaransiStatus } from "./bank_garansi_status";
|
|
||||||
import { BankGaransiPic } from "./bank_garansi_pic";
|
|
||||||
import { Branch } from "./branchs";
|
|
||||||
|
|
||||||
@Entity("bank_garansi")
|
|
||||||
export class BankGaransi {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
open_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
application_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
start_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
applicant_address: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
applicant_account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
bg_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
contract_number: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
contract_date: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BankGaransiType, (bank_garansi_type) => bank_garansi_type.bank_garansi)
|
|
||||||
@JoinColumn({ name: "bgTypeId" }) // Add foreign key column
|
|
||||||
bank_garansi_type: BankGaransiType;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
bgTypeId: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
project_owner: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
project_owner_address: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
project_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
nominal: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
release_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
due_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
accounting_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
admin_fee: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
provision: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_bang_guarantee: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_transfer_ownership: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_transfer_rights: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_agreement_bg: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_power_of_attorney: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_statement_letter: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_opening: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
doc_publishing: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BankGaransiStatus, (bank_garansi_status) => bank_garansi_status.bank_garansi)
|
|
||||||
@JoinColumn({ name: "bgStatusId" })
|
|
||||||
bank_garansi_status: BankGaransiStatus;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
bgStatusId: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
tin_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
sign_by_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
sign_by_title: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
bri_party: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
branch: Branch;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
approved_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
approved_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,186 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BankGaransiType } from "./bank_garansi_type";
|
|
||||||
import { Branch } from "./branchs";
|
|
||||||
|
|
||||||
// import { CategorySource } from '../types/category_source';
|
|
||||||
// import { Status } from '../types/status';
|
|
||||||
// import { Target } from './targets';
|
|
||||||
|
|
||||||
@Entity("bank_garansi_pending")
|
|
||||||
export class BankGaransiPending {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
open_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
application_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
start_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
applicant_address: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
applicant_account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
contract_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
contract_date: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BankGaransiType, (bank_garansi_type) => bank_garansi_type.bank_garansi)
|
|
||||||
@JoinColumn({ name: "bgTypeId" }) // Add foreign key column
|
|
||||||
bank_garansi_type: BankGaransiType;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
bgTypeId: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
project_owner: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
project_owner_address: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
project_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
nominal: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
release_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
due_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
accounting_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
admin_fee: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
provision: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
tin_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
sign_by_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
sign_by_title: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
bri_party: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
branch: Branch;
|
|
||||||
|
|
||||||
@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;
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BankGaransi } from "./bank_garansi";
|
|
||||||
import { BankGaransiPending } from "./bank_garansi_pending";
|
|
||||||
|
|
||||||
@Entity("bank_garansi_pic")
|
|
||||||
export class BankGaransiPic {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BankGaransi)
|
|
||||||
@JoinColumn()
|
|
||||||
bank_garansi: BankGaransi;
|
|
||||||
|
|
||||||
@ManyToOne(() => BankGaransiPending)
|
|
||||||
@JoinColumn()
|
|
||||||
bank_garansi_pending: BankGaransiPending;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
position: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
title: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
address: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
number_type: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
// import { CategorySource } from '../types/category_source';
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BankGaransi } from "./bank_garansi";
|
|
||||||
// import { Target } from './targets';
|
|
||||||
|
|
||||||
@Entity("bank_garansi_status")
|
|
||||||
export class BankGaransiStatus {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "enum",
|
|
||||||
enum: Status,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@OneToMany(() => BankGaransi, (bank_garansi) => bank_garansi.bgStatusId)
|
|
||||||
bank_garansi: BankGaransi[];
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
// import { CategorySource } from '../types/category_source';
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BankGaransi } from "./bank_garansi";
|
|
||||||
// import { Target } from './targets';
|
|
||||||
|
|
||||||
@Entity("bank_garansi_type")
|
|
||||||
export class BankGaransiType {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name_alias: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
credit_account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
credit_account_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
debit_account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
debit_account_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
adm_account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
provision_account_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
provision_account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
adm_account_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "enum",
|
|
||||||
enum: Status,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@OneToMany(() => BankGaransi, (bank_garansi) => bank_garansi.bgTypeId)
|
|
||||||
bank_garansi: BankGaransi[];
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinColumn, ManyToOne, PrimaryGeneratedColumn, Unique, UpdateDateColumn } from 'typeorm';
|
|
||||||
import { Branch } from './branchs';
|
|
||||||
|
|
||||||
@Entity('bpa')
|
|
||||||
export class Bpa {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
position_date: Date;
|
|
||||||
|
|
||||||
@ManyToOne(() => Branch)
|
|
||||||
@JoinColumn()
|
|
||||||
branch: Branch
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
ledger: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
total_eq: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
remark: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
parent: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne, PrimaryColumn } from 'typeorm';
|
|
||||||
import { Branch } from './branchs';
|
|
||||||
|
|
||||||
@Entity('bpa_format')
|
|
||||||
export class BpaFormat {
|
|
||||||
|
|
||||||
@PrimaryColumn({
|
|
||||||
nullable: false,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
ledger: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
normal_balance: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: false
|
|
||||||
})
|
|
||||||
is_formula: boolean;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'jsonb',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
formula: string[]
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
parent: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, ManyToOne, JoinColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { SummarizeType, SummarizeLogStatus } from '../types/summarize';
|
|
||||||
import { Category } from './categories';
|
|
||||||
|
|
||||||
@Entity('bpa_log')
|
|
||||||
export class BpaLog {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
position_date: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'enum',
|
|
||||||
enum: SummarizeLogStatus,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
status: SummarizeLogStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'text'
|
|
||||||
})
|
|
||||||
error_log: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true
|
|
||||||
})
|
|
||||||
finished_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToMany } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BankGaransi } from "./bank_garansi";
|
|
||||||
|
|
||||||
@Entity("branchs", { schema: 'public' })
|
|
||||||
export class Branch {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 6,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('briapi_appendix_banks', { schema: 'briapis' })
|
|
||||||
export class BriapiAppendixBank {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('briapi_appendix_ids', { schema: 'briapis' })
|
|
||||||
export class BriapiAppendixId {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('briapi_appendix_wallets', { schema: 'briapis' })
|
|
||||||
export class BriapiAppendixWallet {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinColumn, ManyToOne, PrimaryGeneratedColumn, Unique, UpdateDateColumn } from 'typeorm';
|
|
||||||
import { Branch } from './branchs';
|
|
||||||
|
|
||||||
@Entity('briapi_configs', { schema: 'briapis' })
|
|
||||||
export class BriapiConfig {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
key: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
expired_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinColumn, ManyToOne, PrimaryGeneratedColumn, Unique, UpdateDateColumn } from 'typeorm';
|
|
||||||
import { Branch } from './branchs';
|
|
||||||
import { Application } from './application';
|
|
||||||
|
|
||||||
@Entity('briapi_logs', { schema: 'briapis' })
|
|
||||||
export class BriapiLog {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Application, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn({ name: 'application' })
|
|
||||||
application: Application
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
url: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'jsonb'
|
|
||||||
})
|
|
||||||
header: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'jsonb'
|
|
||||||
})
|
|
||||||
body: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
request_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
response: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
response_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,133 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrilinkBalanceDestinationType, BrilinkBalanceMutationActvity, BrilinkBalanceMutationStatus, BrilinkBalanceMutationType, BrilinkBalanceSourceType } from '../types/brilink';
|
|
||||||
import { BrilinkBalance } from './brilink_balances.ts';
|
|
||||||
|
|
||||||
@Entity('brilink_balance_mutations', { schema: 'brilinks' })
|
|
||||||
export class BrilinkBalanceMutation {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
unique: true
|
|
||||||
})
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
activity: BrilinkBalanceMutationActvity;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
activity_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
type: BrilinkBalanceMutationType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
source_type: BrilinkBalanceSourceType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
source_id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkBalance, { onDelete: 'RESTRICT', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
source_balance: BrilinkBalance
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
source_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
destination_type: BrilinkBalanceDestinationType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
destination_id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkBalance, { onDelete: 'RESTRICT', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
destination_balance: BrilinkBalance
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
destination_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
prev_balance: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
last_balance: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: BrilinkBalanceMutationStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@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,117 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrilinkBalanceDestinationType, BrilinkBalanceMutationActvity, BrilinkBalanceMutationStatus, BrilinkBalanceMutationType, BrilinkBalanceSourceType } from '../types/brilink';
|
|
||||||
import { BrilinkBalance } from './brilink_balances.ts';
|
|
||||||
|
|
||||||
@Entity('brilink_balance_topups', { schema: 'brilinks' })
|
|
||||||
export class BrilinkBalanceTopup {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
request_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
request_by: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
source_type: BrilinkBalanceSourceType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
source_id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkBalance, { onDelete: 'RESTRICT', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
source_balance: BrilinkBalance
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
source_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
destination_type: BrilinkBalanceDestinationType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
destination_id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
destination_name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkBalance, { onDelete: 'RESTRICT', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
destination_balance: BrilinkBalance
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: BrilinkBalanceMutationStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
approve_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
approve_at: Date;
|
|
||||||
|
|
||||||
@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,62 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
import { BrilinkBalanceCode, BrilinkBalanceType } from '../types/brilink';
|
|
||||||
import { BrilinkMerchantTerminal } from './brilink_merchant_terminals';
|
|
||||||
|
|
||||||
@Entity('brilink_balances', { schema: 'brilinks' })
|
|
||||||
export class BrilinkBalance {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
type: BrilinkBalanceType
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: 'RESTRICT', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
code: BrilinkBalanceCode
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
balance: number;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
balance_at: Date;
|
|
||||||
|
|
||||||
@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,75 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { BrilinkDiscountModule, BrilinkDiscountStatus, BrilinkDiscountType } from "../types/brilink";
|
|
||||||
import { BrilinkMerchant } from "./brilink_merchants";
|
|
||||||
|
|
||||||
@Entity("brilink_discounts", { schema: "brilinks" })
|
|
||||||
export class BrilinkDiscount {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
module: BrilinkDiscountModule;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, unique: true })
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
min_trans_amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
max_trans_amount: number;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
type: BrilinkDiscountType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
start_date: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
end_date: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 10 })
|
|
||||||
status: BrilinkDiscountStatus;
|
|
||||||
|
|
||||||
@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,104 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { BrizziHistoryActvity, BrizziHistoryRemarks, BrizziHistoryType } from "../types/brizzi";
|
|
||||||
import { BrilinkTerminal } from "./brilink_terminals";
|
|
||||||
import { BrizziCard } from "./brizzi_cards";
|
|
||||||
import { BrilinkMerchant } from "./brilink_merchants";
|
|
||||||
import { BrilinkMerchantTerminal } from "./brilink_merchant_terminals";
|
|
||||||
import { BrilinkMembershipCardHistoryActvity, BrilinkMembershipCardRemarks } from "../types/brilink";
|
|
||||||
import { BrilinkMembership } from "./brilink_memberships";
|
|
||||||
import { BrilinkMembershipCard } from "./brilink_membership_cards";
|
|
||||||
|
|
||||||
@Entity("brilink_membership_card_histories", { schema: "brilinks" })
|
|
||||||
export class BrilinkMembershipCardHistory {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMembershipCard, { onDelete: "NO ACTION" })
|
|
||||||
@JoinTable()
|
|
||||||
membership_card: BrilinkMembershipCard;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
activity: BrilinkMembershipCardHistoryActvity;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
activity_at: Date;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMembership, { onDelete: "NO ACTION" })
|
|
||||||
@JoinTable()
|
|
||||||
membership: BrilinkMembership;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkTerminal, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
terminal: BrilinkTerminal;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
prev_expired: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
next_expired: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
default: "unverified",
|
|
||||||
})
|
|
||||||
remarks: BrilinkMembershipCardRemarks;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
payload: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
payload_json: Record<string, any>;
|
|
||||||
|
|
||||||
@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,51 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { BrilinkMerchant } from "./brilink_merchants";
|
|
||||||
import { BrizziCard } from "./brizzi_cards";
|
|
||||||
import { BrilinkMembership } from "./brilink_memberships";
|
|
||||||
import { BrilinkMembershipCardStatus } from "../types/brilink";
|
|
||||||
|
|
||||||
@Entity("brilink_membership_cards", { schema: "brilinks" })
|
|
||||||
export class BrilinkMembershipCard {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMembership, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
membership: BrilinkMembership;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrizziCard, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
card: BrizziCard;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
expired_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
default: "inactive",
|
|
||||||
})
|
|
||||||
status: BrilinkMembershipCardStatus;
|
|
||||||
|
|
||||||
@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,48 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
|
|
||||||
@Entity('brilink_memberships', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMembership {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 2,
|
|
||||||
unique: true
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 3,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
aid: string;
|
|
||||||
|
|
||||||
@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,54 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BrilinkProductCategory } from "./brilink_product_categories";
|
|
||||||
import { BrilinkProductItem } from "./brilink_product_items";
|
|
||||||
import { BrilinkMerchant } from "./brilink_merchants";
|
|
||||||
|
|
||||||
@Entity("brilink_merchant_product_items", { schema: "brilinks" })
|
|
||||||
export class BrilinkMerchantProductItem {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkProductItem, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
product_item: BrilinkProductItem;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
price_merchant: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
price_sale: number;
|
|
||||||
|
|
||||||
@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,102 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BrilinkMerchantSettlementStatus, BrilinkTransactionType } from "../types/brilink";
|
|
||||||
import { BrilinkMerchant } from "./brilink_merchants";
|
|
||||||
|
|
||||||
@Entity("brilink_merchant_settlements", { schema: "brilinks" })
|
|
||||||
export class BrilinkMerchantSettlement {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
type: BrilinkTransactionType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
discount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
fee: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: BrilinkMerchantSettlementStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
settlement_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
approve_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
approve_at: Date;
|
|
||||||
|
|
||||||
@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,48 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrilinkMerchantStatus } from '../types/brilink';
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_sites', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantSite {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
location: string;
|
|
||||||
|
|
||||||
@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,63 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrilinkMerchantStatus, BrilinkTerminalCondition } from '../types/brilink';
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
import { BrilinkMerchantSite } from './brilink_merchant_sites';
|
|
||||||
import { BrilinkTerminal } from './brilink_terminals';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_terminal_histories', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantTerminalHistory {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkTerminal, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
terminal: BrilinkTerminal
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantSite, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
site: BrilinkMerchantSite
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 1096
|
|
||||||
})
|
|
||||||
note: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1096
|
|
||||||
})
|
|
||||||
condition: BrilinkTerminalCondition;
|
|
||||||
|
|
||||||
@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,34 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne, ManyToMany, JoinTable } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { Application } from './application';
|
|
||||||
import { User } from './users';
|
|
||||||
import { BrilinkMerchantTerminal } from './brilink_merchant_terminals';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_terminal_menus', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantTerminalMenu {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
type: 'jsonb'
|
|
||||||
})
|
|
||||||
menus: string[];
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_terminal_user_refresh_tokens', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantTerminalUserRefreshToken {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
refresh_token: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
type: 'uuid'
|
|
||||||
})
|
|
||||||
id_user: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
user_agent: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
os: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
device: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
platform: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
browser: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
remote_addr: string;
|
|
||||||
|
|
||||||
@Column('timestamp')
|
|
||||||
expired_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,105 +0,0 @@
|
|||||||
import bcrypt from 'bcryptjs';
|
|
||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrilinkMerchantTerminal } from './brilink_merchant_terminals';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_terminal_users', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantTerminalUser {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
password: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
username: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
pin: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
authenticator: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
unique: false,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'uuid',
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
reset_token: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: false
|
|
||||||
})
|
|
||||||
is_request_lock: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
hashPassword() {
|
|
||||||
this.password = bcrypt.hashSync(this.password, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
hashPin() {
|
|
||||||
this.pin = bcrypt.hashSync(this.pin, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfPasswordMatch(unencryptedPassword: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedPassword, this.password);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfPinMatch(unencryptedPin: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedPin, this.pin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrilinkTerminalOnline } from '../types/brilink';
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
import { BrilinkMerchantSite } from './brilink_merchant_sites';
|
|
||||||
import { BrilinkTerminal } from './brilink_terminals';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_terminals', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantTerminal {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantSite, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
site: BrilinkMerchantSite
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkTerminal, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
terminal: BrilinkTerminal
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: BrilinkTerminalOnline;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
online_at: Date;
|
|
||||||
|
|
||||||
@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,64 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_user_refresh_tokens', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantUserRefreshToken {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
refresh_token: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
type: 'uuid'
|
|
||||||
})
|
|
||||||
id_user: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
user_agent: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
os: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
device: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
platform: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
browser: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
remote_addr: string;
|
|
||||||
|
|
||||||
@Column('timestamp')
|
|
||||||
expired_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,85 +0,0 @@
|
|||||||
import bcrypt from 'bcryptjs';
|
|
||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, Index, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrilinkMerchantTerminal } from './brilink_merchant_terminals';
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
|
|
||||||
@Entity('brilink_merchant_users', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchantUser {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
password: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
username: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
authenticator: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
unique: false,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'uuid',
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
reset_token: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
hashPassword() {
|
|
||||||
this.password = bcrypt.hashSync(this.password, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfPasswordMatch(unencryptedPassword: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedPassword, this.password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrilinkMerchantStatus } from '../types/brilink';
|
|
||||||
|
|
||||||
@Entity('brilink_merchants', { schema: 'brilinks' })
|
|
||||||
export class BrilinkMerchant {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
address: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
logo: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: BrilinkMerchantStatus;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
account_number: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
account_holder: string
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_email: string;
|
|
||||||
|
|
||||||
@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,74 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BrilinkProductCategorySupplier } from "../types/brilink";
|
|
||||||
import { BrilinkTerminalMenu } from "./brilink_terminal_menus";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("brilink_product_categories", { schema: "brilinks" })
|
|
||||||
export class BrilinkProductCategory {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkTerminalMenu, { onDelete: "NO ACTION" })
|
|
||||||
@JoinTable()
|
|
||||||
terminal_menu: BrilinkTerminalMenu;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
logo: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
supplier: BrilinkProductCategorySupplier;
|
|
||||||
|
|
||||||
@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,95 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BrilinkProductCategory } from "./brilink_product_categories";
|
|
||||||
import { BrilinkProductType } from "./brilink_product_types";
|
|
||||||
|
|
||||||
@Entity("brilink_product_items", { schema: "brilinks" })
|
|
||||||
export class BrilinkProductItem {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkProductType, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
product_type: BrilinkProductType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
subtitle: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
price_base: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
price_merchant: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
price_sale: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
supplier_prop: Record<string, any>;
|
|
||||||
|
|
||||||
@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,62 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BrilinkProductCategorySupplier } from "../types/brilink";
|
|
||||||
import { BrilinkTerminalMenu } from "./brilink_terminal_menus";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BrilinkProductCategory } from "./brilink_product_categories";
|
|
||||||
|
|
||||||
@Entity("brilink_product_types", { schema: "brilinks" })
|
|
||||||
export class BrilinkProductType {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkProductCategory, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
product_category: BrilinkProductCategory;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
description: 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,63 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
|
|
||||||
@Entity('brilink_terminal_languages', { schema: 'brilinks' })
|
|
||||||
export class BrilinkTerminalLanguage {
|
|
||||||
@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,71 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
|
|
||||||
@Entity('brilink_terminal_menus', { schema: 'brilinks' })
|
|
||||||
export class BrilinkTerminalMenu {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
module: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
link: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'uuid'
|
|
||||||
})
|
|
||||||
id_parent: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
type: 'int2'
|
|
||||||
})
|
|
||||||
order_number: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
icon: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
language_code: string;
|
|
||||||
|
|
||||||
children: BrilinkTerminalMenu[]
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrilinkTerminalCondition, BrilinkTerminalType } from '../types/brilink';
|
|
||||||
|
|
||||||
@Entity('brilink_terminals', { schema: 'brilinks' })
|
|
||||||
export class BrilinkTerminal {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
type: BrilinkTerminalType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
brand: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
model: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
serial: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
notes: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
condition: BrilinkTerminalCondition;
|
|
||||||
|
|
||||||
@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,38 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, Entity, JoinColumn, JoinTable, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
|
||||||
import { Application } from "./application";
|
|
||||||
import { BrilinkTransaction } from "./brilink_transactions";
|
|
||||||
|
|
||||||
@Entity("brilink_transaction_logs", { schema: "brilinks" })
|
|
||||||
export class BrilinkTransactionLog {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkTransaction, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
transaction: BrilinkTransaction;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
action: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
})
|
|
||||||
request: any;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
request_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
})
|
|
||||||
response: any;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
response_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,177 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { BrilinkMerchant } from "./brilink_merchants";
|
|
||||||
import { BrilinkBalanceCode, BrilinkBalanceType, BrilinkTransactionActivity, BrilinkTransactionStatus, BrilinkTransactionType } from "../types/brilink";
|
|
||||||
import { BrilinkMerchantTerminal } from "./brilink_merchant_terminals";
|
|
||||||
import { BrilinkTerminal } from "./brilink_terminals";
|
|
||||||
import { BrilinkBalance } from "./brilink_balances.ts";
|
|
||||||
import { BrilinkBalanceMutation } from "./brilink_balance_mutations";
|
|
||||||
import { BrilinkMerchantSettlement } from "./brilink_merchant_settlements";
|
|
||||||
import { BrilinkDiscount } from "./brilink_discounts";
|
|
||||||
import { BrilinkProductItem } from "./brilink_product_items";
|
|
||||||
|
|
||||||
@Entity("brilink_transactions", { schema: "brilinks" })
|
|
||||||
export class BrilinkTransaction {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkBalanceMutation, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
balance_mutation: BrilinkBalanceMutation;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
type: BrilinkTransactionType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
activity: BrilinkTransactionActivity;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
activity_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
target: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
target_data: Record<string, any>;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkDiscount, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
discount: BrilinkDiscount;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
discount_amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
fee: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: BrilinkTransactionStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 1024,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
refund_reference: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
refund_by: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
refund_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
is_merchant_settlement: boolean;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantSettlement, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_settlement: BrilinkMerchantSettlement;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkProductItem, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
product_item: BrilinkProductItem;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
supplier_reference_code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
supplier_transaction_code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
supplier_check: number;
|
|
||||||
|
|
||||||
@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,32 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BrivaCompany } from "./briva_companies";
|
|
||||||
import { BrivaCompanyAccountLabel } from "./briva_company_account_labels";
|
|
||||||
import { BrivaAccount } from "./briva_accounts";
|
|
||||||
|
|
||||||
@Entity("briva_account_labels", { schema: "brivas" })
|
|
||||||
export class BrivaAccountLabel {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrivaAccount, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
account: BrivaAccount;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrivaCompanyAccountLabel, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
company_account_label: BrivaCompanyAccountLabel;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BrivaCompany } from "./briva_companies";
|
|
||||||
|
|
||||||
@Entity("briva_accounts", { schema: "brivas" })
|
|
||||||
export class BrivaAccount {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
account_holder: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrivaCompany, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
company: BrivaCompany;
|
|
||||||
|
|
||||||
@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;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
|
|
||||||
@Entity('briva_companies', { schema: 'brivas' })
|
|
||||||
export class BrivaCompany {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
account_number: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
account_code: string
|
|
||||||
|
|
||||||
@Column({ type: "text", nullable: true })
|
|
||||||
account_holder: string
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_email: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { BrivaCompany } from "./briva_companies";
|
|
||||||
|
|
||||||
@Entity("briva_company_account_labels", { schema: "brivas" })
|
|
||||||
export class BrivaCompanyAccountLabel {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrivaCompany, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
company: BrivaCompany;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
prefix_code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('briva_company_user_refresh_tokens', { schema: 'brivas' })
|
|
||||||
export class BrivaCompanyUserRefreshToken {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
refresh_token: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
type: 'uuid'
|
|
||||||
})
|
|
||||||
id_user: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
user_agent: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
os: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
device: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
platform: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
browser: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
remote_addr: string;
|
|
||||||
|
|
||||||
@Column('timestamp')
|
|
||||||
expired_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
import bcrypt from 'bcryptjs';
|
|
||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrivaCompany } from './briva_companies';
|
|
||||||
|
|
||||||
@Entity('briva_company_users', { schema: 'brivas' })
|
|
||||||
export class BrivaCompanyUser {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
password: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
username: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
unique: false,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrivaCompany, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
company: BrivaCompany
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'uuid',
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
reset_token: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
hashPassword() {
|
|
||||||
this.password = bcrypt.hashSync(this.password, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfPasswordMatch(unencryptedPassword: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedPassword, this.password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,67 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { BrivaCompany } from './briva_companies';
|
|
||||||
import { BrivaAccount } from './briva_accounts';
|
|
||||||
import { Branch } from './branchs';
|
|
||||||
|
|
||||||
@Entity('briva_transactions', { schema: 'brivas' })
|
|
||||||
export class BrivaTransaction {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
position_datetime: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
reference_number: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Branch)
|
|
||||||
@JoinColumn()
|
|
||||||
branch: Branch
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 10
|
|
||||||
})
|
|
||||||
teller_code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrivaAccount, { onDelete: 'NO ACTION' })
|
|
||||||
@JoinTable()
|
|
||||||
account: BrivaAccount
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 3,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
currency: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 64,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
supervisor: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrizziBatchStatus, BrizziCardStatus } from '../types/brizzi';
|
|
||||||
|
|
||||||
@Entity('brizzi_batchs', { schema: 'brizzis' })
|
|
||||||
export class BrizziBatch {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
brand: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
model: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code_start: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code_end: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: true,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
quantity: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
import_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
finish_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: BrizziBatchStatus;
|
|
||||||
|
|
||||||
@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,85 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { BrizziCardStatus } from "../types/brizzi";
|
|
||||||
import { BrizziBatch } from "./brizzi_batchs";
|
|
||||||
|
|
||||||
@Entity("brizzi_cards", { schema: "brizzis" })
|
|
||||||
export class BrizziCard {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrizziBatch, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
batch: BrizziBatch;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
brand: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
model: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
uid: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
notes: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
balance: number;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
balance_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: BrizziCardStatus;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
active_at: Date;
|
|
||||||
|
|
||||||
@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,121 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrizziHistoryActvity, BrizziHistoryRemarks, BrizziHistoryType } from '../types/brizzi';
|
|
||||||
import { BrilinkTerminal } from './brilink_terminals';
|
|
||||||
import { BrizziCard } from './brizzi_cards';
|
|
||||||
import { BrilinkMerchant } from './brilink_merchants';
|
|
||||||
import { BrilinkMerchantTerminal } from './brilink_merchant_terminals';
|
|
||||||
|
|
||||||
@Entity('brizzi_histories', { schema: 'brizzis' })
|
|
||||||
export class BrizziHistory {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
unique: true
|
|
||||||
})
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@ManyToOne(() => BrizziCard, { onDelete: 'RESTRICT' })
|
|
||||||
@JoinTable()
|
|
||||||
card: BrizziCard
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
activity: BrizziHistoryActvity;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
activity_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
type: BrizziHistoryType;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchant, { onDelete: 'NO ACTION', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant: BrilinkMerchant
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: 'NO ACTION', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkTerminal, { onDelete: 'NO ACTION', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
terminal: BrilinkTerminal
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 128,
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
prev_balance: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
last_balance: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
default: 'unverified'
|
|
||||||
})
|
|
||||||
remarks: BrizziHistoryRemarks;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
payload: string
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'jsonb',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
payload_json: Record<string, any>;
|
|
||||||
|
|
||||||
@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,73 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinTable, ManyToOne, PrimaryColumn, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { BrizziCardStatus } from '../types/brizzi';
|
|
||||||
import { BrizziBatch } from './brizzi_batchs';
|
|
||||||
import { BrizziCard } from './brizzi_cards';
|
|
||||||
import { BrilinkMerchantTerminal } from './brilink_merchant_terminals';
|
|
||||||
|
|
||||||
@Entity('brizzi_old_cards', { schema: 'brizzis' })
|
|
||||||
export class BrizziOldCard {
|
|
||||||
|
|
||||||
@PrimaryColumn({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
uid: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 16
|
|
||||||
})
|
|
||||||
number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 16
|
|
||||||
})
|
|
||||||
mac: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: false,
|
|
||||||
default: 0
|
|
||||||
})
|
|
||||||
balance: number;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
balance_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: BrizziCardStatus;
|
|
||||||
|
|
||||||
@Column({ type: 'boolean', default: false })
|
|
||||||
is_switched: boolean;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
switched_at: Date;
|
|
||||||
|
|
||||||
@ManyToOne(() => BrilinkMerchantTerminal, { onDelete: 'NO ACTION', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
merchant_terminal: BrilinkMerchantTerminal
|
|
||||||
|
|
||||||
@ManyToOne(() => BrizziCard, { onDelete: 'NO ACTION', nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
card: BrizziCard
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { CategoryType } from '../types/category';
|
|
||||||
import { CategorySource } from '../types/category_source';
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { Target } from './targets';
|
|
||||||
|
|
||||||
@Entity('categories')
|
|
||||||
export class Category {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
default: 'asset',
|
|
||||||
nullable: false
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'enum',
|
|
||||||
enum: CategorySource,
|
|
||||||
nullable: false
|
|
||||||
})
|
|
||||||
source: CategorySource;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'enum',
|
|
||||||
enum: Status,
|
|
||||||
nullable: false
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
parentId: number;
|
|
||||||
|
|
||||||
@ManyToOne(() => Category, (category) => category.children)
|
|
||||||
parent: Category;
|
|
||||||
|
|
||||||
@OneToMany(() => Category, (category) => category.parent)
|
|
||||||
children: Category[];
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'uuid',
|
|
||||||
array: true
|
|
||||||
})
|
|
||||||
products: string[];
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'enum',
|
|
||||||
enum: CategoryType,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
type: CategoryType
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'jsonb',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
condition: string[]
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
date_column: string
|
|
||||||
|
|
||||||
@OneToMany(() => Target, (target) => target.category)
|
|
||||||
targets: Target[];
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,148 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne, Index } from "typeorm";
|
|
||||||
import { Branch } from "./branchs";
|
|
||||||
import { Product } from "./products";
|
|
||||||
import { IncomeTier } from "./income_tier";
|
|
||||||
import { ClassEconomi } from "./class_economi";
|
|
||||||
import { District } from "./district";
|
|
||||||
import { Munisipo } from "./munisipo";
|
|
||||||
import { Administrativu } from "./administrativu";
|
|
||||||
import { Suco } from "./suco";
|
|
||||||
import { Aldeia } from "./aldeia";
|
|
||||||
|
|
||||||
@Entity("cif_account")
|
|
||||||
export class CifAccount {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 12,
|
|
||||||
})
|
|
||||||
cif_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 20,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
branch: Branch;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
open_date: Date;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
position_date: Date;
|
|
||||||
|
|
||||||
@ManyToOne(() => Product, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
product: Product;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "float8",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
current_balance: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 2,
|
|
||||||
})
|
|
||||||
country_code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
country_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
exposed_person_flag: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => IncomeTier, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
income_tier: IncomeTier;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
cif_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "int2",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
status: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
gender: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
birth_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "float8",
|
|
||||||
})
|
|
||||||
age: Number;
|
|
||||||
|
|
||||||
@ManyToOne(() => ClassEconomi, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
class_economi: ClassEconomi;
|
|
||||||
|
|
||||||
@ManyToOne(() => District, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
district: District;
|
|
||||||
|
|
||||||
@ManyToOne(() => Munisipo, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
munisipiu: Munisipo;
|
|
||||||
|
|
||||||
@ManyToOne(() => Administrativu, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
administrativu: Administrativu;
|
|
||||||
|
|
||||||
@ManyToOne(() => Suco, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
suco: Suco;
|
|
||||||
|
|
||||||
@ManyToOne(() => Aldeia, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
aldeia: Aldeia;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
|
|
||||||
@Entity('class_economis')
|
|
||||||
export class ClassEconomi {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
import { ComplianceRiskPepType } from "../types/compliance";
|
|
||||||
|
|
||||||
@Entity("compliance_aml_news", { schema: "compliances" })
|
|
||||||
export class ComplianceAmlNew {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
link: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@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,90 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
import { ComplianceCifDoubleStatus, ComplianceRiskPepType } from "../types/compliance";
|
|
||||||
import { ComplianceCifDouble } from "./compliance_cif_doubles";
|
|
||||||
|
|
||||||
@Entity("compliance_cif_double_details", { schema: "compliances" })
|
|
||||||
export class ComplianceCifDoubleDetail {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceCifDouble, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
cif_double: ComplianceCifDouble;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
cif_number: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
identity_number: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
name: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
birth_place: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
birth_date: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
mother_name: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
province: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
city: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
suspects: any[];
|
|
||||||
|
|
||||||
@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,53 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
import { ComplianceCifDoubleStatus, ComplianceRiskPepType } from "../types/compliance";
|
|
||||||
|
|
||||||
@Entity("compliance_cif_doubles", { schema: "compliances" })
|
|
||||||
export class ComplianceCifDouble {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
total: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
suspect: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: ComplianceCifDoubleStatus;
|
|
||||||
|
|
||||||
@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,47 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceFuturuCifSyncLogStatus } from "../types/compliance";
|
|
||||||
|
|
||||||
@Entity("compliance_futuru_cif_sync_logs", { schema: "compliances" })
|
|
||||||
export class ComplianceFuturuCifSyncLog {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: ComplianceFuturuCifSyncLogStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
remark: 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;
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { Employee } from "./hrms_employee";
|
|
||||||
import { User } from "./users";
|
|
||||||
import { ComplianceIntegrityFact } from "./compliance_integrity_facts";
|
|
||||||
|
|
||||||
@Entity("compliance_integrity_fact_employees", { schema: "compliances" })
|
|
||||||
export class ComplianceIntegrityFactEmployee {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceIntegrityFact, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
integrity_fact: ComplianceIntegrityFact;
|
|
||||||
|
|
||||||
@ManyToOne(() => Employee, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
employee: Employee;
|
|
||||||
|
|
||||||
@ManyToOne(() => User, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
user: User;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: 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;
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
@Entity("compliance_integrity_facts", { schema: "compliances" })
|
|
||||||
export class ComplianceIntegrityFact {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4,
|
|
||||||
})
|
|
||||||
year: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: 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;
|
|
||||||
}
|
|
||||||
@ -1,51 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceRegulatorReport } from "./compliance_regulator_reports";
|
|
||||||
|
|
||||||
@Entity("compliance_regulator_report_details", { schema: "compliances" })
|
|
||||||
export class ComplianceRegulatorReportDetail {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRegulatorReport, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
regulator_report: ComplianceRegulatorReport;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: 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;
|
|
||||||
}
|
|
||||||
@ -1,66 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceRegulatorReportCode, ComplianceRegulatorReportType } from "../types/compliance";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("compliance_regulator_reports", { schema: "compliances" })
|
|
||||||
export class ComplianceRegulatorReport {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "date",
|
|
||||||
})
|
|
||||||
position_date: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
type: ComplianceRegulatorReportType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: ComplianceRegulatorReportCode;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: 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;
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceRiskCustomer } from "./compliance_risk_customers";
|
|
||||||
import { ComplianceRiskFactor } from "./compliance_risk_factors";
|
|
||||||
import { ComplianceRiskFormula } from "./compliance_risk_formulas";
|
|
||||||
import { ComplianceRiskParameterInformation } from "./compliance_risk_parameter_informations";
|
|
||||||
import { ComplianceRiskParameter } from "./compliance_risk_parameters";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_customer_details", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskCustomerDetail {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskCustomer, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_result: ComplianceRiskCustomer;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskFormula, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_formula: ComplianceRiskFormula;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskFactor, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_factor: ComplianceRiskFactor;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskParameter, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_parameter: ComplianceRiskParameter;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskParameterInformation, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_parameter_information: ComplianceRiskParameterInformation;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "smallint",
|
|
||||||
default: 3,
|
|
||||||
})
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@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,87 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceRiskCustomerType, ComplianceRiskTransactionClassification, ComplianceRiskTransactionType } from "../types/compliance";
|
|
||||||
import { Application } from "./application";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_customers", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskCustomer {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Application, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
application: Application;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
default: ComplianceRiskCustomerType.customer_personal,
|
|
||||||
})
|
|
||||||
type: ComplianceRiskCustomerType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
cif_account: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096,
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
owner: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "float8",
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
classification: ComplianceRiskTransactionClassification;
|
|
||||||
|
|
||||||
@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,60 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_factors", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskFactor {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label_in: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label_tt: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label_en: string;
|
|
||||||
|
|
||||||
@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,72 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { Application } from "./application";
|
|
||||||
import { ComplianceRiskParameterInformation } from "./compliance_risk_parameter_informations";
|
|
||||||
import { ComplianceRiskFactor } from "./compliance_risk_factors";
|
|
||||||
import { ComplianceRiskParameter } from "./compliance_risk_parameters";
|
|
||||||
import { ComplianceRiskFormulaType } from "../types/compliance";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_formulas", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskFormula {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
default: ComplianceRiskFormulaType.transaction,
|
|
||||||
})
|
|
||||||
type: ComplianceRiskFormulaType;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskFactor, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_factor: ComplianceRiskFactor;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskParameter, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_parameter: ComplianceRiskParameter;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: 0,
|
|
||||||
})
|
|
||||||
seq: 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,71 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
import { ComplianceRiskParameter } from "./compliance_risk_parameters";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_parameter_informations", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskParameterInformation {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskParameter, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_parameter: ComplianceRiskParameter;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
label_in: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
label_tt: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
label_en: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "smallint",
|
|
||||||
default: 3,
|
|
||||||
})
|
|
||||||
level: 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,66 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_parameters", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskParameter {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label_in: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label_tt: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
label_en: string;
|
|
||||||
|
|
||||||
@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,72 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { EformLanguage } from "./eform_languages";
|
|
||||||
import { ComplianceCountryPep, ComplianceRiskPepType } from "../types/compliance";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_peps", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskPep {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
type: ComplianceRiskPepType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
remarks: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskPep, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
relation: ComplianceRiskPep;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
relation_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: "tl",
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
country: ComplianceCountryPep;
|
|
||||||
|
|
||||||
@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,64 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceRiskFormula } from "./compliance_risk_formulas";
|
|
||||||
import { ComplianceRiskFactor } from "./compliance_risk_factors";
|
|
||||||
import { ComplianceRiskParameter } from "./compliance_risk_parameters";
|
|
||||||
import { ComplianceRiskParameterInformation } from "./compliance_risk_parameter_informations";
|
|
||||||
import { ComplianceRiskTransaction } from "./compliance_risk_transactions";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_transaction_details", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskTransactionDetail {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskTransaction, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_result: ComplianceRiskTransaction;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskFormula, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_formula: ComplianceRiskFormula;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskFactor, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_factor: ComplianceRiskFactor;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskParameter, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_parameter: ComplianceRiskParameter;
|
|
||||||
|
|
||||||
@ManyToOne(() => ComplianceRiskParameterInformation, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
risk_parameter_information: ComplianceRiskParameterInformation;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "smallint",
|
|
||||||
default: 3,
|
|
||||||
})
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@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,73 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { ComplianceRiskTransactionClassification, ComplianceRiskTransactionType } from "../types/compliance";
|
|
||||||
import { Application } from "./application";
|
|
||||||
|
|
||||||
@Entity("compliance_risk_transactions", { schema: "compliances" })
|
|
||||||
export class ComplianceRiskTransaction {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => Application, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
application: Application;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
type: ComplianceRiskTransactionType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
reference: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "float8",
|
|
||||||
})
|
|
||||||
total: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 50,
|
|
||||||
})
|
|
||||||
classification: ComplianceRiskTransactionClassification;
|
|
||||||
|
|
||||||
@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,45 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { CreditApplication } from './credit_applications';
|
|
||||||
import { CreditTypeForms } from './credit_type_forms';
|
|
||||||
import { CreditCompanyUser } from './credit_company_users';
|
|
||||||
|
|
||||||
@Entity('credit_application_chats')
|
|
||||||
export class CreditApplicationChat {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditApplication, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
application: CreditApplication
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
company: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
message: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { CreditApplication } from './credit_applications';
|
|
||||||
import { CreditTypeForms } from './credit_type_forms';
|
|
||||||
import { CreditApplicationFileStatus } from '../types/credit';
|
|
||||||
|
|
||||||
@Entity('credit_application_forms')
|
|
||||||
export class CreditApplicationForm {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditApplication, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
application: CreditApplication
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditTypeForms, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
form: CreditTypeForms
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,102 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
||||||
|
|
||||||
import { CreditApplicationStatus } from '../types/credit';
|
|
||||||
import { CreditCompany } from './credit_companies';
|
|
||||||
import { CreditDebtor } from './credit_debtors';
|
|
||||||
import { CreditCompanyUser } from './credit_company_users';
|
|
||||||
|
|
||||||
@Entity('credit_applications')
|
|
||||||
export class CreditApplication {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditDebtor, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
debtor: CreditDebtor
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditCompany, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
company: CreditCompany
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditCompanyUser)
|
|
||||||
@JoinColumn()
|
|
||||||
user: CreditCompanyUser
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'date',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
application_date: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
cif: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'float8',
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
period_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: 'int2',
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
period_amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: CreditApplicationStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 1024
|
|
||||||
})
|
|
||||||
finalize_by: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'jsonb'
|
|
||||||
})
|
|
||||||
simulation: string[];
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'jsonb'
|
|
||||||
})
|
|
||||||
scoring: string[];
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
|
|
||||||
@Entity('credit_companies')
|
|
||||||
export class CreditCompany {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
logo: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
pic_email: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,64 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index } from 'typeorm';
|
|
||||||
|
|
||||||
@Entity('credit_company_user_refresh_tokens')
|
|
||||||
export class CreditCompanyUserRefreshToken {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
refresh_token: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
type: 'uuid'
|
|
||||||
})
|
|
||||||
id_user: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
user_agent: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 128
|
|
||||||
})
|
|
||||||
os: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
device: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
platform: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
browser: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 32
|
|
||||||
})
|
|
||||||
remote_addr: string;
|
|
||||||
|
|
||||||
@Column('timestamp')
|
|
||||||
expired_at: Date;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
import bcrypt from 'bcryptjs';
|
|
||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { CreditCompany } from './credit_companies';
|
|
||||||
|
|
||||||
@Entity('credit_company_users')
|
|
||||||
export class CreditCompanyUser {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
password: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
username: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
unique: false,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditCompany, { onDelete: 'CASCADE' })
|
|
||||||
@JoinTable()
|
|
||||||
company: CreditCompany
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'uuid',
|
|
||||||
select: false
|
|
||||||
})
|
|
||||||
reset_token: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
hashPassword() {
|
|
||||||
this.password = bcrypt.hashSync(this.password, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfPasswordMatch(unencryptedPassword: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedPassword, this.password);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("credit_configs")
|
|
||||||
export class CreditConfigs {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
module: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
param: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
debtor_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: "int2",
|
|
||||||
})
|
|
||||||
order_number: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
value: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: Status["Not Active"],
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,76 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
|
|
||||||
@Entity('credit_config_insurances')
|
|
||||||
export class CreditConfigInsurance {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
debtor_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'int2'
|
|
||||||
})
|
|
||||||
age: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'int2'
|
|
||||||
})
|
|
||||||
year: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
type: 'float8'
|
|
||||||
})
|
|
||||||
amount: number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
remark: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: Status['Not Active'],
|
|
||||||
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,159 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from 'typeorm';
|
|
||||||
|
|
||||||
import { Status } from '../types/status';
|
|
||||||
import { CreditCompany } from './credit_companies';
|
|
||||||
import { CreditApplicationFileStatus } from '../types/credit';
|
|
||||||
|
|
||||||
@Entity('credit_debtors')
|
|
||||||
export class CreditDebtor {
|
|
||||||
@PrimaryGeneratedColumn('uuid')
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
employee_id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
identity_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
identity_file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
identity_file_status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@ManyToOne(() => CreditCompany, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
company: CreditCompany
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
marriage_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
marriage_file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
marriage_file_status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
family_file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
family_file_status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
spouse_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256
|
|
||||||
})
|
|
||||||
spouse_file_type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
spouse_file: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
spouse_file_status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
photo: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
photo_status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
spouse_photo: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
spouse_photo_status: CreditApplicationFileStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user