CalendarDto.cs 823 B

1234567891011121314151617181920212223
  1. using Abp.Application.Services.Dto;
  2. using Abp.AutoMapper;
  3. using VberZero.BaseSystem;
  4. namespace VberZero.AppService.Calendars.Dto;
  5. [AutoMapFrom(typeof(SysCalendar))]
  6. public class CalendarDto : EntityDto<int>
  7. {
  8. public string Title { get; set; }
  9. public string Description { get; set; }
  10. public DateTime? Start { get; set; }
  11. public DateTime? End { get; set; }
  12. public string Colors { get; set; }
  13. public bool AllDay { get; set; }
  14. public int[] NotifyType { get; set; }
  15. private string[] _Colors => Colors?.Split('|');
  16. public string TextColor => _Colors == null || string.IsNullOrEmpty(_Colors[0]) ? "#fff" : _Colors[0];
  17. public string BackgroundColor => _Colors?.Length > 1 ? _Colors[1] : "#009EF7";
  18. public string BorderColor => _Colors?.Length > 2 ? _Colors[2] : BackgroundColor;
  19. }