feat: Implement a customizable dashboard with user preferences and a dynamic widget system.

This commit is contained in:
2025-12-04 02:58:33 +01:00
parent e70b30cab8
commit 44c0406fd2
23 changed files with 5682 additions and 178 deletions

View File

@@ -0,0 +1,53 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Zentral.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddUserDashboardPreference : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "UserDashboardPreferences",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
UtenteId = table.Column<int>(type: "INTEGER", nullable: false),
LayoutJson = table.Column<string>(type: "TEXT", nullable: false),
CreatedAt = table.Column<DateTime>(type: "TEXT", nullable: true),
CreatedBy = table.Column<string>(type: "TEXT", nullable: true),
UpdatedAt = table.Column<DateTime>(type: "TEXT", nullable: true),
UpdatedBy = table.Column<string>(type: "TEXT", nullable: true),
CustomFieldsJson = table.Column<string>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_UserDashboardPreferences", x => x.Id);
table.ForeignKey(
name: "FK_UserDashboardPreferences_Utenti_UtenteId",
column: x => x.UtenteId,
principalTable: "Utenti",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_UserDashboardPreferences_UtenteId",
table: "UserDashboardPreferences",
column: "UtenteId",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "UserDashboardPreferences");
}
}
}