From 23c047b63e1159374da3343e171ac8823e3bd481 Mon Sep 17 00:00:00 2001 From: luying Date: Tue, 26 Jul 2022 16:09:52 +0800 Subject: [PATCH] =?UTF-8?q?clear=EF=BC=9A=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9A=84=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shared/db/DicShopList.ts | 36 ------------------------------------ shared/db/LadderMatchRec.ts | 1 - 2 files changed, 37 deletions(-) delete mode 100644 shared/db/DicShopList.ts diff --git a/shared/db/DicShopList.ts b/shared/db/DicShopList.ts deleted file mode 100644 index b28575299..000000000 --- a/shared/db/DicShopList.ts +++ /dev/null @@ -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, keyof DicShopList>{} -export type DicShopListParam = Partial; diff --git a/shared/db/LadderMatchRec.ts b/shared/db/LadderMatchRec.ts index 911767568..6f01d4f1f 100644 --- a/shared/db/LadderMatchRec.ts +++ b/shared/db/LadderMatchRec.ts @@ -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 {