feat(POS-004): completed feature

This commit is contained in:
chattie
2026-08-22 13:31:19 +02:00
parent 7ce6465054
commit 955c25d77b
18 changed files with 569 additions and 130 deletions

View File

@@ -2,6 +2,10 @@ import type pg from 'pg';
export type PaymentMethodKind = 'cash' | 'card' | 'other';
export interface PosPaymentMethodRepository {
listByStore(storeId: string): Promise<PosPaymentMethod[]>;
}
export interface PosPaymentMethod {
id: string;
storeId: string;
@@ -43,7 +47,7 @@ function toPaymentMethod(row: PaymentMethodRow): PosPaymentMethod {
};
}
export class PgPaymentMethodRepository {
export class PgPaymentMethodRepository implements PosPaymentMethodRepository {
constructor(private readonly pool: pg.Pool) {}
async listByStore(storeId: string): Promise<PosPaymentMethod[]> {