Regions.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using Abp.Domain.Entities;
  9. namespace ShwasherSys.BasicInfo
  10. {
  11. [Table("Regions")]
  12. public class Regions:Entity<string>
  13. {
  14. public const int RegionNameMaxLength = 50;
  15. public const int FatherRegionIDMaxLength = 50;
  16. public const int URLMaxLength = 80;
  17. public const int IsLeafMaxLength = 1;
  18. public const int PathMaxLength = 220;
  19. public const int UserIDLastModMaxLength =20;
  20. public const int IsLockMaxLength = 1;
  21. [Required]
  22. [StringLength(RegionNameMaxLength)]
  23. public string RegionName { get; set; }
  24. [Required]
  25. [StringLength(FatherRegionIDMaxLength)]
  26. public string FatherRegionID { get; set; }
  27. [StringLength(URLMaxLength)]
  28. public string URL { get; set; }
  29. public int Depth { get; set; }
  30. [Required]
  31. [StringLength(IsLeafMaxLength)]
  32. public string IsLeaf { get; set; }
  33. public int Sort { get; set; }
  34. [Required]
  35. [StringLength(PathMaxLength)]
  36. public string Path { get; set; }
  37. [Column(TypeName = "smalldatetime")]
  38. public DateTime? TimeCreated { get; set; }
  39. [Column(TypeName = "smalldatetime")]
  40. public DateTime? TimeLastMod { get; set; }
  41. [StringLength(UserIDLastModMaxLength)]
  42. public string UserIDLastMod { get; set; }
  43. [Required]
  44. [StringLength(IsLockMaxLength)]
  45. public string IsLock { get; set; }
  46. }
  47. }