Files
hamkadr/src/JobsMedical.Web/Migrations/20260604181750_UserProfileMedia.cs
T
soroush.asadi e633463906
CI/CD / CI · dotnet build (push) Successful in 44s
CI/CD / Deploy · hamkadr (push) Successful in 57s
[Profile] Editable profile (avatar + resume) + role-based profile dropdown menu
Every user gets a full editable profile at /Me/Profile: name, role, city, specialty/title, license, years, bio + avatar image upload + resume upload (PDF/image). Avatar/resume stored in-DB on User (migration, 5 nullable columns). Endpoints: /avatar/{id} (public) and /resume/{id} (owner, admin, or an employer who received that user's application). Nav: replaced the scattered action links with an avatar button + dropdown listing all of the user's pages by role (profile, کارجو panel, alerts, preferences, notifications; employer panel; admin panel + settings; logout) — shows the avatar image or initials; collapses into the burger menu on mobile; closes on outside-click.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 21:49:40 +03:30

72 lines
2.0 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace JobsMedical.Web.Migrations
{
/// <inheritdoc />
public partial class UserProfileMedia : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<byte[]>(
name: "Avatar",
table: "Users",
type: "bytea",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "AvatarContentType",
table: "Users",
type: "character varying(100)",
maxLength: 100,
nullable: true);
migrationBuilder.AddColumn<byte[]>(
name: "Resume",
table: "Users",
type: "bytea",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ResumeContentType",
table: "Users",
type: "character varying(120)",
maxLength: 120,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ResumeFileName",
table: "Users",
type: "character varying(200)",
maxLength: 200,
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Avatar",
table: "Users");
migrationBuilder.DropColumn(
name: "AvatarContentType",
table: "Users");
migrationBuilder.DropColumn(
name: "Resume",
table: "Users");
migrationBuilder.DropColumn(
name: "ResumeContentType",
table: "Users");
migrationBuilder.DropColumn(
name: "ResumeFileName",
table: "Users");
}
}
}