DataEntryTagDistributionEmployee.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  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. }
  29. }