223 lines
7.5 KiB
C#
223 lines
7.5 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Solicitors.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace Solicitors.Data.Migrations
|
|
{
|
|
[DbContext(typeof(SolicitorsRepository))]
|
|
[Migration("20260622195820_InitialCreate")]
|
|
partial class InitialCreate
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "10.0.9");
|
|
|
|
modelBuilder.Entity("CitySolicitor", b =>
|
|
{
|
|
b.Property<Guid>("CitiesCityId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("SolicitorsSolicitorId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("CitiesCityId", "SolicitorsSolicitorId");
|
|
|
|
b.HasIndex("SolicitorsSolicitorId");
|
|
|
|
b.ToTable("CitySolicitor");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.City", b =>
|
|
{
|
|
b.Property<Guid>("CityId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("CityId");
|
|
|
|
b.ToTable("Cities");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.Solicitor", b =>
|
|
{
|
|
b.Property<Guid>("SolicitorId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Phone")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("RelativeUrl")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("ShortDescription")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Website")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SolicitorId");
|
|
|
|
b.ToTable("Solicitors");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorLocation", b =>
|
|
{
|
|
b.Property<Guid>("SolicitorLocationId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Address")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Phone")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("SolicitorId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SolicitorLocationId");
|
|
|
|
b.HasIndex("SolicitorId");
|
|
|
|
b.ToTable("SolicitorLocations");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorLocationRating", b =>
|
|
{
|
|
b.Property<Guid>("SolicitorLocationRatingId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Maximum")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Provider")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("SolicitorLocationId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Value")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SolicitorLocationRatingId");
|
|
|
|
b.HasIndex("SolicitorLocationId");
|
|
|
|
b.ToTable("SolicitorLocationRatings");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorRating", b =>
|
|
{
|
|
b.Property<Guid>("SolicitorRatingId")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Maximum")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Provider")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<Guid>("SolicitorId")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Value")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("SolicitorRatingId");
|
|
|
|
b.HasIndex("SolicitorId");
|
|
|
|
b.ToTable("SolicitorRatings");
|
|
});
|
|
|
|
modelBuilder.Entity("CitySolicitor", b =>
|
|
{
|
|
b.HasOne("Solicitors.Core.Models.City", null)
|
|
.WithMany()
|
|
.HasForeignKey("CitiesCityId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Solicitors.Core.Models.Solicitor", null)
|
|
.WithMany()
|
|
.HasForeignKey("SolicitorsSolicitorId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorLocation", b =>
|
|
{
|
|
b.HasOne("Solicitors.Core.Models.Solicitor", "Solicitor")
|
|
.WithMany("Locations")
|
|
.HasForeignKey("SolicitorId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Solicitor");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorLocationRating", b =>
|
|
{
|
|
b.HasOne("Solicitors.Core.Models.SolicitorLocation", "SolicitorLocation")
|
|
.WithMany("LocationRatings")
|
|
.HasForeignKey("SolicitorLocationId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("SolicitorLocation");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorRating", b =>
|
|
{
|
|
b.HasOne("Solicitors.Core.Models.Solicitor", "Solicitor")
|
|
.WithMany("Ratings")
|
|
.HasForeignKey("SolicitorId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Solicitor");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.Solicitor", b =>
|
|
{
|
|
b.Navigation("Locations");
|
|
|
|
b.Navigation("Ratings");
|
|
});
|
|
|
|
modelBuilder.Entity("Solicitors.Core.Models.SolicitorLocation", b =>
|
|
{
|
|
b.Navigation("LocationRatings");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|