stashing code

This commit is contained in:
user
2025-10-20 17:07:41 +03:00
commit f5b99afc8f
890 changed files with 54823 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import type { NewOrderModel } from "../data/entities";
import type { OrderRepository } from "../data/repository";
export class OrderController {
private repo: OrderRepository;
constructor(repo: OrderRepository) {
this.repo = repo;
}
async listActiveOrdersWithOnlyPrices() {
return this.repo.listActiveOrders();
}
async createOrder(payload: NewOrderModel) {
return this.repo.createOrder(payload);
}
async getOrderByPNR(pnr: string) {
return this.repo.getOrderByPNR(pnr);
}
async markOrdersAsFulfilled(oids: number[]) {
throw new Error("NOT YET IMPLEMENTED");
// return this.repo.markAgentsOrderAsFulfilled(oid);
}
async deleteOrder(id: number) {
return this.repo.deleteOrder(id);
}
}