- 移除 `UserInfoController`,新增 `UserControllers` 使用 `UserService` - 添加 `UserService` 用于处理用户信息 - 新增 `UserProfile` DTO - 添加数据库迁移以支持用户表结构
103 lines
3.0 KiB
C#
103 lines
3.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace AGSS.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class newuser : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "AuthId",
|
|
table: "UserModels",
|
|
type: "character varying(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Birthday",
|
|
table: "UserModels",
|
|
type: "character varying(20)",
|
|
maxLength: 20,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Config",
|
|
table: "UserModels",
|
|
type: "character varying(200)",
|
|
maxLength: 200,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Description",
|
|
table: "UserModels",
|
|
type: "character varying(100)",
|
|
maxLength: 100,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "JobCode",
|
|
table: "UserModels",
|
|
type: "character varying(10)",
|
|
maxLength: 10,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "JobName",
|
|
table: "UserModels",
|
|
type: "character varying(10)",
|
|
maxLength: 10,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Sex",
|
|
table: "UserModels",
|
|
type: "character varying(20)",
|
|
maxLength: 20,
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Birthday",
|
|
table: "UserModels");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Config",
|
|
table: "UserModels");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Description",
|
|
table: "UserModels");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobCode",
|
|
table: "UserModels");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "JobName",
|
|
table: "UserModels");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Sex",
|
|
table: "UserModels");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "AuthId",
|
|
table: "UserModels",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(50)",
|
|
oldMaxLength: 50);
|
|
}
|
|
}
|
|
}
|