BaseIntegrationSource.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. }
  30. }