forked from gongxuegit/tiku-backend.net
feat: add student profile endpoints
This commit is contained in:
@@ -60,6 +60,7 @@ internal sealed class StudentProfileConfiguration : IEntityTypeConfiguration<Stu
|
||||
builder.ConfigureTimestamps();
|
||||
|
||||
builder.Property(entity => entity.LegacyUserId).HasMaxLength(64);
|
||||
builder.Property(entity => entity.AvatarPreset).HasMaxLength(32).HasDefaultValue("male");
|
||||
builder.Property(entity => entity.Stats).IsJson("{}");
|
||||
builder.Property(entity => entity.Progress).IsJson("{}");
|
||||
builder.Property(entity => entity.ModuleSelections).IsJson("{}");
|
||||
|
||||
15562
Tiku.Infrastructure/Persistence/Migrations/20260726103534_AddStudentProfileAvatarPreset.Designer.cs
generated
Normal file
15562
Tiku.Infrastructure/Persistence/Migrations/20260726103534_AddStudentProfileAvatarPreset.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Tiku.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddStudentProfileAvatarPreset : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "avatar_preset",
|
||||
table: "student_profiles",
|
||||
type: "character varying(32)",
|
||||
maxLength: 32,
|
||||
nullable: false,
|
||||
defaultValue: "male");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "avatar_preset",
|
||||
table: "student_profiles");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7192,6 +7192,14 @@ namespace Tiku.Infrastructure.Persistence.Migrations
|
||||
.HasColumnName("id")
|
||||
.HasDefaultValueSql("gen_random_uuid()");
|
||||
|
||||
b.Property<string>("AvatarPreset")
|
||||
.IsRequired()
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasMaxLength(32)
|
||||
.HasColumnType("character varying(32)")
|
||||
.HasDefaultValue("male")
|
||||
.HasColumnName("avatar_preset");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
|
||||
Reference in New Issue
Block a user