using Domain;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Text;

namespace Infrastructure
{
    public class ShipFishVisitEntityTypeConfiguration : IEntityTypeConfiguration<ShipFishVisit>
    {
        public void Configure(EntityTypeBuilder<ShipFishVisit> builder)
        {
            builder.ToTable("ShipFishVisit");

            builder.HasKey(x => x.ShipVisitKey);

            builder.HasOne(s => s.MyShip).WithMany(x => x.ShipFishVisits).HasForeignKey(s => s.ShipRegisterNoKey);


            builder.Property(x => x.ShipVisitKey).HasColumnName("ShipVisitKey");
            builder.Property(x => x.ShipRegisterNoKey).HasColumnName("ShipRegisterNoKey");
            builder.Property(x => x.Processingindicator).HasColumnName("Processingindicator");
     

        }
    }
}
