| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.ModelConfiguration;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace GreenTree.Nachtragsmanagement.Data.Mapping.Appendix
- {
- public class AppendixMap : EntityTypeConfiguration<Core.Domain.Appendix.Appendix>
- {
- public AppendixMap()
- {
- ToTable("Appendix");
- HasKey(a => a.Id);
- HasOptional(a => a.Site)
- .WithMany(s => s.Appendices)
- .HasForeignKey(a => a.SiteId);
- Property(a => a.CustomNumber);
- Property(a => a.Lot);
- Property(a => a.Comment);
- Property(a => a.Value);
- Property(a => a.Probability);
- Property(a => a.OfferingNumber);
- Property(a => a.OfferingDate);
- Property(a => a.NegotiationDate);
- Property(a => a.NegotiationValue);
- Property(a => a.ProtocolExists);
- Property(a => a.OrderNumber);
- Property(a => a.OrderDate);
- HasMany(s => s.Categories)
- .WithMany()
- .Map(a => a.ToTable("AppendixCategories"));
- HasMany(s => s.Deviations)
- .WithOptional();
- HasMany(s => s.Invoices)
- .WithOptional();
- }
- }
- }
|