Files
PDV/apps/api/src/modules/customer/customer.repository.ts
T
2026-09-30 14:45:10 -05:00

18 lines
714 B
TypeScript

import { Injectable } from "@nestjs/common";
import { BaseRepository } from "../../common/base.repository.js";
import type { CreateCustomerInput, UpdateCustomerInput } from "../../dtos/customer.dto.js";
import type { Customer, CustomerKey } from "../../entities/customer.entity.js";
import type { ICustomerRepository } from "./interfaces/customer-repository.interface.js";
@Injectable()
export class CustomerRepository
extends BaseRepository<Customer, CreateCustomerInput, UpdateCustomerInput, CustomerKey>
implements ICustomerRepository
{
protected readonly columns = ["id", "name", "phone", "email", "taxId", "createdAt"] as const;
protected get model() {
return this.db.orm.public.Customer;
}
}