DeeplinkParseRuleDTO.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using dodohold.core;
  2. namespace molilian.core
  3. {
  4. public enum UrlAction
  5. {
  6. None = 0,
  7. Redirect = 1,
  8. Body = 2
  9. }
  10. public class DeeplinkParseRule
  11. {
  12. public UrlAction url_action { get; set; } = UrlAction.None;
  13. public string body_pattern { get; set; } = string.Empty;
  14. public string url_pattern { get; set; } = string.Empty;
  15. public string pattern { get; set; } = string.Empty;
  16. public string plugin { get; set; } = string.Empty;
  17. public string deeplink_template { get; set; } = string.Empty;
  18. public string prompt_text { get; set; } = string.Empty;
  19. public bool enable { get; set; } = true;
  20. public List<DeeplinkParseRule> childs { get; set; } = new();
  21. }
  22. [Table("deeplink_parse_rule")]
  23. public class DeeplinkParseRuleDTO
  24. {
  25. [Key]
  26. public int id { get; set; }
  27. public int channel_id { get; set; } = 0;
  28. public string channel_name { get; set; } = string.Empty;
  29. public string name { get; set; } = string.Empty;
  30. public string logo { get; set; } = string.Empty;
  31. public string rules { get; set; } = string.Empty;
  32. public string IgnorePercentageCity { get; set; } = string.Empty;
  33. public bool status { get; set; } = false;
  34. public DateTime create_time { get; set; } = DateTime.Now;
  35. [IgnoreUpdate]
  36. public DateTime last_time { get; set; } = DateTime.Now;
  37. }
  38. }