mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-29 18:21:08 +00:00
134 lines
4.8 KiB
C#
134 lines
4.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using CleanArchitecture.Infrastructure.Database;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace CleanArchitecture.Infrastructure.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.0")
|
|
.HasAnnotation("Proxies:ChangeTracking", false)
|
|
.HasAnnotation("Proxies:CheckEquality", false)
|
|
.HasAnnotation("Proxies:LazyLoading", true)
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("CleanArchitecture.Domain.Entities.Tenant", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("nvarchar(255)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Tenants");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = new Guid("b542bf25-134c-47a2-a0df-84ed14d03c4a"),
|
|
Name = "Admin Tenant"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("CleanArchitecture.Domain.Entities.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.Property<DateTimeOffset?>("DeletedAt")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(320)
|
|
.HasColumnType("nvarchar(320)");
|
|
|
|
b.Property<string>("FirstName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<DateTimeOffset?>("LastLoggedinDate")
|
|
.HasColumnType("datetimeoffset");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("nvarchar(100)");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasMaxLength(128)
|
|
.HasColumnType("nvarchar(128)");
|
|
|
|
b.Property<int>("Role")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<Guid>("TenantId")
|
|
.HasColumnType("uniqueidentifier");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TenantId");
|
|
|
|
b.ToTable("Users");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = new Guid("7e3892c0-9374-49fa-a3fd-53db637a40ae"),
|
|
Email = "admin@email.com",
|
|
FirstName = "Admin",
|
|
LastName = "User",
|
|
Password = "$2a$12$Blal/uiFIJdYsCLTMUik/egLbfg3XhbnxBC6Sb5IKz2ZYhiU/MzL2",
|
|
Role = 0,
|
|
Status = 0,
|
|
TenantId = new Guid("b542bf25-134c-47a2-a0df-84ed14d03c4a")
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("CleanArchitecture.Domain.Entities.User", b =>
|
|
{
|
|
b.HasOne("CleanArchitecture.Domain.Entities.Tenant", "Tenant")
|
|
.WithMany("Users")
|
|
.HasForeignKey("TenantId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Tenant");
|
|
});
|
|
|
|
modelBuilder.Entity("CleanArchitecture.Domain.Entities.Tenant", b =>
|
|
{
|
|
b.Navigation("Users");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|