mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-09 01:18:18 +00:00
chore: setup repos for invoice
This commit is contained in:
@@ -4,11 +4,14 @@ import { TypeOrmModule } from "@nestjs/typeorm";
|
|||||||
import { BillingController } from "./billing.controller";
|
import { BillingController } from "./billing.controller";
|
||||||
import { BillingService } from "./billing.service";
|
import { BillingService } from "./billing.service";
|
||||||
import { Invoice } from "./entities/invoice.entity";
|
import { Invoice } from "./entities/invoice.entity";
|
||||||
|
import { InvoiceLine } from "./entities/invoice-line.entity";
|
||||||
|
import { InvoiceRepository } from "./invoice.repository";
|
||||||
|
import { InvoiceLineRepository } from "./invoice-line.repository";
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [TypeOrmModule.forFeature([Invoice])],
|
imports: [TypeOrmModule.forFeature([Invoice, InvoiceLine])],
|
||||||
controllers: [BillingController],
|
controllers: [BillingController],
|
||||||
providers: [BillingService],
|
providers: [BillingService, InvoiceRepository, InvoiceLineRepository],
|
||||||
exports: [BillingService],
|
exports: [BillingService],
|
||||||
})
|
})
|
||||||
export class BillingModule {}
|
export class BillingModule {}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { BaseRepository } from "@edr/api-common";
|
||||||
|
import { Injectable } from "@nestjs/common";
|
||||||
|
import { InjectRepository } from "@nestjs/typeorm";
|
||||||
|
import { Repository } from "typeorm";
|
||||||
|
|
||||||
|
import { InvoiceLine } from "./entities/invoice-line.entity";
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class InvoiceLineRepository extends BaseRepository<InvoiceLine> {
|
||||||
|
constructor(
|
||||||
|
@InjectRepository(InvoiceLine) repository: Repository<InvoiceLine>,
|
||||||
|
) {
|
||||||
|
super(repository);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { BaseRepository } from "@edr/api-common";
|
||||||
|
import { Injectable } from "@nestjs/common";
|
||||||
|
import { InjectRepository } from "@nestjs/typeorm";
|
||||||
|
import { Repository } from "typeorm";
|
||||||
|
|
||||||
|
import { Invoice } from "./entities/invoice.entity";
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class InvoiceRepository extends BaseRepository<Invoice> {
|
||||||
|
constructor(
|
||||||
|
@InjectRepository(Invoice) repository: Repository<Invoice>,
|
||||||
|
) {
|
||||||
|
super(repository);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user