BaseIntegrationSource.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using InABox.Core;
  2. namespace Comal.Classes
  3. {
  4. public interface IBaseIntegrationSource
  5. {
  6. string? Code { get; set; }
  7. string? Description { get; set; }
  8. IEntityLink Entity { get; }
  9. IntegrationSourceType Source { get; set; }
  10. }
  11. public abstract class BaseIntegrationSource<TEntity,TLink> : Entity, IRemotable, IPersistent, IOneToMany<TEntity>, IBaseIntegrationSource
  12. where TEntity : Entity
  13. where TLink : IEntityLink<TEntity>
  14. {
  15. [NullEditor]
  16. [EntityRelationship(DeleteAction.Cascade)]
  17. [RequiredColumn]
  18. public TLink Entity { get; set; }
  19. IEntityLink IBaseIntegrationSource.Entity => Entity;
  20. [EditorSequence(1)]
  21. [EnumLookupEditor(typeof(IntegrationSourceType), Visible = Visible.Default, Width = 100)]
  22. public IntegrationSourceType Source { get; set; }
  23. [EditorSequence(2)]
  24. [TextBoxEditor]
  25. public string? Code { get; set; }
  26. [EditorSequence(3)]
  27. [TextBoxEditor]
  28. public string? Description{ get; set; }
  29. [DoNotPersist]
  30. [NullEditor]
  31. public bool DirectMatch { get; set; }
  32. }
  33. }