// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using pavesys_iRAP.Business;

#nullable disable

namespace pavesys_iRAP.Migrations
{
    [DbContext(typeof(PersistenceContext))]
    [Migration("20241121165021_AddViaSeguraLabeled")]
    partial class AddViaSeguraLabeled
    {
        /// <inheritdoc />
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasDefaultSchema("dbo")
                .HasAnnotation("ProductVersion", "8.0.7")
                .HasAnnotation("Proxies:ChangeTracking", false)
                .HasAnnotation("Proxies:CheckEquality", false)
                .HasAnnotation("Proxies:LazyLoading", true)
                .HasAnnotation("Relational:MaxIdentifierLength", 128);

            SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);

            modelBuilder.Entity("pavesys_iRAP.DTO.Coding", b =>
                {
                    b.Property<int?>("CodingId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("codingId");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int?>("CodingId"));

                    b.Property<int?>("AnnualFatalityGrowthMultiplier")
                        .HasColumnType("int")
                        .HasColumnName("annualFatalityGrowthMultiplier");

                    b.Property<int?>("AreaType")
                        .HasColumnType("int")
                        .HasColumnName("areaType");

                    b.Property<DateTime?>("AuditingDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("auditingDate");

                    b.Property<string>("AuditorName")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("auditorName");

                    b.Property<int?>("BicycleFacility")
                        .HasColumnType("int")
                        .HasColumnName("bicycleFacility");

                    b.Property<int?>("BicycleObservedFlow")
                        .HasColumnType("int")
                        .HasColumnName("bicycleObservedFlow");

                    b.Property<int?>("BicyclePeakHourlyFlow")
                        .HasColumnType("int")
                        .HasColumnName("bicyclePeakHourlyFlow");

                    b.Property<int?>("BicycleStarRatingPolicyTarget")
                        .HasColumnType("int")
                        .HasColumnName("bicycleStarRatingPolicyTarget");

                    b.Property<int?>("CarStarRatingPolicyTarget")
                        .HasColumnType("int")
                        .HasColumnName("carStarRatingPolicyTarget");

                    b.Property<int?>("CarriageWay")
                        .HasColumnType("int")
                        .HasColumnName("carriageWay");

                    b.Property<int?>("CentrelineRumbleStrips")
                        .HasColumnType("int")
                        .HasColumnName("centrelineRumbleStrips");

                    b.Property<string>("CoderName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("coderName");

                    b.Property<DateTime>("CodingDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("codingDate");

                    b.Property<string>("Comments")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("comments");

                    b.Property<int?>("Curvature")
                        .HasColumnType("int")
                        .HasColumnName("curvature");

                    b.Property<int?>("Delineation")
                        .HasColumnType("int")
                        .HasColumnName("delineation");

                    b.Property<int?>("DifferentialSpeeds")
                        .HasColumnType("int")
                        .HasColumnName("differentialSpeeds");

                    b.Property<decimal?>("Distance")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("distance");

                    b.Property<int?>("FacilitiesMotorisedTwoWheelers")
                        .HasColumnType("int")
                        .HasColumnName("facilitiesMotorisedTwoWheelers");

                    b.Property<decimal?>("FinalKm")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("finalKm");

                    b.Property<int?>("Grade")
                        .HasColumnType("int")
                        .HasColumnName("grade");

                    b.Property<decimal?>("InitialKm")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("initialKm");

                    b.Property<int?>("IntersectingRoadVolume")
                        .HasColumnType("int")
                        .HasColumnName("intersectingRoadVolume");

                    b.Property<int?>("IntersectionChannelisation")
                        .HasColumnType("int")
                        .HasColumnName("intersectionChannelisation");

                    b.Property<int?>("IntersectionQuality")
                        .HasColumnType("int")
                        .HasColumnName("intersectionQuality");

                    b.Property<int?>("IntersectionType")
                        .HasColumnType("int")
                        .HasColumnName("intersectionType");

                    b.Property<int?>("LandUseDrivers")
                        .HasColumnType("int")
                        .HasColumnName("landUseDrivers");

                    b.Property<int?>("LandUsePassenger")
                        .HasColumnType("int")
                        .HasColumnName("landUsePassenger");

                    b.Property<string>("Landmark")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("landmark");

                    b.Property<int?>("LaneWidth")
                        .HasColumnType("int")
                        .HasColumnName("laneWidth");

                    b.Property<decimal?>("Latitude")
                        .HasPrecision(12, 8)
                        .HasColumnType("decimal(12,8)")
                        .HasColumnName("latitude");

                    b.Property<decimal?>("Length")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("length");

                    b.Property<decimal?>("Longitude")
                        .HasPrecision(12, 8)
                        .HasColumnType("decimal(12,8)")
                        .HasColumnName("longitude");

                    b.Property<int?>("MedianType")
                        .HasColumnType("int")
                        .HasColumnName("medianType");

                    b.Property<int?>("MotorcycleObserveredFlow")
                        .HasColumnType("int")
                        .HasColumnName("motorcycleObservedFlow");

                    b.Property<int?>("MotorcyclePercentual")
                        .HasColumnType("int")
                        .HasColumnName("motorcyclePercentual");

                    b.Property<int?>("MotorcycleSpeedLimit")
                        .HasColumnType("int")
                        .HasColumnName("motorcycleSpeedLimit");

                    b.Property<int?>("MotorcycleStarRatingPolicyTarget")
                        .HasColumnType("int")
                        .HasColumnName("motorcycleStarRatingPolicyTarget");

                    b.Property<int?>("NumberLanes")
                        .HasColumnType("int")
                        .HasColumnName("numberLanes");

                    b.Property<int?>("OperatingSpeed85thPercentile")
                        .HasColumnType("int")
                        .HasColumnName("operatingSpeed85thPercentile");

                    b.Property<int?>("OperatingSpeedMean")
                        .HasColumnType("int")
                        .HasColumnName("operatingSpeedMean");

                    b.Property<int?>("OriginalCodingId")
                        .HasColumnType("int")
                        .HasColumnName("originalCodingId");

                    b.Property<int?>("PavedShoulderDriversSide")
                        .HasColumnType("int")
                        .HasColumnName("pavedShoulderDriversSide");

                    b.Property<int?>("PavedShoulderPassengerSide")
                        .HasColumnType("int")
                        .HasColumnName("pavedShoulderPassengerSide");

                    b.Property<int?>("PedestrianCrossingFacilitiesSideRoad")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianCrossingFacilitiesSideRoad");

                    b.Property<int?>("PedestrianCrossingInspectedRoad")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianCrossingInspectedRoad");

                    b.Property<int?>("PedestrianCrossingQuality")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianCrossingQuality");

                    b.Property<int?>("PedestrianFencing")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianFencing");

                    b.Property<int?>("PedestrianObservedAlongRoadDriver")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianObservedAlongRoadDriver");

                    b.Property<int?>("PedestrianObservedAlongRoadPassenger")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianObservedAlongRoadPassenger");

                    b.Property<int?>("PedestrianObservedFlow")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianObservedFlow");

                    b.Property<int?>("PedestrianPeakHourFlowAcrossRoad")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianPeakHourFlowAcrossRoad");

                    b.Property<int?>("PedestrianPeakHourFlowAlongRoadDriver")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianPeakHourFlowAlongRoadDriver");

                    b.Property<int?>("PedestrianPeakHourFlowAlongRoadPassenger")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianPeakHourFlowAlongRoadPassenger");

                    b.Property<int?>("PedestrianStarRatingPolicyTarget")
                        .HasColumnType("int")
                        .HasColumnName("pedestrianStarRatingPolicyTarget");

                    b.Property<int>("ProjectId")
                        .HasColumnType("int")
                        .HasColumnName("projectId");

                    b.Property<int?>("PropertyAccessPoints")
                        .HasColumnType("int")
                        .HasColumnName("propertyAccessPoints");

                    b.Property<int?>("QualityCurve")
                        .HasColumnType("int")
                        .HasColumnName("qualityCurve");

                    b.Property<int?>("RoadCondition")
                        .HasColumnType("int")
                        .HasColumnName("roadCondition");

                    b.Property<string>("RoadName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("roadName");

                    b.Property<DateTime?>("RoadSurveyDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("roadSurveyDate");

                    b.Property<int?>("RoadsCarsRead")
                        .HasColumnType("int")
                        .HasColumnName("roadsCarsRead");

                    b.Property<int?>("RoadsideSeverityDriversSideDistance")
                        .HasColumnType("int")
                        .HasColumnName("roadsideSeverityDriversSideDistance");

                    b.Property<int?>("RoadsideSeverityDriversSideObject")
                        .HasColumnType("int")
                        .HasColumnName("roadsideSeverityDriversSideObject");

                    b.Property<int?>("RoadsideSeverityPassengerSideDistance")
                        .HasColumnType("int")
                        .HasColumnName("roadsideSeverityPassengerSideDistance");

                    b.Property<int?>("RoadsideSeverityPassengerSideObject")
                        .HasColumnType("int")
                        .HasColumnName("roadsideSeverityPassengerSideObject");

                    b.Property<int?>("Roadworks")
                        .HasColumnType("int")
                        .HasColumnName("roadworks");

                    b.Property<int?>("SchoolZoneCrossingSupervisor")
                        .HasColumnType("int")
                        .HasColumnName("schoolZoneCrossingSupervisor");

                    b.Property<int?>("SchoolZoneWarning")
                        .HasColumnType("int")
                        .HasColumnName("schoolZoneWarning");

                    b.Property<string>("Section")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("section");

                    b.Property<int?>("ServiceRoad")
                        .HasColumnType("int")
                        .HasColumnName("serviceRoad");

                    b.Property<int?>("ShoulderRumbleStrips")
                        .HasColumnType("int")
                        .HasColumnName("shoulderRumbleStrips");

                    b.Property<int?>("SidewalkDriversSide")
                        .HasColumnType("int")
                        .HasColumnName("sidewalkDriversSide");

                    b.Property<int?>("SidewalkPassengerSide")
                        .HasColumnType("int")
                        .HasColumnName("sidewalkPassengerSide");

                    b.Property<int?>("SightDistance")
                        .HasColumnType("int")
                        .HasColumnName("sightDistance");

                    b.Property<int?>("SkidResistanceGrip")
                        .HasColumnType("int")
                        .HasColumnName("skidResistanceGrip");

                    b.Property<int?>("SpeedLimit")
                        .HasColumnType("int")
                        .HasColumnName("speedLimit");

                    b.Property<int?>("SpeedManagementTrafficCalming")
                        .HasColumnType("int")
                        .HasColumnName("speedManagementTrafficCalming");

                    b.Property<int?>("StreetLighting")
                        .HasColumnType("int")
                        .HasColumnName("streetLighting");

                    b.Property<int?>("TruckSpeedLimit")
                        .HasColumnType("int")
                        .HasColumnName("truckSpeedLimit");

                    b.Property<DateTime?>("UpdateDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("updateDate");

                    b.Property<int?>("UpgradeCost")
                        .HasColumnType("int")
                        .HasColumnName("upgradeCost");

                    b.Property<int?>("VehicleFlow")
                        .HasColumnType("int")
                        .HasColumnName("vehicleFlow");

                    b.Property<int?>("VehicleParking")
                        .HasColumnType("int")
                        .HasColumnName("vehicleParking");

                    b.HasKey("CodingId");

                    b.ToTable("coding", "dbo");
                });

            modelBuilder.Entity("pavesys_iRAP.DTO.CodingImage", b =>
                {
                    b.Property<int?>("CodingId")
                        .HasColumnType("int")
                        .HasColumnName("codingId")
                        .HasColumnOrder(0);

                    b.Property<int>("Sequence")
                        .HasColumnType("int")
                        .HasColumnName("imageSeq")
                        .HasColumnOrder(1);

                    b.Property<int>("Type")
                        .HasColumnType("int")
                        .HasColumnName("cameraType")
                        .HasColumnOrder(2);

                    b.Property<DateTime>("FileDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("fileDate");

                    b.Property<string>("ImageName")
                        .IsRequired()
                        .HasMaxLength(20)
                        .HasColumnType("nvarchar(20)")
                        .HasColumnName("name");

                    b.HasKey("CodingId", "Sequence", "Type");

                    b.ToTable("codingImage", "dbo");
                });

            modelBuilder.Entity("pavesys_iRAP.DTO.Import.ImageImport", b =>
                {
                    b.Property<long>("SeqImport")
                        .HasColumnType("bigint")
                        .HasColumnName("seqImport")
                        .HasColumnOrder(0);

                    b.Property<int>("CameraType")
                        .HasColumnType("int")
                        .HasColumnName("cameraType")
                        .HasColumnOrder(1);

                    b.Property<string>("DestinationFileName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("destinationFileName");

                    b.Property<string>("ExternalFileName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("externalFileName");

                    b.Property<string>("ExternalUrl")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("externalUrl");

                    b.Property<DateTime?>("ImportDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("importDate");

                    b.Property<int>("OriginalProjectId")
                        .HasColumnType("int")
                        .HasColumnName("originalProjectId");

                    b.Property<int>("ProjectId")
                        .HasColumnType("int")
                        .HasColumnName("projectId");

                    b.HasKey("SeqImport", "CameraType");

                    b.ToTable("imageImport", "dbo");
                });

            modelBuilder.Entity("pavesys_iRAP.DTO.Project", b =>
                {
                    b.Property<int?>("ProjectId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("projectId");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int?>("ProjectId"));

                    b.Property<string>("CoderName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("coderName");

                    b.Property<int?>("CodingPosition")
                        .HasColumnType("int")
                        .HasColumnName("codingPosition");

                    b.Property<string>("ExternalUrl")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("externalUrl");

                    b.Property<bool?>("IsMph")
                        .HasColumnType("bit")
                        .HasColumnName("isMph");

                    b.Property<decimal>("KmEnd")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("kmEnd");

                    b.Property<decimal>("KmStart")
                        .HasColumnType("decimal(18,2)")
                        .HasColumnName("kmStart");

                    b.Property<DateTime?>("LastExportDate")
                        .HasColumnType("datetime2")
                        .HasColumnName("lastExportDate");

                    b.Property<int?>("OriginalProjectId")
                        .HasColumnType("int")
                        .HasColumnName("originalProjectId");

                    b.Property<string>("ProjectDescription")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("projectDescription");

                    b.Property<string>("ProjectPath")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("projectPath");

                    b.Property<string>("Road")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("road");

                    b.Property<string>("Section")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("section");

                    b.Property<int>("Status")
                        .HasColumnType("int")
                        .HasColumnName("status");

                    b.Property<string>("SurveySheetName")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("surveySheetName");

                    b.Property<string>("ViaSeguraLabeled")
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("viaSeguraLabeled");

                    b.HasKey("ProjectId");

                    b.ToTable("project", "dbo");
                });

            modelBuilder.Entity("pavesys_iRAP.DTO.User", b =>
                {
                    b.Property<int>("UserId")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasColumnName("userId");

                    SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserId"));

                    b.Property<int>("Active")
                        .HasColumnType("int")
                        .HasColumnName("userActive");

                    b.Property<string>("Login")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("login");

                    b.Property<string>("Name")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("name");

                    b.Property<string>("Password")
                        .IsRequired()
                        .HasColumnType("nvarchar(max)")
                        .HasColumnName("password");

                    b.Property<int>("ProfileType")
                        .HasColumnType("int")
                        .HasColumnName("profileType");

                    b.HasKey("UserId");

                    b.ToTable("user", "dbo");
                });

            modelBuilder.Entity("pavesys_iRAP.DTO.CodingImage", b =>
                {
                    b.HasOne("pavesys_iRAP.DTO.Coding", "Coding")
                        .WithMany("ImagesCam")
                        .HasForeignKey("CodingId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Coding");
                });

            modelBuilder.Entity("pavesys_iRAP.DTO.Coding", b =>
                {
                    b.Navigation("ImagesCam");
                });
#pragma warning restore 612, 618
        }
    }
}
