clear:删除无用的参数
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
import BaseModel from './BaseModel';
|
||||
import { index, getModelForClass, prop, DocumentType, modelOptions } from '@typegoose/typegoose';
|
||||
import { ShopItem } from '../domain/dbGeneral';
|
||||
|
||||
/**
|
||||
* 分红记录表
|
||||
**/
|
||||
@modelOptions({ schemaOptions: { id: false } })
|
||||
@index({ shopId: 1 })
|
||||
|
||||
export default class DicShopList extends BaseModel {
|
||||
@prop({ required: true })
|
||||
shopId: number; // 商店id dic_zyz_shopList内的id
|
||||
|
||||
@prop({ required: true, default: false })
|
||||
useJson: boolean; // 如果为true,则会随dic_zyz_shop表内商品增加而增加,items只提供顺序折扣等;为false,则只提供items里的商品
|
||||
|
||||
@prop({ required: true, default: [], _id: false, type: () => ShopItem })
|
||||
items: ShopItem[]; // 商店id dic_zyz_shopList内的id
|
||||
|
||||
// public static async findByShopId(shopId: number) {
|
||||
// const rec: DicShopListType = await DicShopListModel.findOne({ shopId }).lean();
|
||||
// return rec;
|
||||
// }
|
||||
|
||||
// public static async createShop(shopId: number, useJson: boolean, item: ShopItem) {
|
||||
// const rec: DicShopListType = await DicShopListModel.findOneAndUpdate({ shopId }, { useJson, $push: { items: item } }, { new: true, upsert: true }).lean();
|
||||
// return rec;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
export const DicShopListModel = getModelForClass(DicShopList);
|
||||
|
||||
export interface DicShopListType extends Pick<DocumentType<DicShopList>, keyof DicShopList>{}
|
||||
export type DicShopListParam = Partial<DicShopListType>;
|
||||
@@ -3,7 +3,6 @@ import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoos
|
||||
import { LADDER_STATUS } from '../consts';
|
||||
import { LadderDefense, LadderOppPlayerInfo, LadderOppPlayerHeroInfo } from '../domain/battleField/ladder';
|
||||
import { genCode } from '../pubUtils/util';
|
||||
import { LADDER } from '../pubUtils/dicParam';
|
||||
|
||||
@index({ battleCode: 1 })
|
||||
export default class LadderMatchRec extends BaseModel {
|
||||
|
||||
Reference in New Issue
Block a user