-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finalizando inserção das ordens de pagamento
- Loading branch information
1 parent
4698278
commit 39769de
Showing
14 changed files
with
175 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
export class ItemTransacaoDTO { | ||
id_item_transacao: number; | ||
dt_transacao: Date; | ||
dt_processamento: Date; | ||
dt_captura: Date; | ||
nome_consorcio: string; | ||
id_tipo_pagamento: number; | ||
tipo_transacao: string; | ||
valor_item_transacao: number; | ||
id_transacao: number; | ||
id_cliente_favorecido:number; | ||
} |
4 changes: 2 additions & 2 deletions
4
src/cnab/dto/save-pagador.dto.ts → src/cnab/dto/pagador.dto.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
import { EntityHelper } from 'src/utils/entity-helper'; | ||
import { EntityHelper} from 'src/utils/entity-helper'; | ||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; | ||
|
||
@Entity() | ||
export class ItemTransacao extends EntityHelper { | ||
@PrimaryGeneratedColumn() | ||
id_item_transacao: number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
dt_transacao: string; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
dt_processamento: string; | ||
dt_captura: string; | ||
modo: string; | ||
@Column({ type: Date, unique: false, nullable: true }) | ||
dt_captura: Date; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
nome_consorcio: string; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
id_tipo_pagamento: number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
tipo_transacao: string; | ||
@Column({ type: Number, unique: false, nullable: true }) | ||
valor_item_transacao: number; | ||
@Column({ type: String, unique: false, nullable: true }) | ||
id_transacao: number; | ||
} | ||
|
||
function Entity(): ( | ||
target: typeof ItemTransacao, | ||
) => void | typeof ItemTransacao { | ||
throw new Error('Function not implemented.'); | ||
} | ||
@Column({ type: String, unique: false, nullable: true }) | ||
id_cliente_transacao: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Injectable, Logger } from '@nestjs/common'; | ||
import { InjectRepository } from '@nestjs/typeorm'; | ||
import { EntityCondition } from 'src/utils/types/entity-condition.type'; | ||
import { Nullable } from 'src/utils/types/nullable.type'; | ||
import { Repository } from 'typeorm'; | ||
import { ItemTransacao } from '../entity/item-transacao.entity'; | ||
import { ItemTransacaoDTO } from '../dto/item-transacao.dto'; | ||
|
||
@Injectable() | ||
export class ItemTransacaoRepository { | ||
private logger: Logger = new Logger('ItemTransacaoRepository', { | ||
timestamp: true, | ||
}); | ||
|
||
constructor( | ||
@InjectRepository(ItemTransacao) | ||
private itemtransacaoRepository: Repository<ItemTransacao>, | ||
) {} | ||
|
||
public async save(itemTransacao: ItemTransacaoDTO): Promise<ItemTransacao> { | ||
return await this.itemtransacaoRepository.save(itemTransacao); | ||
} | ||
|
||
public async findOne( | ||
fields: EntityCondition<ItemTransacao> | EntityCondition<ItemTransacao>[], | ||
): Promise<Nullable<ItemTransacao>> { | ||
return await this.itemtransacaoRepository.findOne({ | ||
where: fields, | ||
}); | ||
} | ||
|
||
public async findAll(): Promise<ItemTransacao[]> { | ||
return await this.itemtransacaoRepository.find(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// WIP | ||
|
||
import { Injectable } from '@nestjs/common'; | ||
import { ItemTransacaoRepository } from '../repository/item-transacao.repository'; | ||
import { ItemTransacaoDTO } from '../dto/item-transacao.dto'; | ||
import { ItemTransacao } from '../entity/item-transacao.entity'; | ||
|
||
|
||
@Injectable() | ||
export class ItemTransacaoService { | ||
constructor( | ||
private itemtransacaoRepository: ItemTransacaoRepository | ||
) {} | ||
|
||
public async save(itemTransacaoDTO:ItemTransacaoDTO): Promise<ItemTransacao> { | ||
return await this.itemtransacaoRepository.save(itemTransacaoDTO); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,4 @@ export class PagadorService { | |
return pagador; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.