DataEntryTagDistributionEmployee.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using Comal.Classes;
  2. using InABox.Core;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq.Expressions;
  6. using System.Text;
  7. namespace Comal.Classes
  8. {
  9. public class DataEntryTagDistributionUnionGenerator : AutoEntityUnionGenerator<IDataEntryTagDistributionEmployee>
  10. {
  11. protected override void Configure()
  12. {
  13. AddTable<DataEntryTagEmployee>();
  14. AddTable<DataEntryTagRoleEmployee>();
  15. }
  16. public override bool Distinct => true;
  17. public override Column<IDataEntryTagDistributionEmployee>[] IDColumns { get; } = new Column<IDataEntryTagDistributionEmployee>[]
  18. {
  19. new Column<IDataEntryTagDistributionEmployee>(x => x.Employee.ID),
  20. new Column<IDataEntryTagDistributionEmployee>(x => x.Tag.ID)
  21. };
  22. }
  23. [AutoEntity(typeof(DataEntryTagDistributionUnionGenerator))]
  24. public class DataEntryTagDistributionEmployee : Entity, IRemotable, IPersistent, IDataEntryTagDistributionEmployee, ILicense<DataEntryLicense>
  25. {
  26. public EmployeeLink Employee { get; set; }
  27. public DataEntryTagLink Tag { get; set; }
  28. protected override void Init()
  29. {
  30. base.Init();
  31. Employee = new EmployeeLink();
  32. Tag = new DataEntryTagLink();
  33. }
  34. }
  35. }