first
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { IShop } from "./models/Abstraction/IShop";
|
||||
import { ShopModel } from "./models/shop.model";
|
||||
import { BaseRepository } from "../../common/base/repository";
|
||||
|
||||
export class ShopRepo extends BaseRepository<IShop> {
|
||||
constructor() {
|
||||
super(ShopModel);
|
||||
}
|
||||
|
||||
async findWithShopcode(shopCode: number) {
|
||||
return this.model.findOne({ shopCode }, { _id: 1, shopName: 1, shopCode: 1, shopDescription: 1, logo: 1 });
|
||||
}
|
||||
}
|
||||
|
||||
export function createShopRepo(): ShopRepo {
|
||||
return new ShopRepo();
|
||||
}
|
||||
Reference in New Issue
Block a user