update remitance
This commit is contained in:
36
src/entity/remit_otp.ts
Normal file
36
src/entity/remit_otp.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
|
||||
import { Status } from "../types/status";
|
||||
|
||||
@Entity("remit_otp", { schema: "remit" })
|
||||
export class RemitOtp {
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
phone: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
otp: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 256,
|
||||
})
|
||||
expired_at: Date;
|
||||
|
||||
@Column()
|
||||
@CreateDateColumn()
|
||||
created_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@UpdateDateColumn()
|
||||
updated_at: Date;
|
||||
|
||||
@Column({ nullable: true })
|
||||
@DeleteDateColumn()
|
||||
deleted_at: Date;
|
||||
}
|
||||
78
src/entity/remit_partner_users.ts
Normal file
78
src/entity/remit_partner_users.ts
Normal file
@ -0,0 +1,78 @@
|
||||
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 { RemitPartner } from "./remit_partners";
|
||||
|
||||
@Entity("remit_partner_users", { schema: "remit" })
|
||||
export class RemitPartnerUser {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 64,
|
||||
})
|
||||
email: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
length: 64,
|
||||
select: false,
|
||||
})
|
||||
password: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 64,
|
||||
})
|
||||
username: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 64,
|
||||
unique: false,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@ManyToOne(() => RemitPartner, { onDelete: "CASCADE" })
|
||||
@JoinTable()
|
||||
partner: RemitPartner;
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
152
src/entity/remit_partners.ts
Normal file
152
src/entity/remit_partners.ts
Normal file
@ -0,0 +1,152 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, DeleteDateColumn, Index, JoinColumn, ManyToOne } from "typeorm";
|
||||
|
||||
import { Status } from "../types/status";
|
||||
|
||||
@Entity("remit_partners", { schema: "remit" })
|
||||
export class RemitPartner {
|
||||
@PrimaryGeneratedColumn("uuid")
|
||||
id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
length: 256,
|
||||
})
|
||||
code: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: true,
|
||||
length: 256,
|
||||
})
|
||||
name: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
phone: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 4096,
|
||||
})
|
||||
address: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
municipio_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
municipio_name: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
posto_adm_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
posto_adm_name: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
suco_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
suco_name: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
aldeia_id: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
aldeia_name: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
document_type: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
document_number: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
document_file: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
account_number_tl: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
account_name_tl: string;
|
||||
|
||||
@Column({
|
||||
nullable: false,
|
||||
unique: false,
|
||||
length: 256,
|
||||
})
|
||||
pin: 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;
|
||||
}
|
||||
48
src/index.ts
48
src/index.ts
@ -53,26 +53,29 @@ import { CreditConfigInsurance } from "./entity/credit_config_insurance";
|
||||
import { Application } from "./entity/application";
|
||||
import { TellerMutation } from "./entity/teller_mutation";
|
||||
import { LogHikvision } from "./entity/log_hikvision";
|
||||
import { BrivaCompany } from "./entity/briva_companies"
|
||||
import { BrivaCompanyUser } from "./entity/briva_company_users"
|
||||
import { BrivaCompanyUserRefreshToken } from "./entity/briva_company_user_refresh_token"
|
||||
import { BrivaAccount } from './entity/briva_accounts'
|
||||
import { BrivaTransaction } from './entity/briva_transactions'
|
||||
import { AssetSupplier } from './entity/asset_supplier'
|
||||
import { AssetFixedClassification } from './entity/asset_fixed_classification'
|
||||
import { AssetFixedType } from './entity/asset_fixed_type'
|
||||
import { AssetGoodCategory } from './entity/asset_good_category'
|
||||
import { AssetGood } from './entity/asset_good'
|
||||
import { AssetRequestOrderCategory } from './entity/asset_request_order_category'
|
||||
import { AssetRequestOrder } from './entity/asset_request_order'
|
||||
import { AssetRequestOrderGood } from './entity/asset_request_order_good'
|
||||
import { AssetPurchase } from './entity/asset_purchase'
|
||||
import { AssetPurchaseRequestOrder } from './entity/asset_purchase_request_order'
|
||||
import { AssetPurchaseGoodsReceipt } from './entity/asset_purchase_goods_receipt'
|
||||
import { AssetPurchaseGoodReceiptGood } from './entity/asset_purchase_goods_receipt_good'
|
||||
import { AssetPurchaseRealization } from './entity/asset_purchase_realization'
|
||||
import { AssetPurchaseBondRealizationGood } from './entity/asset_purchase_purchase_bond_realization_good'
|
||||
import { AssetPurchaseInvoice } from './entity/asset_purchase_invoice'
|
||||
import { BrivaCompany } from "./entity/briva_companies";
|
||||
import { BrivaCompanyUser } from "./entity/briva_company_users";
|
||||
import { BrivaCompanyUserRefreshToken } from "./entity/briva_company_user_refresh_token";
|
||||
import { BrivaAccount } from "./entity/briva_accounts";
|
||||
import { BrivaTransaction } from "./entity/briva_transactions";
|
||||
import { AssetSupplier } from "./entity/asset_supplier";
|
||||
import { AssetFixedClassification } from "./entity/asset_fixed_classification";
|
||||
import { AssetFixedType } from "./entity/asset_fixed_type";
|
||||
import { AssetGoodCategory } from "./entity/asset_good_category";
|
||||
import { AssetGood } from "./entity/asset_good";
|
||||
import { AssetRequestOrderCategory } from "./entity/asset_request_order_category";
|
||||
import { AssetRequestOrder } from "./entity/asset_request_order";
|
||||
import { AssetRequestOrderGood } from "./entity/asset_request_order_good";
|
||||
import { AssetPurchase } from "./entity/asset_purchase";
|
||||
import { AssetPurchaseRequestOrder } from "./entity/asset_purchase_request_order";
|
||||
import { AssetPurchaseGoodsReceipt } from "./entity/asset_purchase_goods_receipt";
|
||||
import { AssetPurchaseGoodReceiptGood } from "./entity/asset_purchase_goods_receipt_good";
|
||||
import { AssetPurchaseRealization } from "./entity/asset_purchase_realization";
|
||||
import { AssetPurchaseBondRealizationGood } from "./entity/asset_purchase_purchase_bond_realization_good";
|
||||
import { AssetPurchaseInvoice } from "./entity/asset_purchase_invoice";
|
||||
import { RemitOtp } from "./entity/remit_otp";
|
||||
import { RemitPartnerUser } from "./entity/remit_partner_users";
|
||||
import { RemitPartner } from "./entity/remit_partners";
|
||||
|
||||
export {
|
||||
User, //
|
||||
@ -156,5 +159,8 @@ export {
|
||||
AssetPurchaseGoodReceiptGood,
|
||||
AssetPurchaseRealization,
|
||||
AssetPurchaseBondRealizationGood,
|
||||
AssetPurchaseInvoice
|
||||
AssetPurchaseInvoice,
|
||||
RemitOtp,
|
||||
RemitPartnerUser,
|
||||
RemitPartner,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user