Increased "Who am I" length limit

This commit is contained in:
2025-02-09 13:44:01 +08:00
parent 4988481b6c
commit 6e17b22dd1
5 changed files with 147 additions and 5 deletions

View File

@@ -138,10 +138,10 @@ export default function MemberPage() {
</div> </div>
<div className="flex flex-col gap-2"> <div className="flex flex-col gap-2">
<p>Who am I</p> <p>Who am I</p>
<Card className="p-4 bg-white dark:bg-black h-full min-w-96"> <Card className="bg-white dark:bg-black h-full max-h-[352px] min-w-96">
{userProfile.whoAmI.length > 0 ? ( {userProfile.whoAmI.length > 0 ? (
<Markdown <Markdown
className="prose dark:prose-invert prose-neutral overflow-auto w-full h-full" className="prose dark:prose-invert prose-neutral overflow-auto w-full h-full p-6"
remarkPlugins={[remarkGfm]} remarkPlugins={[remarkGfm]}
> >
{userProfile.whoAmI} {userProfile.whoAmI}

View File

@@ -40,7 +40,7 @@ namespace AceJobAgency.Entities
[MaxLength(128)] [MaxLength(128)]
public required string ResumeName { get; set; } public required string ResumeName { get; set; }
[MaxLength(255)] [MaxLength(2048)]
public string WhoAmI { get; set; } = string.Empty; public string WhoAmI { get; set; } = string.Empty;
public int IsActive { get; set; } = 1; public int IsActive { get; set; } = 1;

View File

@@ -0,0 +1,100 @@
// <auto-generated />
using System;
using AceJobAgency.Data;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace AceJobAgency.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("20250209053730_IncreasedWhoamiLimit")]
partial class IncreasedWhoamiLimit
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.2")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("AceJobAgency.Entities.User", b =>
{
b.Property<string>("Id")
.HasMaxLength(36)
.HasColumnType("varchar(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<DateTime>("DateOfBirth")
.HasColumnType("datetime(6)");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<int>("FailedLoginAttempts")
.HasColumnType("int");
b.Property<string>("FirstName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<int>("Gender")
.HasColumnType("int");
b.Property<int>("IsActive")
.HasColumnType("int");
b.Property<bool>("IsLockedOut")
.HasColumnType("tinyint(1)");
b.Property<string>("LastName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("varchar(50)");
b.Property<DateTime?>("LockoutEndTime")
.HasColumnType("datetime(6)");
b.Property<string>("NationalRegistrationIdentityCardNumber")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property<string>("Password")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<string>("ResumeName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<DateTime>("UpdatedAt")
.HasColumnType("datetime(6)");
b.Property<string>("WhoAmI")
.IsRequired()
.HasMaxLength(2048)
.HasColumnType("varchar(2048)");
b.HasKey("Id");
b.ToTable("Users");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AceJobAgency.Migrations
{
/// <inheritdoc />
public partial class IncreasedWhoamiLimit : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "WhoAmI",
table: "Users",
type: "varchar(2048)",
maxLength: 2048,
nullable: false,
oldClrType: typeof(string),
oldType: "varchar(255)",
oldMaxLength: 255)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "WhoAmI",
table: "Users",
type: "varchar(255)",
maxLength: 255,
nullable: false,
oldClrType: typeof(string),
oldType: "varchar(2048)",
oldMaxLength: 2048)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

View File

@@ -84,8 +84,8 @@ namespace AceJobAgency.Migrations
b.Property<string>("WhoAmI") b.Property<string>("WhoAmI")
.IsRequired() .IsRequired()
.HasMaxLength(255) .HasMaxLength(2048)
.HasColumnType("varchar(255)"); .HasColumnType("varchar(2048)");
b.HasKey("Id"); b.HasKey("Id");