update
This commit is contained in:
@ -1,40 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("trx_authenticators", { schema: "trx" })
|
|
||||||
export class TrxAuthenticator {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
authenticator: string;
|
|
||||||
|
|
||||||
@Column({ nullable: false })
|
|
||||||
generated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "boolean", nullable: true })
|
|
||||||
is_valid: boolean;
|
|
||||||
|
|
||||||
@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,46 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxCompanyUser } from "./trx_company_users";
|
|
||||||
@Entity("trx_cifs", { schema: "trx" })
|
|
||||||
export class TrxCif {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
generated_at: Date;
|
|
||||||
|
|
||||||
@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,81 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, OneToMany } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxCompanyAccount } from "./trx_company_accounts";
|
|
||||||
import { TrxCompanyUser } from "./trx_company_users";
|
|
||||||
|
|
||||||
@Entity("trx_companies", { schema: "trx" })
|
|
||||||
export class TrxCompany {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: null,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
type: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
pic_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
pic_phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
pic_email: string;
|
|
||||||
|
|
||||||
@OneToMany(() => TrxCompanyAccount, (company_account) => company_account.company, { cascade: true, nullable: false })
|
|
||||||
company_account: TrxCompanyAccount[];
|
|
||||||
|
|
||||||
@OneToMany(() => TrxCompanyUser, (company_user) => company_user.company, { cascade: true, nullable: false })
|
|
||||||
company_user: TrxCompanyUser[];
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
address: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxCompany } from "./trx_companies";
|
|
||||||
import { TrxCif } from "./trx_cifs";
|
|
||||||
|
|
||||||
@Entity("trx_company_accounts", { schema: "trx" })
|
|
||||||
export class TrxCompanyAccount {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCompany, (company) => company.company_account, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
company: TrxCompany;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCif, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
cif: TrxCif;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: "Y",
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
}
|
|
||||||
@ -1,63 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
|
|
||||||
import { ActivityType } from "../types/action";
|
|
||||||
import { TrxCompanyUser } from "./trx_company_users";
|
|
||||||
|
|
||||||
@Entity("trx_company_user_activities")
|
|
||||||
export class TrxCompanyUserActivity {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCompanyUser, { onDelete: "NO ACTION", nullable: false })
|
|
||||||
@JoinColumn()
|
|
||||||
user: TrxCompanyUser;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
type: "uuid",
|
|
||||||
})
|
|
||||||
refresh_token: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 512,
|
|
||||||
})
|
|
||||||
module: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 2048,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 1,
|
|
||||||
})
|
|
||||||
action: ActivityType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 2048,
|
|
||||||
})
|
|
||||||
url: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
data_body: 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("trx_company_user_refresh_tokens", { schema: "trx" })
|
|
||||||
export class TrxCompanyUserRefreshToken {
|
|
||||||
@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 { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, OneToOne, JoinColumn, ManyToOne, OneToMany, ManyToMany, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxCompany } from "./trx_companies";
|
|
||||||
import { TrxConfigLevel } from "./trx_config_levels";
|
|
||||||
|
|
||||||
@Entity("trx_company_users", { schema: "trx" })
|
|
||||||
export class TrxCompanyUser {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
select: false,
|
|
||||||
})
|
|
||||||
password: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
username: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 64,
|
|
||||||
unique: false,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION" })
|
|
||||||
@JoinTable()
|
|
||||||
company: TrxCompany;
|
|
||||||
|
|
||||||
@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,79 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxConfigBankType } from "../types/trx";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_banks", { schema: "trx" })
|
|
||||||
export class TrxConfigBank {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: "indonesia",
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
type: TrxConfigBankType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
fullname: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
formerly: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
logo: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_booms", { schema: "trx" })
|
|
||||||
export class TrxConfigBoom {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_business_entities", { schema: "trx" })
|
|
||||||
export class TrxConfigBusinessEntity {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_business_fields", { schema: "trx" })
|
|
||||||
export class TrxConfigBusinessField {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_channels", { schema: "trx" })
|
|
||||||
export class TrxConfigChannel {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_educations", { schema: "trx" })
|
|
||||||
export class TrxConfigEducation {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_identity_types", { schema: "trx" })
|
|
||||||
export class TrxConfigIdentityType {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,63 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("trx_config_languages", { schema: "trx" })
|
|
||||||
export class TrxConfigLanguage {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 128,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
eng: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
tet: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
default: "",
|
|
||||||
})
|
|
||||||
ind: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 255, nullable: true })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxPartnerUser } from "./trx_partner_users";
|
|
||||||
|
|
||||||
@Entity("trx_config_levels", { schema: "trx" })
|
|
||||||
export class TrxConfigLevel {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
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,44 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxRegionMunisipo } from "./trx_region_munisipos";
|
|
||||||
|
|
||||||
@Entity("trx_config_munisipos", { schema: "trx" })
|
|
||||||
export class TrxConfigMunisipo {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxRegionMunisipo, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
munisipo: TrxRegionMunisipo;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
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,57 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
|
|
||||||
@Entity("trx_config_nationalities", { schema: "trx" })
|
|
||||||
export class TrxConfigNationality {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
flag: 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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_occupations", { schema: "trx" })
|
|
||||||
export class TrxConfigOccupation {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_products", { schema: "trx" })
|
|
||||||
export class TrxConfigProduct {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_purposes", { schema: "trx" })
|
|
||||||
export class TrxConfigPurpose {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,54 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("trx_config_rates", { schema: "trx" })
|
|
||||||
export class TrxConfigRate {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
from: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
to: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
type: "float8",
|
|
||||||
})
|
|
||||||
value: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_relations", { schema: "trx" })
|
|
||||||
export class TrxConfigRelation {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_religions", { schema: "trx" })
|
|
||||||
export class TrxConfigReligion {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_source_incomes", { schema: "trx" })
|
|
||||||
export class TrxConfigSourceIncome {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,50 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxLanguage } from "./trx_languages";
|
|
||||||
import { TrxConfigLanguage } from "./trx_config_language";
|
|
||||||
|
|
||||||
@Entity("trx_config_strs", { schema: "trx" })
|
|
||||||
export class TrxConfigStr {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({ type: "smallint", default: 0 })
|
|
||||||
level: Number;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigLanguage, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
language: TrxConfigLanguage;
|
|
||||||
|
|
||||||
@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,63 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("trx_languages", { schema: "trx" })
|
|
||||||
export class TrxLanguage {
|
|
||||||
@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,58 +0,0 @@
|
|||||||
import bcrypt from "bcryptjs";
|
|
||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
@Entity("trx_otp_emails", { schema: "trx" })
|
|
||||||
export class TrxOtpEmail {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
unique: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
codeid: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
otp: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
expired: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
status: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
hashOtp() {
|
|
||||||
this.otp = bcrypt.hashSync(this.otp, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfOtpMatch(unencryptedOtp: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedOtp, this.otp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,57 +0,0 @@
|
|||||||
import bcrypt from "bcryptjs";
|
|
||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
|
||||||
|
|
||||||
@Entity("trx_otp_numbers", { schema: "trx" })
|
|
||||||
export class TrxOtpNumber {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
unique: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
codeid: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
otp: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
})
|
|
||||||
expired: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
default: false,
|
|
||||||
})
|
|
||||||
status: boolean;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
hashOtp() {
|
|
||||||
this.otp = bcrypt.hashSync(this.otp, 8);
|
|
||||||
}
|
|
||||||
|
|
||||||
checkIfOtpMatch(unencryptedOtp: string) {
|
|
||||||
return bcrypt.compareSync(unencryptedOtp, this.otp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxPartner } from "./trx_partners";
|
|
||||||
import { TrxCif } from "./trx_cifs";
|
|
||||||
|
|
||||||
@Entity("trx_partner_accounts", { schema: "trx" })
|
|
||||||
export class TrxPartnerAccount {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxPartner, (partner) => partner.partner_account, { onDelete: "RESTRICT" })
|
|
||||||
@JoinColumn()
|
|
||||||
partner: TrxPartner;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCif, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinTable()
|
|
||||||
cif: TrxCif;
|
|
||||||
|
|
||||||
@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,63 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
|
||||||
|
|
||||||
import { ActivityType } from "../types/action";
|
|
||||||
import { TrxPartnerUser } from "./trx_partner_users";
|
|
||||||
|
|
||||||
@Entity("trx_partner_user_activities", { schema: "trx" })
|
|
||||||
export class TrxPartnerUserActivity {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxPartnerUser, { onDelete: "NO ACTION", nullable: false })
|
|
||||||
@JoinColumn()
|
|
||||||
user: TrxPartnerUser;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
type: "uuid",
|
|
||||||
})
|
|
||||||
refresh_token: string;
|
|
||||||
|
|
||||||
@Index()
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 512,
|
|
||||||
})
|
|
||||||
module: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 2048,
|
|
||||||
})
|
|
||||||
description: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 1,
|
|
||||||
})
|
|
||||||
action: ActivityType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 2048,
|
|
||||||
})
|
|
||||||
url: String;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "text",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
data_body: 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("trx_partner_user_refresh_tokens", { schema: "trx" })
|
|
||||||
export class TrxPartnerUserRefreshToken {
|
|
||||||
@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,90 +0,0 @@
|
|||||||
import bcrypt from "bcryptjs";
|
|
||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, ManyToOne, OneToMany, JoinTable } from "typeorm";
|
|
||||||
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxPartner } from "./trx_partners";
|
|
||||||
|
|
||||||
@Entity("trx_partner_users", { schema: "trx" })
|
|
||||||
export class TrxPartnerUser {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
select: false,
|
|
||||||
})
|
|
||||||
password: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
username: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
unique: false,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxPartner, { onDelete: "RESTRICT" })
|
|
||||||
@JoinTable()
|
|
||||||
partner: TrxPartner;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
type: "jsonb",
|
|
||||||
nullable: true,
|
|
||||||
})
|
|
||||||
level: string[];
|
|
||||||
|
|
||||||
@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,88 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxCompany } from "./trx_companies";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxCif } from "./trx_cifs";
|
|
||||||
import { TrxPartnerType } from "../types/trx";
|
|
||||||
import { TrxPartnerAccount } from "./trx_partner_accounts";
|
|
||||||
|
|
||||||
@Entity("trx_partners", { schema: "trx" })
|
|
||||||
export class TrxPartner {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@OneToMany(() => TrxPartnerAccount, (partner_account) => partner_account.partner, { cascade: true, nullable: false })
|
|
||||||
partner_account: TrxPartnerAccount[];
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
type: TrxPartnerType;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
pic_name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
pic_phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
unique: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
pic_email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
address: 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,85 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxConfigNationality } from "./trx_config_nationalities";
|
|
||||||
import { TrxConfigBank } from "./trx_config_banks";
|
|
||||||
import { TrxTransaction } from "./trx_transactions";
|
|
||||||
|
|
||||||
@Entity("trx_recepients", { schema: "trx" })
|
|
||||||
export class TrxRecepient {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxTransaction, (transaction) => transaction.recepient, { onDelete: "CASCADE" })
|
|
||||||
transaction: TrxTransaction;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigBank, { onDelete: "NO ACTION", nullable: false })
|
|
||||||
@JoinColumn()
|
|
||||||
bank: TrxConfigBank;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigNationality, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
nationality: TrxConfigNationality;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
account_number: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
iban: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
address: 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,39 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxRegionMunisipo } from "./trx_region_munisipos";
|
|
||||||
|
|
||||||
@Entity("trx_region_administrativus", { schema: "trx" })
|
|
||||||
export class TrxRegionAdministrativu {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxRegionMunisipo, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
munisipo: TrxRegionMunisipo;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxRegionSuco } from "./trx_region_sucos";
|
|
||||||
|
|
||||||
@Entity("trx_region_aldeias", { schema: "trx" })
|
|
||||||
export class TrxRegionAldeia {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxRegionSuco, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
suco: TrxRegionSuco;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
|
|
||||||
@Entity("trx_region_munisipos", { schema: "trx" })
|
|
||||||
export class TrxRegionMunisipo {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, ManyToOne, JoinColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxRegionAdministrativu } from "./trx_region_administrativus";
|
|
||||||
|
|
||||||
@Entity("trx_region_sucos", { schema: "trx" })
|
|
||||||
export class TrxRegionSuco {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxRegionAdministrativu, { onDelete: "NO ACTION" })
|
|
||||||
@JoinColumn()
|
|
||||||
administrativu: TrxRegionAdministrativu;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxCompany } from "./trx_companies";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxCif } from "./trx_cifs";
|
|
||||||
|
|
||||||
@Entity("trx_registrations", { schema: "trx" })
|
|
||||||
export class TrxRegistration {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCompany, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
company: TrxCompany;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxCif, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
cif: TrxCif;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: Status;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
registration_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
registration_by: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { Status } from "../types/status";
|
|
||||||
import { TrxConfigNationality } from "./trx_config_nationalities";
|
|
||||||
import { TrxPartnerAccount } from "./trx_partner_accounts";
|
|
||||||
import { TrxTransaction } from "./trx_transactions";
|
|
||||||
import { TrxConfigBank } from "./trx_config_banks";
|
|
||||||
|
|
||||||
@Entity("trx_senders", { schema: "trx" })
|
|
||||||
export class TrxSender {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxTransaction, (transaction) => transaction.sender, { onDelete: "CASCADE" })
|
|
||||||
transaction: TrxTransaction;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigNationality, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
nationality: TrxConfigNationality;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxPartnerAccount, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
partner_account: TrxPartnerAccount;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigBank, { onDelete: "NO ACTION", nullable: false })
|
|
||||||
@JoinColumn()
|
|
||||||
bank: TrxConfigBank;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
name: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
phone: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
email: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
address: 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,50 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxTransaction } from "./trx_transactions";
|
|
||||||
|
|
||||||
@Entity("trx_swifts", { schema: "trx" })
|
|
||||||
export class TrxSwift {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
invoice: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
bic: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 4096,
|
|
||||||
})
|
|
||||||
file: string;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxTransaction, (transaction) => transaction.swift, { onDelete: "CASCADE" })
|
|
||||||
transaction: TrxTransaction;
|
|
||||||
|
|
||||||
@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 { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxConfigSourceIncome } from "./trx_config_source_incomes";
|
|
||||||
import { TrxTransaction } from "./trx_transactions";
|
|
||||||
import { TrxTransactionTypeStatus, TrxTransactionCorrespondentFees, TrxTransactionStatus } from "../types/trx";
|
|
||||||
|
|
||||||
@Entity("trx_transaction_amounts", { schema: "trx" })
|
|
||||||
export class TrxTransactionAmount {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
type_transaction: TrxTransactionTypeStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
correspondent_fees: string;
|
|
||||||
|
|
||||||
@Column({ type: "float8" })
|
|
||||||
amount_overbooking: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
transfer_amount: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
transfer_total: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
commission: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
cost_of_sender: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: true })
|
|
||||||
sub_total: number;
|
|
||||||
|
|
||||||
@Column({ type: "float8", nullable: false, default: 0 })
|
|
||||||
rate: number;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxTransaction, (transaction) => transaction.transaction_amount, { onDelete: "CASCADE" })
|
|
||||||
transaction: TrxTransaction;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxConfigSourceIncome, { onDelete: "NO ACTION", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
source_income: TrxConfigSourceIncome;
|
|
||||||
|
|
||||||
@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,150 +0,0 @@
|
|||||||
import { Column, CreateDateColumn, DeleteDateColumn, Entity, JoinColumn, ManyToOne, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from "typeorm";
|
|
||||||
import { TrxTransactionTransferStatus, TrxTransactionStatus } from "../types/trx";
|
|
||||||
import { TrxPartner } from "./trx_partners";
|
|
||||||
import { TrxAuthenticator } from "./trx_authenticators";
|
|
||||||
import { TrxSender } from "./trx_senders";
|
|
||||||
import { TrxRecepient } from "./trx_recepients";
|
|
||||||
import { TrxSwift } from "./trx_swifts";
|
|
||||||
import { TrxTransactionAmount } from "./trx_transaction_amounts";
|
|
||||||
|
|
||||||
@Entity("trx_transactions", { schema: "trx" })
|
|
||||||
export class TrxTransaction {
|
|
||||||
@PrimaryGeneratedColumn("uuid")
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxAuthenticator, { onDelete: "RESTRICT", nullable: true })
|
|
||||||
@JoinColumn()
|
|
||||||
authenticator: TrxAuthenticator;
|
|
||||||
|
|
||||||
@ManyToOne(() => TrxPartner, { onDelete: "RESTRICT", nullable: false })
|
|
||||||
@JoinColumn()
|
|
||||||
partner: TrxPartner;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxSender, (sender) => sender.transaction, { cascade: true })
|
|
||||||
@JoinColumn()
|
|
||||||
sender: TrxSender;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxRecepient, (recepient) => recepient.transaction, { cascade: true })
|
|
||||||
@JoinColumn()
|
|
||||||
recepient: TrxRecepient;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxTransactionAmount, (transaction_amount) => transaction_amount.transaction, { cascade: true })
|
|
||||||
@JoinColumn()
|
|
||||||
transaction_amount: TrxTransactionAmount;
|
|
||||||
|
|
||||||
@OneToOne(() => TrxSwift, (swift) => swift.transaction, { cascade: true })
|
|
||||||
@JoinColumn()
|
|
||||||
swift: TrxSwift;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
unique: true,
|
|
||||||
})
|
|
||||||
code: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
type_transfer: TrxTransactionTransferStatus;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
is_maker_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
maker_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 4096, nullable: true })
|
|
||||||
maker_note: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
maker_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
is_checker_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
checker_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 4096, nullable: true })
|
|
||||||
checker_note: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
checker_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
default: null,
|
|
||||||
})
|
|
||||||
is_signer_approved: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
signer_approved_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 4096, nullable: true })
|
|
||||||
signer_note: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
signer_approved_at: Date;
|
|
||||||
|
|
||||||
@Column({ type: "boolean", nullable: true })
|
|
||||||
is_release: boolean;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 100, nullable: true })
|
|
||||||
release_by: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 4096, nullable: true })
|
|
||||||
release_note: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
release_at: Date;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: true,
|
|
||||||
length: 256,
|
|
||||||
})
|
|
||||||
release_file: string;
|
|
||||||
|
|
||||||
@Column({ type: "varchar", length: 4096, nullable: true })
|
|
||||||
remark: string;
|
|
||||||
|
|
||||||
@Column({
|
|
||||||
nullable: false,
|
|
||||||
length: 64,
|
|
||||||
})
|
|
||||||
status: TrxTransactionStatus;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
transaction_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
transaction_by: string;
|
|
||||||
|
|
||||||
@Column()
|
|
||||||
@CreateDateColumn()
|
|
||||||
created_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
created_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@UpdateDateColumn()
|
|
||||||
updated_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
updated_by: string;
|
|
||||||
|
|
||||||
@Column({ nullable: true })
|
|
||||||
@DeleteDateColumn()
|
|
||||||
deleted_at: Date;
|
|
||||||
|
|
||||||
@Column({ nullable: true, length: 256 })
|
|
||||||
deleted_by: string;
|
|
||||||
}
|
|
||||||
@ -1,48 +1,3 @@
|
|||||||
export * from "../entity/trx_companies";
|
|
||||||
export * from "../entity/trx_company_users";
|
|
||||||
export * from "../entity/trx_company_user_activity";
|
|
||||||
export * from "../entity/trx_company_user_refresh_token";
|
|
||||||
export * from "../entity/trx_company_accounts";
|
|
||||||
export * from "../entity/trx_otp_email";
|
|
||||||
export * from "../entity/trx_otp_number";
|
|
||||||
export * from "../entity/trx_cifs";
|
|
||||||
export * from "../entity/trx_languages";
|
|
||||||
export * from "../entity/trx_config_booms";
|
|
||||||
export * from "../entity/trx_config_business_entities";
|
|
||||||
export * from "../entity/trx_config_business_fields";
|
|
||||||
export * from "../entity/trx_config_channels";
|
|
||||||
export * from "../entity/trx_config_educations";
|
|
||||||
export * from "../entity/trx_config_identity_types";
|
|
||||||
export * from "../entity/trx_config_munisipos";
|
|
||||||
export * from "../entity/trx_config_banks";
|
|
||||||
export * from "../entity/trx_config_nationalities";
|
|
||||||
export * from "../entity/trx_config_levels";
|
|
||||||
export * from "../entity/trx_config_occupations";
|
|
||||||
export * from "../entity/trx_config_products";
|
|
||||||
export * from "../entity/trx_config_purposes";
|
|
||||||
export * from "../entity/trx_config_language";
|
|
||||||
export * from "../entity/trx_config_rate";
|
|
||||||
export * from "../entity/trx_config_relations";
|
|
||||||
export * from "../entity/trx_config_religions";
|
|
||||||
export * from "../entity/trx_config_source_incomes";
|
|
||||||
export * from "../entity/trx_config_strs";
|
|
||||||
export * from "../entity/trx_region_munisipos";
|
|
||||||
export * from "../entity/trx_region_administrativus";
|
|
||||||
export * from "../entity/trx_region_aldeias";
|
|
||||||
export * from "../entity/trx_region_sucos";
|
|
||||||
export * from "../entity/trx_registration";
|
|
||||||
export * from "../entity/trx_transactions";
|
|
||||||
export * from "../entity/trx_transaction_amounts";
|
|
||||||
export * from "../entity/trx_senders";
|
|
||||||
export * from "../entity/trx_recepients";
|
|
||||||
export * from "../entity/trx_swifts";
|
|
||||||
export * from "../entity/trx_authenticators";
|
|
||||||
export * from "../entity/trx_partners";
|
|
||||||
export * from "../entity/trx_partner_accounts";
|
|
||||||
export * from "../entity/trx_partner_user_activities";
|
|
||||||
export * from "../entity/trx_partner_user_refresh_tokens";
|
|
||||||
export * from "../entity/trx_partner_users";
|
|
||||||
|
|
||||||
export * from "../entity/trx_verifications";
|
export * from "../entity/trx_verifications";
|
||||||
export * from "../entity/trx_customers";
|
export * from "../entity/trx_customers";
|
||||||
export * from "../entity/trx_customer_accounts";
|
export * from "../entity/trx_customer_accounts";
|
||||||
|
|||||||
Reference in New Issue
Block a user