Files
BuYuHouDuan/CommonDomain/LotteryActivityConfig.cs
T
2026-10-12 16:22:04 +08:00

69 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using CommonDomain.BaseModel;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Bson.Serialization.Options;
using MongoRepository;
using MongoRepository.Attributes;
using MongoRepository.Config;
namespace CommonDomain
{
[BsonIgnoreExtraElements]
public class LotteryActivityConfig
{
public string ActivityName { get; set; } = string.Empty;
public bool IsOpen { get; set; } = false;
public long StartTime { get; set; } = 0;
public long EndTime { get; set; } = 0;
public List<LotteryPoolLevel> Pools { get; set; } = new List<LotteryPoolLevel>();
[BsonDictionaryOptions(DictionaryRepresentation.ArrayOfDocuments)]
public Dictionary<int, List<long>> CostsByPool { get; set; } = new Dictionary<int, List<long>>();
public int UserMaxDraw { get; set; } = 100;
}
public class LotteryPoolLevel
{
public int PoolType { get; set; } = 1;
public string Level { get; set; } = string.Empty;
public int Count { get; set; } = 0;
public int Weight { get; set; } = 10;
public List<LotteryPrize> PrizeList { get; set; } = new List<LotteryPrize>();
}
public class LotteryPrize
{
public string PrizeId { get; set; } = string.Empty;
public string Name { get; set; } = string.Empty;
public string Icon { get; set; } = string.Empty;
public int Type { get; set; } = 1;
public long Count { get; set; } = 0;
public string OtherId { get; set; } = string.Empty;
public BaseProduct? Product { get; set; }
public int Weight { get; set; } = 10;
public int TotalCount { get; set; } = 0;
public int DrawnCount { get; set; } = 0;
}
}