PartnerPlan.cs 956 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections.Generic;
  2. namespace FL.Data
  3. {
  4. public class PartnerPlan
  5. {
  6. public int id { get; private set; }
  7. public string name { get; private set; }
  8. /// <summary>
  9. /// key 位置 : value 槽位信息
  10. /// </summary>
  11. private Dictionary<int, PartnerPlanSlot> planMap = new Dictionary<int, PartnerPlanSlot>();
  12. public Dictionary<int, PartnerPlanSlot>.ValueCollection planValues
  13. {
  14. get { return planMap.Values; }
  15. }
  16. public void Init(int id, string name, List<PartnerPlanSlot> planList)
  17. {
  18. this.id = id;
  19. this.name = name;
  20. foreach (var slot in planList)
  21. {
  22. planMap.Add(slot.caoId, slot);
  23. }
  24. }
  25. public PartnerPlanSlot GetSlot(int slotId)
  26. {
  27. return planMap.GetValueOrDefault(slotId);
  28. }
  29. }
  30. }