...
This commit is contained in:
@@ -1,425 +0,0 @@
|
||||
// <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("20250724132732_InitalDB")]
|
||||
partial class InitalDB
|
||||
{
|
||||
/// <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.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.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("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.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Hushian.Domain.Entites.Group", "Group")
|
||||
.WithMany("EG")
|
||||
.HasForeignKey("GroupID")
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.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.Company", b =>
|
||||
{
|
||||
b.Navigation("CompanyContentInfos");
|
||||
|
||||
b.Navigation("Conversations");
|
||||
|
||||
b.Navigation("Expers");
|
||||
|
||||
b.Navigation("Groups");
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,425 +0,0 @@
|
||||
// <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("20250724140236_changetbeg")]
|
||||
partial class changetbeg
|
||||
{
|
||||
/// <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.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.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("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.Company", b =>
|
||||
{
|
||||
b.Navigation("CompanyContentInfos");
|
||||
|
||||
b.Navigation("Conversations");
|
||||
|
||||
b.Navigation("Expers");
|
||||
|
||||
b.Navigation("Groups");
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class changetbeg : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_EG_Expers_ExperID",
|
||||
table: "EG");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_EG_Expers_ExperID",
|
||||
table: "EG",
|
||||
column: "ExperID",
|
||||
principalTable: "Expers",
|
||||
principalColumn: "ID");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_EG_Expers_ExperID",
|
||||
table: "EG");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_EG_Expers_ExperID",
|
||||
table: "EG",
|
||||
column: "ExperID",
|
||||
principalTable: "Expers",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,452 +0,0 @@
|
||||
// <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("20250724183709_tbverification")]
|
||||
partial class tbverification
|
||||
{
|
||||
/// <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.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.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.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.Company", b =>
|
||||
{
|
||||
b.Navigation("CompanyContentInfos");
|
||||
|
||||
b.Navigation("Conversations");
|
||||
|
||||
b.Navigation("Expers");
|
||||
|
||||
b.Navigation("Groups");
|
||||
});
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tbverification : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "verificationCodes",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_verificationCodes", x => x.ID);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "verificationCodes");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,490 +0,0 @@
|
||||
// <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("20250815213829_tbpromt")]
|
||||
partial class tbpromt
|
||||
{
|
||||
/// <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.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.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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class tbpromt : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "prompts",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CompanyID = table.Column<int>(type: "int", nullable: false),
|
||||
Test = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_prompts", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_prompts_Companies_CompanyID",
|
||||
column: x => x.CompanyID,
|
||||
principalTable: "Companies",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_prompts_CompanyID",
|
||||
table: "prompts",
|
||||
column: "CompanyID");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "prompts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,520 +0,0 @@
|
||||
// <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("20250817205731_newtable")]
|
||||
partial class newtable
|
||||
{
|
||||
/// <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<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
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.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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class newtable : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AIAs",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CompanyID = table.Column<int>(type: "int", nullable: false),
|
||||
UserID = table.Column<int>(type: "int", nullable: false),
|
||||
Request = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Response = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AIAs", x => x.ID);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AIAs");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
[DbContext(typeof(HushianDbContext))]
|
||||
[Migration("20250818094257_chngrtbai")]
|
||||
partial class chngrtbai
|
||||
[Migration("20251023075422_Newdb")]
|
||||
partial class Newdb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
namespace Hushian.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitalDB : Migration
|
||||
public partial class Newdb : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
@@ -49,6 +49,45 @@ namespace Hushian.Persistence.Migrations
|
||||
table.PrimaryKey("PK_Users", x => x.ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "verificationCodes",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Type = table.Column<int>(type: "int", nullable: false),
|
||||
Code = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Mobile = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_verificationCodes", x => x.ID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AIAs",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CompanyID = table.Column<int>(type: "int", nullable: false),
|
||||
aiKeyUser = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Request = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Response = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AIAs", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_AIAs_Companies_CompanyID",
|
||||
column: x => x.CompanyID,
|
||||
principalTable: "Companies",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CompanyContentInfo",
|
||||
columns: table => new
|
||||
@@ -118,6 +157,27 @@ namespace Hushian.Persistence.Migrations
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "prompts",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Cdatetime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CompanyID = table.Column<int>(type: "int", nullable: false),
|
||||
Test = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_prompts", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_prompts_Companies_CompanyID",
|
||||
column: x => x.CompanyID,
|
||||
principalTable: "Companies",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Conversations",
|
||||
columns: table => new
|
||||
@@ -168,8 +228,7 @@ namespace Hushian.Persistence.Migrations
|
||||
name: "FK_EG_Expers_ExperID",
|
||||
column: x => x.ExperID,
|
||||
principalTable: "Expers",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
principalColumn: "ID");
|
||||
table.ForeignKey(
|
||||
name: "FK_EG_Groups_GroupID",
|
||||
column: x => x.GroupID,
|
||||
@@ -210,6 +269,11 @@ namespace Hushian.Persistence.Migrations
|
||||
principalColumn: "ID");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AIAs_CompanyID",
|
||||
table: "AIAs",
|
||||
column: "CompanyID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CompanyContentInfo_CompanyID",
|
||||
table: "CompanyContentInfo",
|
||||
@@ -254,11 +318,19 @@ namespace Hushian.Persistence.Migrations
|
||||
name: "IX_Groups_CompanyID",
|
||||
table: "Groups",
|
||||
column: "CompanyID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_prompts_CompanyID",
|
||||
table: "prompts",
|
||||
column: "CompanyID");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AIAs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "CompanyContentInfo");
|
||||
|
||||
@@ -268,6 +340,12 @@ namespace Hushian.Persistence.Migrations
|
||||
migrationBuilder.DropTable(
|
||||
name: "EG");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "prompts");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "verificationCodes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Conversations");
|
||||
|
||||
Reference in New Issue
Block a user