MdpEntityDtos.cs 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. namespace Admin.NET.Plugin.AiDOP.Dto.DataPlatform;
  2. public sealed class MdpEntityRow
  3. {
  4. public long Id { get; set; }
  5. public long TenantId { get; set; }
  6. public long SourceId { get; set; }
  7. public string? SourceCode { get; set; }
  8. public string? SourceName { get; set; }
  9. public string? SourceType { get; set; }
  10. public string EntityCode { get; set; } = string.Empty;
  11. public string EntityName { get; set; } = string.Empty;
  12. public string EntityType { get; set; } = "TABLE";
  13. public string? SourceTableName { get; set; }
  14. public string? SourceApiPath { 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? JobId { get; set; }
  20. public int Status { get; set; } = 1;
  21. public string? Remark { get; set; }
  22. public int FieldMappingCount { get; set; }
  23. }
  24. public sealed class MdpEntityUpsertInput
  25. {
  26. public string EntityCode { get; set; } = string.Empty;
  27. public string EntityName { get; set; } = string.Empty;
  28. public string EntityType { get; set; } = "TABLE";
  29. public long SourceId { get; set; }
  30. public string? SourceCode { get; set; }
  31. public string? SourceTableName { get; set; }
  32. public string? SourceApiPath { get; set; }
  33. public string? TargetTableName { get; set; }
  34. public string SyncMode { get; set; } = "INCR";
  35. public string? IncrColumn { get; set; }
  36. public int BatchSize { get; set; } = 5000;
  37. public string? JobId { get; set; }
  38. public int Status { get; set; } = 1;
  39. public string? Remark { get; set; }
  40. /// <summary>仅 source_type=API_INBOUND 允许为 1,默认 0。</summary>
  41. public int InboundEnabled { get; set; }
  42. public string? BizKeyExpr { get; set; }
  43. }
  44. public sealed class MdpFieldMappingRow
  45. {
  46. public long Id { get; set; }
  47. public long EntityId { get; set; }
  48. public string SourceField { get; set; } = string.Empty;
  49. public string TargetField { get; set; } = string.Empty;
  50. public string FieldType { get; set; } = "DIRECT";
  51. public string? TransformScript { get; set; }
  52. public string? ConstValue { get; set; }
  53. public string? LookupTable { get; set; }
  54. public bool IsRequired { get; set; }
  55. public string? DefaultValue { get; set; }
  56. public int SortOrder { get; set; }
  57. }
  58. public sealed class MdpFieldMappingUpsertInput
  59. {
  60. public string SourceField { get; set; } = string.Empty;
  61. public string TargetField { get; set; } = string.Empty;
  62. public string FieldType { get; set; } = "DIRECT";
  63. public string? TransformScript { get; set; }
  64. public string? ConstValue { get; set; }
  65. public string? LookupTable { get; set; }
  66. public bool IsRequired { get; set; }
  67. public string? DefaultValue { get; set; }
  68. public int SortOrder { get; set; }
  69. }