Merge branch 'fix-profiles-syncshell' of https://git.lightless-sync.org/Lightless-Sync/LightlessServer into fix-profiles-syncshell

This commit is contained in:
CakeAndBanana
2025-10-15 23:09:12 +02:00
4 changed files with 1227 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LightlessSyncServer.Migrations
{
/// <inheritdoc />
public partial class AddGroupDisabledAndNSFW : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "is_nsfw",
table: "group_profiles",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "profile_disabled",
table: "group_profiles",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "is_nsfw",
table: "group_profiles");
migrationBuilder.DropColumn(
name: "profile_disabled",
table: "group_profiles");
}
}
}

View File

@@ -597,6 +597,14 @@ namespace LightlessSyncServer.Migrations
.HasColumnType("text")
.HasColumnName("description");
b.Property<bool>("IsNSFW")
.HasColumnType("boolean")
.HasColumnName("is_nsfw");
b.Property<bool>("ProfileDisabled")
.HasColumnType("boolean")
.HasColumnName("profile_disabled");
b.Property<string>("Tags")
.HasColumnType("text")
.HasColumnName("tags");

View File

@@ -15,4 +15,6 @@ public class GroupProfile
public string Description { get; set; }
public string Tags { get; set; }
public string Base64GroupProfileImage { get; set; }
public bool IsNSFW { get; set; } = false;
public bool ProfileDisabled { get; set; } = false;
}