MailNotificationMap.cs 815 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Entity.ModelConfiguration;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using GreenTree.Nachtragsmanagement.Core.Domain.Misc;
  8. namespace GreenTree.Nachtragsmanagement.Data.Mapping.Misc
  9. {
  10. public class MailNotificationMap : EntityTypeConfiguration<MailNotification>
  11. {
  12. public MailNotificationMap()
  13. {
  14. ToTable("MailNotification");
  15. HasKey(m => m.Id);
  16. Property(m => m.CronExpression);
  17. Property(m => m.NotificationPluginSystemName);
  18. Property(m => m.NotificationJobSystemName);
  19. HasMany(m => m.Users)
  20. .WithMany(u => u.MailNotifications)
  21. .Map(m => m.ToTable("UserMailNotifications"));
  22. }
  23. }
  24. }