18 lines
714 B
TypeScript
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;
|
|
}
|
|
}
|