...
This commit is contained in:
534
Infrastructure/Persistence/Migrations/20250818094257_chngrtbai.Designer.cs
generated
Normal file
534
Infrastructure/Persistence/Migrations/20250818094257_chngrtbai.Designer.cs
generated
Normal file
@@ -0,0 +1,534 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Hushian.Persistence;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(HushianDbContext))]
|
||||
[Migration("20250818094257_chngrtbai")]
|
||||
partial class chngrtbai
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "9.0.7")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.AIA", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CompanyID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Request")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Response")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("aiKeyUser")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.ToTable("AIAs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Company", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<bool>("Available")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FullNameManager")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Mobile")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("WebSite")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("allowBot")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<byte[]>("logo")
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.ToTable("Companies");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.CompanyContentInfo", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CompanyID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Content")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.ToTable("CompanyContentInfo");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Conversation", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CompanyID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("FinishedDateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("GroupID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.HasIndex("GroupID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("Conversations");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.ConversationResponse", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("ConversationID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("ExperID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<byte[]>("FileContent")
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FileType")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsRead")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime?>("ReadDateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Text")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("ConversationID");
|
||||
|
||||
b.HasIndex("ExperID");
|
||||
|
||||
b.ToTable("ConversationItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Exper", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<bool>("Available")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CompanyID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.ToTable("Expers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.ExperGroup", b =>
|
||||
{
|
||||
b.Property<int>("ExperID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("GroupID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("ExperID", "GroupID");
|
||||
|
||||
b.HasIndex("GroupID");
|
||||
|
||||
b.ToTable("EG");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Group", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<bool>("Available")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CompanyID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<byte[]>("img")
|
||||
.HasColumnType("varbinary(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.ToTable("Groups");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Prompt", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("CompanyID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Test")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.ToTable("prompts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.User", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Mobile")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Identity.Models.VerificationCode", b =>
|
||||
{
|
||||
b.Property<int>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ID"));
|
||||
|
||||
b.Property<DateTime>("Cdatetime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Code")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Mobile")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.ToTable("verificationCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.AIA", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "company")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.CompanyContentInfo", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "company")
|
||||
.WithMany("CompanyContentInfos")
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Conversation", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "Company")
|
||||
.WithMany("Conversations")
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Hushian.Domain.Entites.Group", "Group")
|
||||
.WithMany()
|
||||
.HasForeignKey("GroupID");
|
||||
|
||||
b.HasOne("Hushian.Domain.Entites.User", "User")
|
||||
.WithMany("Conversations")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
|
||||
b.Navigation("Group");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.ConversationResponse", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Conversation", "conversation")
|
||||
.WithMany("ConversationResponses")
|
||||
.HasForeignKey("ConversationID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Hushian.Domain.Entites.Exper", "Exper")
|
||||
.WithMany()
|
||||
.HasForeignKey("ExperID");
|
||||
|
||||
b.Navigation("Exper");
|
||||
|
||||
b.Navigation("conversation");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Exper", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "Company")
|
||||
.WithMany("Expers")
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.ExperGroup", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Exper", "Exper")
|
||||
.WithMany("EG")
|
||||
.HasForeignKey("ExperID")
|
||||
.OnDelete(DeleteBehavior.ClientCascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Hushian.Domain.Entites.Group", "Group")
|
||||
.WithMany("EG")
|
||||
.HasForeignKey("GroupID")
|
||||
.OnDelete(DeleteBehavior.ClientCascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Exper");
|
||||
|
||||
b.Navigation("Group");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Group", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "Company")
|
||||
.WithMany("Groups")
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Prompt", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "Company")
|
||||
.WithMany("prompts")
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Company", b =>
|
||||
{
|
||||
b.Navigation("CompanyContentInfos");
|
||||
|
||||
b.Navigation("Conversations");
|
||||
|
||||
b.Navigation("Expers");
|
||||
|
||||
b.Navigation("Groups");
|
||||
|
||||
b.Navigation("prompts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Conversation", b =>
|
||||
{
|
||||
b.Navigation("ConversationResponses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Exper", b =>
|
||||
{
|
||||
b.Navigation("EG");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.Group", b =>
|
||||
{
|
||||
b.Navigation("EG");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.User", b =>
|
||||
{
|
||||
b.Navigation("Conversations");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class chngrtbai : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UserID",
|
||||
table: "AIAs");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "aiKeyUser",
|
||||
table: "AIAs",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AIAs_CompanyID",
|
||||
table: "AIAs",
|
||||
column: "CompanyID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_AIAs_Companies_CompanyID",
|
||||
table: "AIAs",
|
||||
column: "CompanyID",
|
||||
principalTable: "Companies",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_AIAs_Companies_CompanyID",
|
||||
table: "AIAs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_AIAs_CompanyID",
|
||||
table: "AIAs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "aiKeyUser",
|
||||
table: "AIAs");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "UserID",
|
||||
table: "AIAs",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
}
|
||||
}
|
@@ -44,11 +44,14 @@ namespace Hushian.Persistence.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
b.Property<string>("aiKeyUser")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CompanyID");
|
||||
|
||||
b.ToTable("AIAs");
|
||||
});
|
||||
|
||||
@@ -374,6 +377,17 @@ namespace Hushian.Persistence.Migrations
|
||||
b.ToTable("verificationCodes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.AIA", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "company")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Hushian.Domain.Entites.CompanyContentInfo", b =>
|
||||
{
|
||||
b.HasOne("Hushian.Domain.Entites.Company", "company")
|
||||
|
Reference in New Issue
Block a user