BaseIntegrationSource.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  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. [RequiredColumn]
  17. public TLink Entity { get; set; }
  18. IEntityLink IBaseIntegrationSource.Entity => Entity;
  19. [EditorSequence(1)]
  20. [EnumLookupEditor(typeof(IntegrationSourceType), Visible = Visible.Default, Width = 100)]
  21. public IntegrationSourceType Source { get; set; }
  22. [EditorSequence(2)]
  23. [TextBoxEditor]
  24. public string? Code { get; set; }
  25. [EditorSequence(3)]
  26. [TextBoxEditor]
  27. public string? Description{ get; set; }
  28. }
  29. }