DeeplinkParseRuleDTO.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 deeplink_template { get; set; } = string.Empty;
  17. public string prompt_text { get; set; } = string.Empty;
  18. public bool enable { get; set; } = true;
  19. public List<DeeplinkParseRule> childs { get; set; } = new();
  20. }
  21. [Table("deeplink_parse_rule")]
  22. public class DeeplinkParseRuleDTO
  23. {
  24. [Key]
  25. public int id { get; set; }
  26. public int channel_id { get; set; } = 0;
  27. public string channel_name { get; set; } = string.Empty;
  28. public string name { get; set; } = string.Empty;
  29. public string logo { get; set; } = string.Empty;
  30. public string rules { get; set; } = string.Empty;
  31. public string IgnorePercentageCity { get; set; } = string.Empty;
  32. public bool status { get; set; } = false;
  33. public DateTime create_time { get; set; } = DateTime.Now;
  34. [IgnoreUpdate]
  35. public DateTime last_time { get; set; } = DateTime.Now;
  36. }
  37. }