活动:寻宝骑兵活动接口
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import ActivityShop from './ActivityShop';
|
||||
import { index, getModelForClass, prop, DocumentType } from '@typegoose/typegoose';
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 活动系统 - 寻宝猎人-商店
|
||||
*/
|
||||
@index({ roleId: 1 })
|
||||
|
||||
export default class Activity_Treasure_Hunt_Shop extends ActivityShop {
|
||||
@prop({ required: true })
|
||||
dayIndex: number; // 第几天
|
||||
|
||||
//根据活动id查询活动数据
|
||||
public static async findTreasureData(serverId: number, activityId: number, roleId: string, roundIndex: number, dayIndex: number) {
|
||||
let result: ActivityTreasureHuntShopModelType = await ActivityTreasureHuntShopModel.findOne({ roleId, activityId, roundIndex, dayIndex }).lean(true);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
export const ActivityTreasureHuntShopModel = getModelForClass(Activity_Treasure_Hunt_Shop);
|
||||
|
||||
export interface ActivityTreasureHuntShopModelType extends Pick<DocumentType<Activity_Treasure_Hunt_Shop>, keyof Activity_Treasure_Hunt_Shop> { }
|
||||
export type ActivityTreasureHuntShopModelTypeParam = Partial<ActivityTreasureHuntShopModelType>; // 将所有字段变成可选项
|
||||
Reference in New Issue
Block a user