update tbale
This commit is contained in:
@ -9,13 +9,13 @@ export class Administrativu {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 128
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@ -9,13 +9,13 @@ export class Aldeia {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 128
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@ -1,4 +1,13 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from 'typeorm';
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } 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 {
|
||||
@ -23,34 +32,18 @@ export class CifAccount {
|
||||
})
|
||||
account_number: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 128
|
||||
})
|
||||
branch_code: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 128
|
||||
})
|
||||
branch_name: string;
|
||||
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
branch: Branch
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
})
|
||||
open_date: Date;
|
||||
|
||||
@Column({
|
||||
type: 'int4',
|
||||
nullable: true,
|
||||
})
|
||||
product_type: number;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256
|
||||
})
|
||||
product_description: string;
|
||||
@ManyToOne(() => Product, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
product: Product
|
||||
|
||||
@Column({
|
||||
type: 'float8',
|
||||
@ -76,11 +69,9 @@ export class CifAccount {
|
||||
})
|
||||
exposed_person_flag: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 128
|
||||
})
|
||||
income_tiering: string;
|
||||
@ManyToOne(() => IncomeTier, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
income_tier: IncomeTier
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
@ -105,41 +96,29 @@ export class CifAccount {
|
||||
})
|
||||
birth_date: Date;
|
||||
|
||||
@Column({
|
||||
// type: 'uuid',
|
||||
nullable: true,
|
||||
})
|
||||
economic_sub_clasification: string;
|
||||
@ManyToOne(() => ClassEconomi, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
class_economi: ClassEconomi
|
||||
|
||||
@Column({
|
||||
// type: 'uuid',
|
||||
nullable: true,
|
||||
})
|
||||
district: string;
|
||||
@ManyToOne(() => District, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
district: District
|
||||
|
||||
@Column({
|
||||
// type: 'uuid',
|
||||
nullable: true,
|
||||
})
|
||||
munisipiu: string;
|
||||
@ManyToOne(() => Munisipo, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
munisipiu: Munisipo
|
||||
|
||||
@Column({
|
||||
// type: 'uuid',
|
||||
nullable: true,
|
||||
})
|
||||
administrativu: string;
|
||||
@ManyToOne(() => Administrativu, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
administrativu: Administrativu
|
||||
|
||||
@Column({
|
||||
// type: 'uuid',
|
||||
nullable: true,
|
||||
})
|
||||
suco: string;
|
||||
@ManyToOne(() => Suco, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
suco: Suco
|
||||
|
||||
@Column({
|
||||
// type: 'uuid',
|
||||
nullable: true,
|
||||
})
|
||||
aldeia: string;
|
||||
@ManyToOne(() => Aldeia, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
aldeia: Aldeia
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
|
||||
@ -9,13 +9,13 @@ export class ClassEconomi {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 256
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@ -9,13 +9,13 @@ export class District {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 128
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@ -9,13 +9,13 @@ export class IncomeTier {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 128
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from 'typeorm';
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm';
|
||||
import { Product } from './products';
|
||||
|
||||
@Entity('lnkolek')
|
||||
export class LNKOLEK {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false
|
||||
})
|
||||
type: string;
|
||||
@ManyToOne(() => Product, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
product: Product
|
||||
|
||||
@Column({
|
||||
type: 'float',
|
||||
nullable: false
|
||||
})
|
||||
rate: string;
|
||||
rate: number;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
@ -34,18 +34,6 @@ export class LNKOLEK {
|
||||
})
|
||||
loan_number: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 4
|
||||
})
|
||||
branch_code: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 128
|
||||
})
|
||||
branch_name: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
@ -99,13 +87,13 @@ export class LNKOLEK {
|
||||
|
||||
@Column({
|
||||
type: 'float',
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
})
|
||||
ppap_percent: number;
|
||||
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
})
|
||||
ppap: string;
|
||||
|
||||
|
||||
@ -19,12 +19,30 @@ export class LogPull {
|
||||
})
|
||||
filename: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 32
|
||||
})
|
||||
branch_code: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 32
|
||||
})
|
||||
date_index: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
default: false
|
||||
})
|
||||
is_file_deleted: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: 'text'
|
||||
})
|
||||
error_log: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64
|
||||
@ -35,6 +53,15 @@ export class LogPull {
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column()
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
scheduled_at: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
|
||||
@ -9,13 +9,13 @@ export class Munisipo {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 128
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
@ -9,13 +9,13 @@ export class Suco {
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 32
|
||||
length: 128
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 128
|
||||
length: 256
|
||||
})
|
||||
name: string;
|
||||
|
||||
|
||||
89
src/entity/trial_balance_branch.ts
Normal file
89
src/entity/trial_balance_branch.ts
Normal file
@ -0,0 +1,89 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm';
|
||||
import { Branch } from './branchs';
|
||||
|
||||
@Entity('trial_balance_branch')
|
||||
export class TrialBalanceBranch {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64
|
||||
})
|
||||
ledger: string;
|
||||
|
||||
@ManyToOne(() => Branch, { onDelete: "RESTRICT" })
|
||||
@JoinColumn()
|
||||
branch: Branch
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 256
|
||||
})
|
||||
description: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 32
|
||||
})
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 1
|
||||
})
|
||||
dc: string;
|
||||
|
||||
@Column({
|
||||
type: 'float8',
|
||||
nullable: false,
|
||||
})
|
||||
initial_balance: number;
|
||||
|
||||
@Column({
|
||||
type: 'float8',
|
||||
nullable: false,
|
||||
})
|
||||
debet_transaction: number;
|
||||
|
||||
@Column({
|
||||
type: 'float8',
|
||||
nullable: false,
|
||||
})
|
||||
credit_transaction: number;
|
||||
|
||||
@Column({
|
||||
type: 'float8',
|
||||
nullable: false,
|
||||
})
|
||||
closing_balance: number;
|
||||
|
||||
@Column({
|
||||
type: 'float8',
|
||||
nullable: false,
|
||||
})
|
||||
closing_balance_eq: number;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 3
|
||||
})
|
||||
currency: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
})
|
||||
position_date: Date;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column()
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
}
|
||||
@ -1,7 +1,8 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn } from 'typeorm';
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, JoinColumn, ManyToOne } from 'typeorm';
|
||||
import { Branch } from './branchs';
|
||||
|
||||
@Entity('trial_balance')
|
||||
export class TrialBalance {
|
||||
@Entity('trial_balance_consolidation')
|
||||
export class TrialBalanceConsolidation {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@ -12,19 +13,19 @@ export class TrialBalance {
|
||||
ledger: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
length: 256
|
||||
})
|
||||
description: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
length: 32
|
||||
})
|
||||
type: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
length: 1
|
||||
})
|
||||
dc: string;
|
||||
@ -1,6 +1,7 @@
|
||||
import { CifAccount } from "./entity/cif_account";
|
||||
import { LNKOLEK } from "./entity/lnkolek";
|
||||
import { TrialBalance } from "./entity/trial_balance";
|
||||
import { TrialBalanceBranch } from "./entity/trial_balance_branch";
|
||||
import { TrialBalanceConsolidation } from "./entity/trial_balance_consolidation";
|
||||
import { UserActivity } from "./entity/user_activity";
|
||||
import { UserRefreshToken } from "./entity/user_refresh_token";
|
||||
import { User } from "./entity/users";
|
||||
@ -29,7 +30,8 @@ export {
|
||||
UserRole,
|
||||
UserActivity,
|
||||
UserRefreshToken,
|
||||
TrialBalance,
|
||||
TrialBalanceBranch,
|
||||
TrialBalanceConsolidation,
|
||||
LNKOLEK,
|
||||
CifAccount,
|
||||
ActivityType,
|
||||
|
||||
Reference in New Issue
Block a user