EntityPropertyChange.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using Abp.Domain.Entities;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace Abp.EntityHistory
  5. {
  6. [Table("AbpEntityPropertyChanges")]
  7. public class EntityPropertyChange : Entity<long>, IMayHaveTenant
  8. {
  9. /// <summary>
  10. /// Maximum length of <see cref="PropertyName"/> property.
  11. /// Value: 96.
  12. /// </summary>
  13. public const int MaxPropertyNameLength = 96;
  14. /// <summary>
  15. /// Maximum length of <see cref="NewValue"/> and <see cref="OriginalValue"/> properties.
  16. /// Value: 512.
  17. /// </summary>
  18. public const int MaxValueLength = 512;
  19. /// <summary>
  20. /// Maximum length of <see cref="PropertyTypeFullName"/> property.
  21. /// Value: 512.
  22. /// </summary>
  23. public const int MaxPropertyTypeFullNameLength = 192;
  24. /// <summary>
  25. /// EntityChangeId.
  26. /// </summary>
  27. public virtual long EntityChangeId { get; set; }
  28. /// <summary>
  29. /// NewValue.
  30. /// </summary>
  31. [StringLength(MaxValueLength)]
  32. public virtual string NewValue { get; set; }
  33. /// <summary>
  34. /// OriginalValue.
  35. /// </summary>
  36. [StringLength(MaxValueLength)]
  37. public virtual string OriginalValue { get; set; }
  38. /// <summary>
  39. /// PropertyName.
  40. /// </summary>
  41. [StringLength(MaxPropertyNameLength)]
  42. public virtual string PropertyName { get; set; }
  43. /// <summary>
  44. /// Type of the JSON serialized <see cref="NewValue"/> and <see cref="OriginalValue"/>.
  45. /// It's the FullName of the type.
  46. /// </summary>
  47. [StringLength(MaxPropertyTypeFullNameLength)]
  48. public virtual string PropertyTypeFullName { get; set; }
  49. /// <summary>
  50. /// TenantId.
  51. /// </summary>
  52. public virtual int? TenantId { get; set; }
  53. }
  54. }