MdpEntity.cs 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. namespace Admin.NET.Plugin.AiDOP.Entity.DataPlatform;
  2. [SugarTable("mdp_entity", "MDP同步实体配置")]
  3. public class MdpEntity
  4. {
  5. [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
  6. public long Id { get; set; }
  7. public long TenantId { get; set; }
  8. public long SourceId { get; set; }
  9. public string EntityCode { get; set; } = string.Empty;
  10. public string EntityName { get; set; } = string.Empty;
  11. public string EntityType { get; set; } = "TABLE";
  12. public string? SourceTableName { get; set; }
  13. public string? SourceApiPath { get; set; }
  14. public long? ApiConfigId { get; set; }
  15. public string? TargetTableName { get; set; }
  16. public string SyncMode { get; set; } = "INCR";
  17. public string? IncrColumn { get; set; }
  18. public int BatchSize { get; set; } = 5000;
  19. public string? ResponseDataPath { get; set; }
  20. public string? DedupKeyPath { get; set; }
  21. public string? LastCursor { get; set; }
  22. public DateTime? LastSyncTo { get; set; }
  23. public string? JobId { get; set; }
  24. public int Status { get; set; } = 1;
  25. public string? Remark { get; set; }
  26. public DateTime CreateTime { get; set; }
  27. public DateTime UpdateTime { get; set; }
  28. }
  29. [SugarTable("mdp_field_mapping", "MDP字段映射配置")]
  30. public class MdpFieldMapping
  31. {
  32. [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
  33. public long Id { get; set; }
  34. public long EntityId { get; set; }
  35. public string SourceField { get; set; } = string.Empty;
  36. public string TargetField { get; set; } = string.Empty;
  37. public string FieldType { get; set; } = "DIRECT";
  38. public string? TransformScript { get; set; }
  39. public string? ConstValue { get; set; }
  40. public string? LookupTable { get; set; }
  41. public int IsRequired { get; set; }
  42. public string? DefaultValue { get; set; }
  43. public int SortOrder { get; set; }
  44. public DateTime CreateTime { get; set; }
  45. }