add: admin shop shipment
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { IShop } from "./models/Abstraction/IShop";
|
||||
import { IShop, OwnerRef } from "./models/Abstraction/IShop";
|
||||
import { ShopModel } from "./models/shop.model";
|
||||
import { BaseRepository } from "../../common/base/repository";
|
||||
|
||||
@@ -10,6 +10,10 @@ export class ShopRepo extends BaseRepository<IShop> {
|
||||
async findWithShopcode(shopCode: number) {
|
||||
return this.model.findOne({ shopCode }, { _id: 1, shopName: 1, shopCode: 1, shopDescription: 1, logo: 1 });
|
||||
}
|
||||
|
||||
async findAdminShop() {
|
||||
return this.model.findOne({ ownerRef: OwnerRef.ADMIN }).populate({ path: "shipmentMethod" });
|
||||
}
|
||||
}
|
||||
|
||||
export function createShopRepo(): ShopRepo {
|
||||
|
||||
Reference in New Issue
Block a user