feat(POS-004): completed feature
This commit is contained in:
@@ -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[]> {
|
||||
|
||||
Reference in New Issue
Block a user