diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db index 8dd99a73..12c8f14b 100644 Binary files a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db and b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db differ diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm new file mode 100644 index 00000000..fe9ac284 Binary files /dev/null and b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm differ diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-wal b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-wal new file mode 100644 index 00000000..e69de29b diff --git a/Yi.Framework/Yi.Framework.Model/BaseModels/loopModel.cs b/Yi.Framework/Yi.Framework.Model/BaseModels/loopModel.cs index f1d257e5..dd2f16fd 100644 --- a/Yi.Framework/Yi.Framework.Model/BaseModels/loopModel.cs +++ b/Yi.Framework/Yi.Framework.Model/BaseModels/loopModel.cs @@ -8,8 +8,8 @@ namespace Yi.Framework.Model.Models { public class loopModel:baseModel { - public int? is_top { get; set; } - public int? sort { get; set; } - public int? is_show { get; set; } + public int is_top { get; set; } + public int sort { get; set; } + public int is_show { get; set; } } } diff --git a/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.Designer.cs b/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.Designer.cs new file mode 100644 index 00000000..9f3201f1 --- /dev/null +++ b/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.Designer.cs @@ -0,0 +1,227 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Yi.Framework.Model; + +namespace Yi.Framework.Model.Migrations +{ + [DbContext(typeof(DataContext))] + [Migration("20211020073819_yi-3")] + partial class yi3 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "5.0.11"); + + modelBuilder.Entity("Yi.Framework.Model.Models.menu", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("icon") + .HasColumnType("TEXT"); + + b.Property("is_delete") + .HasColumnType("INTEGER"); + + b.Property("is_show") + .HasColumnType("INTEGER"); + + b.Property("is_top") + .HasColumnType("INTEGER"); + + b.Property("menu_name") + .HasColumnType("TEXT"); + + b.Property("menuid") + .HasColumnType("INTEGER"); + + b.Property("mouldid") + .HasColumnType("INTEGER"); + + b.Property("router") + .HasColumnType("TEXT"); + + b.Property("sort") + .HasColumnType("INTEGER"); + + b.HasKey("id"); + + b.HasIndex("menuid"); + + b.HasIndex("mouldid"); + + b.ToTable("menu"); + }); + + modelBuilder.Entity("Yi.Framework.Model.Models.mould", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("is_delete") + .HasColumnType("INTEGER"); + + b.Property("mould_name") + .HasColumnType("TEXT"); + + b.Property("url") + .HasColumnType("TEXT"); + + b.HasKey("id"); + + b.ToTable("mould"); + }); + + modelBuilder.Entity("Yi.Framework.Model.Models.role", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("introduce") + .HasColumnType("TEXT"); + + b.Property("is_delete") + .HasColumnType("INTEGER"); + + b.Property("role_name") + .HasColumnType("TEXT"); + + b.HasKey("id"); + + b.ToTable("role"); + }); + + modelBuilder.Entity("Yi.Framework.Model.Models.user", b => + { + b.Property("id") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("address") + .HasColumnType("TEXT"); + + b.Property("age") + .HasColumnType("INTEGER"); + + b.Property("email") + .HasColumnType("TEXT"); + + b.Property("icon") + .HasColumnType("TEXT"); + + b.Property("introduction") + .HasColumnType("TEXT"); + + b.Property("ip") + .HasColumnType("TEXT"); + + b.Property("is_delete") + .HasColumnType("INTEGER"); + + b.Property("nick") + .HasColumnType("TEXT"); + + b.Property("password") + .HasColumnType("TEXT"); + + b.Property("phone") + .HasColumnType("INTEGER"); + + b.Property("username") + .HasColumnType("TEXT"); + + b.HasKey("id"); + + b.ToTable("user"); + }); + + modelBuilder.Entity("menurole", b => + { + b.Property("menusid") + .HasColumnType("INTEGER"); + + b.Property("rolesid") + .HasColumnType("INTEGER"); + + b.HasKey("menusid", "rolesid"); + + b.HasIndex("rolesid"); + + b.ToTable("menurole"); + }); + + modelBuilder.Entity("roleuser", b => + { + b.Property("rolesid") + .HasColumnType("INTEGER"); + + b.Property("usersid") + .HasColumnType("INTEGER"); + + b.HasKey("rolesid", "usersid"); + + b.HasIndex("usersid"); + + b.ToTable("roleuser"); + }); + + modelBuilder.Entity("Yi.Framework.Model.Models.menu", b => + { + b.HasOne("Yi.Framework.Model.Models.menu", null) + .WithMany("children") + .HasForeignKey("menuid"); + + b.HasOne("Yi.Framework.Model.Models.mould", "mould") + .WithMany() + .HasForeignKey("mouldid"); + + b.Navigation("mould"); + }); + + modelBuilder.Entity("menurole", b => + { + b.HasOne("Yi.Framework.Model.Models.menu", null) + .WithMany() + .HasForeignKey("menusid") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yi.Framework.Model.Models.role", null) + .WithMany() + .HasForeignKey("rolesid") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("roleuser", b => + { + b.HasOne("Yi.Framework.Model.Models.role", null) + .WithMany() + .HasForeignKey("rolesid") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Yi.Framework.Model.Models.user", null) + .WithMany() + .HasForeignKey("usersid") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Yi.Framework.Model.Models.menu", b => + { + b.Navigation("children"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.cs b/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.cs new file mode 100644 index 00000000..a55c374d --- /dev/null +++ b/Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.cs @@ -0,0 +1,87 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Yi.Framework.Model.Migrations +{ + public partial class yi3 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "address", + table: "user", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "phone", + table: "user", + type: "INTEGER", + nullable: true); + + migrationBuilder.AlterColumn( + name: "sort", + table: "menu", + type: "INTEGER", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "INTEGER", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_top", + table: "menu", + type: "INTEGER", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "INTEGER", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "is_show", + table: "menu", + type: "INTEGER", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "INTEGER", + oldNullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "address", + table: "user"); + + migrationBuilder.DropColumn( + name: "phone", + table: "user"); + + migrationBuilder.AlterColumn( + name: "sort", + table: "menu", + type: "INTEGER", + nullable: true, + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "is_top", + table: "menu", + type: "INTEGER", + nullable: true, + oldClrType: typeof(int), + oldType: "INTEGER"); + + migrationBuilder.AlterColumn( + name: "is_show", + table: "menu", + type: "INTEGER", + nullable: true, + oldClrType: typeof(int), + oldType: "INTEGER"); + } + } +} diff --git a/Yi.Framework/Yi.Framework.Model/Migrations/DataContextModelSnapshot.cs b/Yi.Framework/Yi.Framework.Model/Migrations/DataContextModelSnapshot.cs index d4e8522e..33dbad96 100644 --- a/Yi.Framework/Yi.Framework.Model/Migrations/DataContextModelSnapshot.cs +++ b/Yi.Framework/Yi.Framework.Model/Migrations/DataContextModelSnapshot.cs @@ -28,10 +28,10 @@ namespace Yi.Framework.Model.Migrations b.Property("is_delete") .HasColumnType("INTEGER"); - b.Property("is_show") + b.Property("is_show") .HasColumnType("INTEGER"); - b.Property("is_top") + b.Property("is_top") .HasColumnType("INTEGER"); b.Property("menu_name") @@ -46,7 +46,7 @@ namespace Yi.Framework.Model.Migrations b.Property("router") .HasColumnType("TEXT"); - b.Property("sort") + b.Property("sort") .HasColumnType("INTEGER"); b.HasKey("id"); @@ -104,6 +104,9 @@ namespace Yi.Framework.Model.Migrations .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); + b.Property("address") + .HasColumnType("TEXT"); + b.Property("age") .HasColumnType("INTEGER"); @@ -128,6 +131,9 @@ namespace Yi.Framework.Model.Migrations b.Property("password") .HasColumnType("TEXT"); + b.Property("phone") + .HasColumnType("INTEGER"); + b.Property("username") .HasColumnType("TEXT"); diff --git a/Yi.Framework/Yi.Framework.Model/Models/user.cs b/Yi.Framework/Yi.Framework.Model/Models/user.cs index 13237cad..3a6cdeb7 100644 --- a/Yi.Framework/Yi.Framework.Model/Models/user.cs +++ b/Yi.Framework/Yi.Framework.Model/Models/user.cs @@ -17,6 +17,9 @@ namespace Yi.Framework.Model.Models public string ip { get; set; } public int? age { get; set; } public string introduction { get; set; } + public string address { get; set; } + public int? phone { get; set; } + public ICollection roles { get; set; } diff --git a/Yi.Vue/src/views/Index2.vue b/Yi.Vue/src/views/Index2.vue deleted file mode 100644 index cadecbbd..00000000 --- a/Yi.Vue/src/views/Index2.vue +++ /dev/null @@ -1,25 +0,0 @@ - - \ No newline at end of file