//
using System;
using Bunny.Common.Context;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace Bunny.Common.Migrations
{
[DbContext(typeof(EfCoreContext))]
[Migration("20240902054644_InitialCreate")]
partial class InitialCreate
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Bunny.Dao.Entity.System.Blog", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("bigint");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("bigint");
b.Property("Url")
.IsRequired()
.HasColumnType("varchar(600)")
.HasColumnName("BlogUrl");
b.HasKey("Id");
b.ToTable("Blog");
});
modelBuilder.Entity("Bunny.Dao.Entity.System.Post", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("BlogId")
.HasColumnType("nvarchar(450)");
b.Property("Content")
.HasColumnType("nvarchar(max)");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("bigint");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Title")
.HasMaxLength(600)
.HasColumnType("nvarchar(600)");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("BlogId");
b.ToTable("Posts");
});
modelBuilder.Entity("Bunny.Dao.Entity.System.Product", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("bigint");
b.Property("CustomerId")
.HasColumnType("nvarchar(max)");
b.Property("CustomerName")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("PackageType")
.HasColumnType("nvarchar(max)");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("bigint");
b.HasKey("Id");
b.ToTable("Products");
});
modelBuilder.Entity("Bunny.Dao.Entity.System.User", b =>
{
b.Property("Id")
.HasColumnType("nvarchar(450)");
b.Property("CompanyCode")
.HasColumnType("nvarchar(max)");
b.Property("CreateTime")
.HasColumnType("datetime2");
b.Property("CreateUserId")
.HasColumnType("bigint");
b.Property("DeptCode")
.HasColumnType("nvarchar(max)");
b.Property("Email")
.HasColumnType("nvarchar(max)");
b.Property("IsDeleted")
.HasColumnType("bit");
b.Property("Password")
.HasColumnType("nvarchar(max)");
b.Property("Phone")
.HasColumnType("nvarchar(max)");
b.Property("QrCode")
.HasColumnType("nvarchar(max)");
b.Property("UpdateTime")
.HasColumnType("datetime2");
b.Property("UpdateUserId")
.HasColumnType("bigint");
b.Property("UserName")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Users");
});
modelBuilder.Entity("Bunny.Dao.Entity.System.Post", b =>
{
b.HasOne("Bunny.Dao.Entity.System.Blog", "Blog")
.WithMany()
.HasForeignKey("BlogId");
b.Navigation("Blog");
});
#pragma warning restore 612, 618
}
}
}