学籍异动:休学、复学、退学申请及辅导员→学院→教务处分级审批。

毕业审核:批次计算、缺失课程检查、人工复核、结果发布。
学位授予:毕业资格与 GPA 计算、人工调整、发布授予结果。
毕业离校:离校事项配置、责任角色分工、逐项办理及批次关闭。
This commit is contained in:
2026-07-24 17:30:05 +08:00 Unverified
parent 7493ab4a60
commit b0eaa20da6
34 changed files with 11137 additions and 8 deletions
@@ -0,0 +1,128 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql
{
/// <inheritdoc />
public partial class GraduationClearance : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "GraduationClearanceBatches",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false),
Name = table.Column<string>(type: "varchar(120)", maxLength: 120, nullable: false),
GraduationYear = table.Column<int>(type: "int", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
Notes = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true),
ClosedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GraduationClearanceBatches", x => x.Id);
})
.Annotation("MySQL:Charset", "utf8mb4");
migrationBuilder.CreateTable(
name: "GraduationClearanceItems",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false),
GraduationClearanceBatchId = table.Column<Guid>(type: "char(36)", nullable: false),
Code = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: false),
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false),
ResponsibleUnit = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false),
ResponsibleRole = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: false),
IsRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
SortOrder = table.Column<int>(type: "int", nullable: false),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GraduationClearanceItems", x => x.Id);
table.ForeignKey(
name: "FK_GraduationClearanceItems_GraduationClearanceBatches_Graduati~",
column: x => x.GraduationClearanceBatchId,
principalTable: "GraduationClearanceBatches",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySQL:Charset", "utf8mb4");
migrationBuilder.CreateTable(
name: "GraduationClearanceRecords",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false),
GraduationClearanceItemId = table.Column<Guid>(type: "char(36)", nullable: false),
StudentId = table.Column<Guid>(type: "char(36)", nullable: false),
Status = table.Column<int>(type: "int", nullable: false),
Notes = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true),
CompletedAt = table.Column<DateTime>(type: "datetime(6)", nullable: true),
CompletedByUserId = table.Column<Guid>(type: "char(36)", nullable: true),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GraduationClearanceRecords", x => x.Id);
table.ForeignKey(
name: "FK_GraduationClearanceRecords_GraduationClearanceItems_Graduati~",
column: x => x.GraduationClearanceItemId,
principalTable: "GraduationClearanceItems",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_GraduationClearanceRecords_Students_StudentId",
column: x => x.StudentId,
principalTable: "Students",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
})
.Annotation("MySQL:Charset", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_GraduationClearanceBatches_GraduationYear_Status",
table: "GraduationClearanceBatches",
columns: new[] { "GraduationYear", "Status" });
migrationBuilder.CreateIndex(
name: "IX_GraduationClearanceItems_GraduationClearanceBatchId_Code",
table: "GraduationClearanceItems",
columns: new[] { "GraduationClearanceBatchId", "Code" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_GraduationClearanceRecords_GraduationClearanceItemId_Student~",
table: "GraduationClearanceRecords",
columns: new[] { "GraduationClearanceItemId", "StudentId" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_GraduationClearanceRecords_StudentId_Status",
table: "GraduationClearanceRecords",
columns: new[] { "StudentId", "Status" });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "GraduationClearanceRecords");
migrationBuilder.DropTable(
name: "GraduationClearanceItems");
migrationBuilder.DropTable(
name: "GraduationClearanceBatches");
}
}
}