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 Pools { get; set; } = new List(); [BsonDictionaryOptions(DictionaryRepresentation.ArrayOfDocuments)] public Dictionary> CostsByPool { get; set; } = new Dictionary>(); 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 PrizeList { get; set; } = new List(); } 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; } }