BaseIntegrationSource.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. }
  10. public abstract class BaseIntegrationSource<TEntity,TLink> : Entity, IRemotable, IPersistent, IOneToMany<TEntity>, IBaseIntegrationSource
  11. where TEntity : Entity
  12. where TLink : IEntityLink<TEntity>
  13. {
  14. [NullEditor]
  15. [EntityRelationship(DeleteAction.Cascade)]
  16. public TLink Entity { get; set; }
  17. IEntityLink IBaseIntegrationSource.Entity => Entity;
  18. [EditorSequence(1)]
  19. [EnumLookupEditor(typeof(IntegrationSourceType), Visible = Visible.Default, Width = 100)]
  20. public IntegrationSourceType Source { get; set; }
  21. [EditorSequence(2)]
  22. [TextBoxEditor]
  23. public string? Code { get; set; }
  24. [EditorSequence(3)]
  25. [TextBoxEditor]
  26. public string? Description{ get; set; }
  27. }
  28. }