Skip to content

Commit

Permalink
Merge pull request #194 from RJ-SMTR/feature/#192-pagador-transacao
Browse files Browse the repository at this point in the history
feat: entities cnab
  • Loading branch information
williamfl2007 committed Feb 27, 2024
2 parents 201e553 + 9f3c531 commit dabf084
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 0 deletions.
62 changes: 62 additions & 0 deletions src/cnab/entities/cliente-favorecido.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { EntityHelper } from 'src/utils/entity-helper';
import { Column, DeepPartial, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('Cliente_Favorecido')
export class ClienteFavorecido extends EntityHelper {
constructor(
clienteFavorecido?: ClienteFavorecido | DeepPartial<ClienteFavorecido>,
) {
super();
if (clienteFavorecido !== undefined) {
Object.assign(this, clienteFavorecido);
}
}

@PrimaryGeneratedColumn()
id_cliente_favorecido: number;

@Column({ type: String, unique: false, nullable: false, length: 150 })
nome: string;

@Column({ type: String, unique: false, nullable: true, length: 14 })
cpf_cnpj: string;

@Column({ type: String, unique: false, nullable: true, length: 10 })
cod_banco: string;

@Column({ type: String, unique: false, nullable: true, length: 5 })
agencia: string;

@Column({ type: String, unique: false, nullable: true, length: 2 })
dv_agencia: string;

@Column({ type: String, unique: false, nullable: true, length: 12 })
conta_corrente: string;

@Column({ type: String, unique: false, nullable: true, length: 2 })
dv_conta_corrente: string;

@Column({ type: String, unique: false, nullable: true, length: 200 })
logradouro: string;

@Column({ type: String, unique: false, nullable: true, length: 15 })
numero: string;

@Column({ type: String, unique: false, nullable: true, length: 100 })
complemento: string;

@Column({ type: String, unique: false, nullable: true, length: 150 })
bairro: string;

@Column({ type: String, unique: false, nullable: true, length: 150 })
cidade: string;

@Column({ type: String, unique: false, nullable: true, length: 5 })
cep: string;

@Column({ type: String, unique: false, nullable: true, length: 3 })
complemento_cep: string;

@Column({ type: String, unique: false, nullable: true, length: 2 })
uf: string;
}
54 changes: 54 additions & 0 deletions src/cnab/entities/pagador.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { EntityHelper } from 'src/utils/entity-helper';
import { Column, DeepPartial, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity('Pagador')
export class Pagador extends EntityHelper {
constructor(pagador?: Pagador | DeepPartial<Pagador>) {
super();
if (pagador !== undefined) {
Object.assign(this, pagador);
}
}

@PrimaryGeneratedColumn()
id_pagador: number;

@Column({ type: String, unique: false, nullable: false, length: 150 })
nome_empresa: string;

@Column({ type: String, unique: false, nullable: true, length: 5 })
agencia: string;

@Column({ type: String, unique: false, nullable: true, length: 2 })
dv_agencia: string;

@Column({ type: String, unique: false, nullable: true, length: 12 })
conta: string;

@Column({ type: String, unique: false, nullable: true, length: 2 })
dv_conta: string;

@Column({ type: String, unique: false, nullable: true, length: 200 })
logradouro: string;

@Column({ type: String, unique: false, nullable: true, length: 15 })
numero: string;

@Column({ type: String, unique: false, nullable: true, length: 100 })
complemento: string;

@Column({ type: String, unique: false, nullable: true, length: 150 })
bairro: string;

@Column({ type: String, unique: false, nullable: true, length: 150 })
cidade: string;

@Column({ type: String, unique: false, nullable: true, length: 5 })
cep: string;

@Column({ type: String, unique: false, nullable: true, length: 3 })
complemento_cep: string;

@Column({ type: String, unique: false, nullable: true, length: 2 })
uf: string;
}
105 changes: 105 additions & 0 deletions src/cnab/entities/transacao.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { EntityHelper } from 'src/utils/entity-helper';
import { Column, DeepPartial, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class Transacao extends EntityHelper {
constructor(transacao?: Transacao | DeepPartial<Transacao>) {
super();
if (transacao !== undefined) {
Object.assign(this, transacao);
}
}

@PrimaryGeneratedColumn()
id_transacao: number;

@Column({ type: String, unique: false, nullable: true })
dt_ordem: string;

@Column({ type: String, unique: false, nullable: true })
dt_pagamento: string;

@Column({ type: String, unique: false, nullable: true, length: 200 })
nome_consorcio: string;

@Column({ type: String, unique: false, nullable: true, length: 200 })
nome_operadora: string;

@Column({ type: String, unique: false, nullable: true, length: 150 })
servico: string;

@Column({ type: Number, unique: true, nullable: true, length: 150 })
id_ordem_ressarcimento: number;

@Column({ type: Number, unique: false, nullable: true, length: 150 })
qtde_transacao_rateio_credito: number;

@Column({
type: Number,
unique: false,
nullable: true,
precision: 10,
scale: 2,
})
vlr_rateio_credito: number;

@Column({ type: Number, unique: false, nullable: true, length: 150 })
qtde_transacao_rateio_debito: number;

@Column({
type: Number,
unique: false,
nullable: true,
precision: 10,
scale: 2,
})
vlr_rateio_debito: number;

@Column({
type: Number,
unique: false,
nullable: true,
precision: 10,
scale: 2,
})
quantidade_total_transacao: number;

@Column({ type: Number, unique: false, nullable: true })
vlr_total_transacao_bruto: number;

@Column({
type: Number,
unique: false,
nullable: true,
precision: 10,
scale: 2,
})
vlr_desconto_taxa: number;

@Column({
type: Number,
unique: false,
nullable: true,
precision: 10,
scale: 2,
})
vlr_total_transacao_liquido: number;

@Column({ type: Number, unique: false, nullable: true })
qtde_total_transacao_captura: number;

@Column({
type: Number,
unique: false,
nullable: true,
precision: 10,
scale: 2,
})
vlr_total_transacao_captura: number;

@Column({ type: String, unique: false, nullable: true, length: 100 })
indicador_ordem_valida: string;

@Column({ type: Number, unique: false, nullable: true })
id_pagador: number;
}

0 comments on commit dabf084

Please sign in to comment.