更改数据库字段
This commit is contained in:
Binary file not shown.
BIN
Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm
Normal file
BIN
Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db-shm
Normal file
Binary file not shown.
@@ -8,8 +8,8 @@ namespace Yi.Framework.Model.Models
|
||||
{
|
||||
public class loopModel:baseModel<int>
|
||||
{
|
||||
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; }
|
||||
}
|
||||
}
|
||||
|
||||
227
Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.Designer.cs
generated
Normal file
227
Yi.Framework/Yi.Framework.Model/Migrations/20211020073819_yi-3.Designer.cs
generated
Normal file
@@ -0,0 +1,227 @@
|
||||
// <auto-generated />
|
||||
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<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("icon")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("is_delete")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("is_show")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("is_top")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("menu_name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("menuid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("mouldid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("router")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("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<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("is_delete")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("mould_name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("url")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("mould");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yi.Framework.Model.Models.role", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("introduce")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("is_delete")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("role_name")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("role");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Yi.Framework.Model.Models.user", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("address")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("age")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("email")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("icon")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("introduction")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("ip")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("is_delete")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("nick")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("password")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("phone")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("username")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("user");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("menurole", b =>
|
||||
{
|
||||
b.Property<int>("menusid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("rolesid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("menusid", "rolesid");
|
||||
|
||||
b.HasIndex("rolesid");
|
||||
|
||||
b.ToTable("menurole");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("roleuser", b =>
|
||||
{
|
||||
b.Property<int>("rolesid")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int>("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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<string>(
|
||||
name: "address",
|
||||
table: "user",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "phone",
|
||||
table: "user",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "sort",
|
||||
table: "menu",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "is_top",
|
||||
table: "menu",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
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<int>(
|
||||
name: "sort",
|
||||
table: "menu",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "is_top",
|
||||
table: "menu",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "is_show",
|
||||
table: "menu",
|
||||
type: "INTEGER",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "INTEGER");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,10 +28,10 @@ namespace Yi.Framework.Model.Migrations
|
||||
b.Property<int>("is_delete")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("is_show")
|
||||
b.Property<int>("is_show")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("is_top")
|
||||
b.Property<int>("is_top")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("menu_name")
|
||||
@@ -46,7 +46,7 @@ namespace Yi.Framework.Model.Migrations
|
||||
b.Property<string>("router")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("sort")
|
||||
b.Property<int>("sort")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("id");
|
||||
@@ -104,6 +104,9 @@ namespace Yi.Framework.Model.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("address")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("age")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
@@ -128,6 +131,9 @@ namespace Yi.Framework.Model.Migrations
|
||||
b.Property<string>("password")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("phone")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("username")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
|
||||
@@ -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<role> roles { get; set; }
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<MaterialCard
|
||||
title="首页卡片"
|
||||
subtitle="微软(Microsoft)是一家美国跨国科技企业,由比尔·盖茨和保罗·艾伦于1975年4月4日创立。"
|
||||
heading="头部"
|
||||
color="#E91E63"
|
||||
:fullHeader="false"
|
||||
icon="mdi-view-dashboard"
|
||||
></MaterialCard>
|
||||
<MaterialCharCard></MaterialCharCard>
|
||||
<MaterialSnackbar></MaterialSnackbar>
|
||||
<MaterialStatCard
|
||||
value="微软(Microsoft)是一家美国跨国科技企业,由比尔·盖茨和保罗·艾伦于1975年4月4日创立。"
|
||||
>
|
||||
<template v-slot> 还有什么呢? </template>
|
||||
</MaterialStatCard>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({}),
|
||||
created() {},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user