1234567891011121314151617181920212223242526272829303132333435 |
- using System.Collections.Generic;
- namespace FL.Data
- {
- public class PartnerPlan
- {
- public int id { get; private set; }
- public string name { get; private set; }
- /// <summary>
- /// key 位置 : value 槽位信息
- /// </summary>
- private Dictionary<int, PartnerPlanSlot> planMap = new Dictionary<int, PartnerPlanSlot>();
- public Dictionary<int, PartnerPlanSlot>.ValueCollection planValues
- {
- get { return planMap.Values; }
- }
- public void Init(int id, string name, List<PartnerPlanSlot> planList)
- {
- this.id = id;
- this.name = name;
- foreach (var slot in planList)
- {
- planMap.Add(slot.caoId, slot);
- }
- }
- public PartnerPlanSlot GetSlot(int slotId)
- {
- return planMap.GetValueOrDefault(slotId);
- }
- }
- }
|