feat: add student profile endpoints

This commit is contained in:
xiong
2026-07-26 18:36:28 +08:00
parent 5715869d29
commit 387b85342a
12 changed files with 16275 additions and 0 deletions

View File

@@ -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("{}");

View File

@@ -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");
}
}
}

View File

@@ -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")