| 12345678910111213141516171819202122232425262728293031323334353637 |
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.ModelConfiguration;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using GreenTree.Nachtragsmanagement.Core.Domain.Misc;
- namespace GreenTree.Nachtragsmanagement.Data.Mapping.Misc
- {
- public class MailNotificationMap : EntityTypeConfiguration<MailNotification>
- {
- public MailNotificationMap()
- {
- ToTable("MailNotification");
- HasKey(m => m.Id);
- Property(m => m.CronExpression);
- Property(m => m.IsDailySummary);
- Property(m => m.IsWeeklySummary);
- Property(m => m.IsMonthlySummary);
- HasOptional(m => m.NotificationEvent)
- .WithMany()
- .HasForeignKey(m => m.NotificationEventId);
- HasOptional(m => m.NotificationEventType)
- .WithMany()
- .HasForeignKey(m => m.NotificationEventTypeId);
- HasMany(m => m.Users)
- .WithMany(u => u.MailNotifications)
- .Map(m => m.ToTable("UserMailNotifications"));
- }
- }
- }
|