mahao
1 year ago
20 changed files with 12571 additions and 131 deletions
@ -0,0 +1,208 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using BaseService.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace BaseService.Migrations |
|||
{ |
|||
[DbContext(typeof(BaseServiceDbContext))] |
|||
[Migration("20230822033456_202308220001")] |
|||
partial class _202308220001 |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.17") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.Branch", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("CascadeId") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<short>("CategoryId") |
|||
.HasColumnType("smallint"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<bool>("Enabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("FullName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<bool>("Leaf") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<Guid?>("Pid") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<int>("Sort") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Pid"); |
|||
|
|||
b.ToTable("base_branches"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.UserBranch", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("BranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("base_user_branches"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => |
|||
{ |
|||
b.Property<Guid>("BranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.HasKey("BranchId", "RoleId"); |
|||
|
|||
b.ToTable("base_branch_role"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.UserBranch", b => |
|||
{ |
|||
b.OwnsMany("BaseService.BaseData.UserBranchRole", "Roles", b1 => |
|||
{ |
|||
b1.Property<Guid>("UserBranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b1.Property<int>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("int") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b1.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b1.HasKey("UserBranchId", "Id"); |
|||
|
|||
b1.ToTable("base_user_branch_role"); |
|||
|
|||
b1.WithOwner() |
|||
.HasForeignKey("UserBranchId"); |
|||
}); |
|||
|
|||
b.Navigation("Roles"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => |
|||
{ |
|||
b.HasOne("BaseService.BaseData.Branch", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("BranchId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.Branch", b => |
|||
{ |
|||
b.Navigation("Roles"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,117 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace BaseService.Migrations |
|||
{ |
|||
public partial class _202308220001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "base_branches", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CategoryId = table.Column<short>(type: "smallint", nullable: false), |
|||
Pid = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false), |
|||
FullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Sort = table.Column<int>(type: "int", nullable: false), |
|||
Leaf = table.Column<bool>(type: "bit", nullable: false), |
|||
CascadeId = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Enabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_base_branches", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "base_user_branches", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_base_user_branches", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "base_branch_role", |
|||
columns: table => new |
|||
{ |
|||
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_base_branch_role", x => new { x.BranchId, x.RoleId }); |
|||
table.ForeignKey( |
|||
name: "FK_base_branch_role_base_branches_BranchId", |
|||
column: x => x.BranchId, |
|||
principalTable: "base_branches", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "base_user_branch_role", |
|||
columns: table => new |
|||
{ |
|||
UserBranchId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Id = table.Column<int>(type: "int", nullable: false) |
|||
.Annotation("SqlServer:Identity", "1, 1"), |
|||
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_base_user_branch_role", x => new { x.UserBranchId, x.Id }); |
|||
table.ForeignKey( |
|||
name: "FK_base_user_branch_role_base_user_branches_UserBranchId", |
|||
column: x => x.UserBranchId, |
|||
principalTable: "base_user_branches", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_base_branches_Pid", |
|||
table: "base_branches", |
|||
column: "Pid"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "base_branch_role"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "base_user_branch_role"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "base_branches"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "base_user_branches"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,208 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using BaseService.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace BaseService.Migrations |
|||
{ |
|||
[DbContext(typeof(BaseServiceDbContext))] |
|||
[Migration("20230822034321_2023082200001")] |
|||
partial class _2023082200001 |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.17") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.Branch", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("CascadeId") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<short>("CategoryId") |
|||
.HasColumnType("smallint"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<bool>("Enabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("FullName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<bool>("Leaf") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<Guid?>("Pid") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<int>("Sort") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Pid"); |
|||
|
|||
b.ToTable("base_branches"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.UserBranch", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("BranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("base_user_branches"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => |
|||
{ |
|||
b.Property<Guid>("BranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.HasKey("BranchId", "RoleId"); |
|||
|
|||
b.ToTable("base_branch_role"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.UserBranch", b => |
|||
{ |
|||
b.OwnsMany("BaseService.BaseData.UserBranchRole", "Roles", b1 => |
|||
{ |
|||
b1.Property<Guid>("UserBranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b1.Property<int>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("int") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b1.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b1.HasKey("UserBranchId", "Id"); |
|||
|
|||
b1.ToTable("base_user_branch_role"); |
|||
|
|||
b1.WithOwner() |
|||
.HasForeignKey("UserBranchId"); |
|||
}); |
|||
|
|||
b.Navigation("Roles"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => |
|||
{ |
|||
b.HasOne("BaseService.BaseData.Branch", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("BranchId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.Branch", b => |
|||
{ |
|||
b.Navigation("Roles"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace BaseService.Migrations |
|||
{ |
|||
public partial class _2023082200001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
|
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,206 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using BaseService.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
|
|||
namespace BaseService.Migrations |
|||
{ |
|||
[DbContext(typeof(BaseServiceDbContext))] |
|||
partial class BaseServiceDbContextModelSnapshot : ModelSnapshot |
|||
{ |
|||
protected override void BuildModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.17") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.Branch", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("CascadeId") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<short>("CategoryId") |
|||
.HasColumnType("smallint"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<bool>("Enabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("FullName") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<bool>("Leaf") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(50) |
|||
.HasColumnType("nvarchar(50)"); |
|||
|
|||
b.Property<Guid?>("Pid") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<int>("Sort") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Pid"); |
|||
|
|||
b.ToTable("base_branches"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.UserBranch", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("BranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<Guid>("UserId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("base_user_branches"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => |
|||
{ |
|||
b.Property<Guid>("BranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.HasKey("BranchId", "RoleId"); |
|||
|
|||
b.ToTable("base_branch_role"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.UserBranch", b => |
|||
{ |
|||
b.OwnsMany("BaseService.BaseData.UserBranchRole", "Roles", b1 => |
|||
{ |
|||
b1.Property<Guid>("UserBranchId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b1.Property<int>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("int") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
b1.Property<Guid>("RoleId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b1.HasKey("UserBranchId", "Id"); |
|||
|
|||
b1.ToTable("base_user_branch_role"); |
|||
|
|||
b1.WithOwner() |
|||
.HasForeignKey("UserBranchId"); |
|||
}); |
|||
|
|||
b.Navigation("Roles"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.RelationBaseData.BranchRole", b => |
|||
{ |
|||
b.HasOne("BaseService.BaseData.Branch", null) |
|||
.WithMany("Roles") |
|||
.HasForeignKey("BranchId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("BaseService.BaseData.Branch", b => |
|||
{ |
|||
b.Navigation("Roles"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,224 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202308120001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("3fc80398-34df-4288-9ad7-37db79c80192")); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_SEC_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_NOT_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_PUB_NOT_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_CAN_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_PUB_CAN_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_ADJ_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_PUB_ADJ_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_SEC_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_NOT_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_HBPO_NOT_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_CAN_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_HBPO_CAN_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_ADJ_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_HBPO_ADJ_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_BBAC_SEC_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_BBAC_NOT_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_BBAC_NOT_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ErpLoc", |
|||
table: "Set_BBAC_CAN_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "RealPartCode", |
|||
table: "Set_BBAC_CAN_SA_DETAIL", |
|||
type: "nvarchar(50)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("0986cf48-5c48-4d14-a7b5-77e0d5da28b9"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "60e9bdd1236e478e861a8d0d950d715b", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("0986cf48-5c48-4d14-a7b5-77e0d5da28b9")); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_SEC_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_PUB_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_PUB_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_PUB_ADJ_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_PUB_ADJ_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_SEC_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_HBPO_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_HBPO_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_HBPO_ADJ_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_HBPO_ADJ_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_BBAC_SEC_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_BBAC_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_BBAC_NOT_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ErpLoc", |
|||
table: "Set_BBAC_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RealPartCode", |
|||
table: "Set_BBAC_CAN_SA_DETAIL"); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("3fc80398-34df-4288-9ad7-37db79c80192"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "b792ebaa809446988e3a5e7887e75ecb", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
} |
|||
} |
|||
} |
File diff suppressed because it is too large
@ -0,0 +1,200 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Win.Sfs.SettleAccount.Migrations |
|||
{ |
|||
public partial class _202308230001 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode", |
|||
table: "Set_VmiBalance"); |
|||
|
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("0986cf48-5c48-4d14-a7b5-77e0d5da28b9")); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiLog", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiLog", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: true, |
|||
oldClrType: typeof(int), |
|||
oldType: "int"); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: true, |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2"); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("daf33f05-698e-49cf-b688-9288f5e94be5"), null, null, 1, null, "2232ce1052044e5db3c50a381547b2bc", null, null, null, "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, null, null, "VinCode", null }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode", |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "BillType", "CodeType", "PartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode" }, |
|||
unique: true, |
|||
filter: "[BillType] IS NOT NULL AND [CodeType] IS NOT NULL AND [PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL"); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropIndex( |
|||
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode", |
|||
table: "Set_VmiBalance"); |
|||
|
|||
migrationBuilder.DeleteData( |
|||
table: "Set_VmiBalance", |
|||
keyColumn: "Id", |
|||
keyValue: new Guid("daf33f05-698e-49cf-b688-9288f5e94be5")); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiLog", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiLog", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiLog", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "SubBillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "DeliverTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<int>( |
|||
name: "BillType", |
|||
table: "Set_VmiBalance", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0, |
|||
oldClrType: typeof(int), |
|||
oldType: "int", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<DateTime>( |
|||
name: "BillTime", |
|||
table: "Set_VmiBalance", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), |
|||
oldClrType: typeof(DateTime), |
|||
oldType: "datetime2", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.InsertData( |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "Id", "BackupTime", "BillTime", "BillType", "CodeType", "ConcurrencyStamp", "Configcode", "CustomerPartCode", "DeliverTime", "ErpToLoc", "MatchNumber", "OrderNum", "PartCode", "PjsNum", "Qty", "ReMark", "RealCode", "Seq", "SubBillType", "UniqueCode", "VinCode", "factory" }, |
|||
values: new object[] { new Guid("0986cf48-5c48-4d14-a7b5-77e0d5da28b9"), null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), 1, null, "60e9bdd1236e478e861a8d0d950d715b", null, null, new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), "ErpToLoc", null, "OrderNum", "PartCode", null, 0m, null, null, null, 0, null, "VinCode", null }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_Set_VmiBalance_BillType_CodeType_PartCode_VinCode_ErpToLoc_OrderNum_factory_Configcode", |
|||
table: "Set_VmiBalance", |
|||
columns: new[] { "BillType", "CodeType", "PartCode", "VinCode", "ErpToLoc", "OrderNum", "factory", "Configcode" }, |
|||
unique: true, |
|||
filter: "[CodeType] IS NOT NULL AND [PartCode] IS NOT NULL AND [VinCode] IS NOT NULL AND [ErpToLoc] IS NOT NULL AND [OrderNum] IS NOT NULL AND [factory] IS NOT NULL AND [Configcode] IS NOT NULL"); |
|||
} |
|||
} |
|||
} |
Loading…
Reference in new issue