Add MCDO (#31)
* rudimentary charadata first impl * update submodule * update properly * some fixes etc * add cascade and some other fixes * most of charadata impl * dotnet 9 * net9 and migration to k4os * bum papi --------- Co-authored-by: Stanley Dimant <root.darkarchon@outlook.com>
This commit is contained in:
@@ -45,37 +45,84 @@ public class MareDbContext : DbContext
|
||||
public DbSet<UserProfileData> UserProfileData { get; set; }
|
||||
public DbSet<UserProfileDataReport> UserProfileReports { get; set; }
|
||||
public DbSet<User> Users { get; set; }
|
||||
public DbSet<CharaData> CharaData { get; set; }
|
||||
public DbSet<CharaDataFile> CharaDataFiles { get; set; }
|
||||
public DbSet<CharaDataFileSwap> CharaDataFileSwaps { get; set; }
|
||||
public DbSet<CharaDataOriginalFile> CharaDataOriginalFiles { get; set; }
|
||||
public DbSet<CharaDataPose> CharaDataPoses { get; set; }
|
||||
public DbSet<CharaDataAllowance> CharaDataAllowances { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
protected override void OnModelCreating(ModelBuilder mb)
|
||||
{
|
||||
modelBuilder.Entity<Auth>().ToTable("auth");
|
||||
modelBuilder.Entity<User>().ToTable("users");
|
||||
modelBuilder.Entity<FileCache>().ToTable("file_caches");
|
||||
modelBuilder.Entity<FileCache>().HasIndex(c => c.UploaderUID);
|
||||
modelBuilder.Entity<ClientPair>().ToTable("client_pairs");
|
||||
modelBuilder.Entity<ClientPair>().HasKey(u => new { u.UserUID, u.OtherUserUID });
|
||||
modelBuilder.Entity<ClientPair>().HasIndex(c => c.UserUID);
|
||||
modelBuilder.Entity<ClientPair>().HasIndex(c => c.OtherUserUID);
|
||||
modelBuilder.Entity<ForbiddenUploadEntry>().ToTable("forbidden_upload_entries");
|
||||
modelBuilder.Entity<Banned>().ToTable("banned_users");
|
||||
modelBuilder.Entity<LodeStoneAuth>().ToTable("lodestone_auth");
|
||||
modelBuilder.Entity<BannedRegistrations>().ToTable("banned_registrations");
|
||||
modelBuilder.Entity<Group>().ToTable("groups");
|
||||
modelBuilder.Entity<Group>().HasIndex(c => c.OwnerUID);
|
||||
modelBuilder.Entity<GroupPair>().ToTable("group_pairs");
|
||||
modelBuilder.Entity<GroupPair>().HasKey(u => new { u.GroupGID, u.GroupUserUID });
|
||||
modelBuilder.Entity<GroupPair>().HasIndex(c => c.GroupUserUID);
|
||||
modelBuilder.Entity<GroupPair>().HasIndex(c => c.GroupGID);
|
||||
modelBuilder.Entity<GroupBan>().ToTable("group_bans");
|
||||
modelBuilder.Entity<GroupBan>().HasKey(u => new { u.GroupGID, u.BannedUserUID });
|
||||
modelBuilder.Entity<GroupBan>().HasIndex(c => c.BannedUserUID);
|
||||
modelBuilder.Entity<GroupBan>().HasIndex(c => c.GroupGID);
|
||||
modelBuilder.Entity<GroupTempInvite>().ToTable("group_temp_invites");
|
||||
modelBuilder.Entity<GroupTempInvite>().HasKey(u => new { u.GroupGID, u.Invite });
|
||||
modelBuilder.Entity<GroupTempInvite>().HasIndex(c => c.GroupGID);
|
||||
modelBuilder.Entity<GroupTempInvite>().HasIndex(c => c.Invite);
|
||||
modelBuilder.Entity<UserProfileData>().ToTable("user_profile_data");
|
||||
modelBuilder.Entity<UserProfileData>().HasKey(c => c.UserUID);
|
||||
modelBuilder.Entity<UserProfileDataReport>().ToTable("user_profile_data_reports");
|
||||
mb.Entity<Auth>().ToTable("auth");
|
||||
mb.Entity<User>().ToTable("users");
|
||||
mb.Entity<FileCache>().ToTable("file_caches");
|
||||
mb.Entity<FileCache>().HasIndex(c => c.UploaderUID);
|
||||
mb.Entity<ClientPair>().ToTable("client_pairs");
|
||||
mb.Entity<ClientPair>().HasKey(u => new { u.UserUID, u.OtherUserUID });
|
||||
mb.Entity<ClientPair>().HasIndex(c => c.UserUID);
|
||||
mb.Entity<ClientPair>().HasIndex(c => c.OtherUserUID);
|
||||
mb.Entity<ForbiddenUploadEntry>().ToTable("forbidden_upload_entries");
|
||||
mb.Entity<Banned>().ToTable("banned_users");
|
||||
mb.Entity<LodeStoneAuth>().ToTable("lodestone_auth");
|
||||
mb.Entity<BannedRegistrations>().ToTable("banned_registrations");
|
||||
mb.Entity<Group>().ToTable("groups");
|
||||
mb.Entity<Group>().HasIndex(c => c.OwnerUID);
|
||||
mb.Entity<GroupPair>().ToTable("group_pairs");
|
||||
mb.Entity<GroupPair>().HasKey(u => new { u.GroupGID, u.GroupUserUID });
|
||||
mb.Entity<GroupPair>().HasIndex(c => c.GroupUserUID);
|
||||
mb.Entity<GroupPair>().HasIndex(c => c.GroupGID);
|
||||
mb.Entity<GroupBan>().ToTable("group_bans");
|
||||
mb.Entity<GroupBan>().HasKey(u => new { u.GroupGID, u.BannedUserUID });
|
||||
mb.Entity<GroupBan>().HasIndex(c => c.BannedUserUID);
|
||||
mb.Entity<GroupBan>().HasIndex(c => c.GroupGID);
|
||||
mb.Entity<GroupTempInvite>().ToTable("group_temp_invites");
|
||||
mb.Entity<GroupTempInvite>().HasKey(u => new { u.GroupGID, u.Invite });
|
||||
mb.Entity<GroupTempInvite>().HasIndex(c => c.GroupGID);
|
||||
mb.Entity<GroupTempInvite>().HasIndex(c => c.Invite);
|
||||
mb.Entity<UserProfileData>().ToTable("user_profile_data");
|
||||
mb.Entity<UserProfileData>().HasKey(c => c.UserUID);
|
||||
mb.Entity<UserProfileDataReport>().ToTable("user_profile_data_reports");
|
||||
mb.Entity<CharaData>().ToTable("chara_data");
|
||||
mb.Entity<CharaData>()
|
||||
.HasMany(p => p.Poses)
|
||||
.WithOne(c => c.Parent)
|
||||
.HasForeignKey(c => new { c.ParentId, c.ParentUploaderUID });
|
||||
mb.Entity<CharaData>()
|
||||
.HasMany(p => p.Files)
|
||||
.WithOne(c => c.Parent)
|
||||
.HasForeignKey(c => new { c.ParentId, c.ParentUploaderUID });
|
||||
mb.Entity<CharaData>()
|
||||
.HasMany(p => p.OriginalFiles)
|
||||
.WithOne(p => p.Parent)
|
||||
.HasForeignKey(p => new { p.ParentId, p.ParentUploaderUID });
|
||||
mb.Entity<CharaData>()
|
||||
.HasMany(p => p.AllowedIndividiuals)
|
||||
.WithOne(p => p.Parent)
|
||||
.HasForeignKey(p => new { p.ParentId, p.ParentUploaderUID });
|
||||
mb.Entity<CharaData>()
|
||||
.HasMany(p => p.FileSwaps)
|
||||
.WithOne(p => p.Parent)
|
||||
.HasForeignKey(p => new { p.ParentId, p.ParentUploaderUID });
|
||||
mb.Entity<CharaData>().HasKey(p => new { p.Id, p.UploaderUID });
|
||||
mb.Entity<CharaData>().HasIndex(p => p.UploaderUID);
|
||||
mb.Entity<CharaData>().HasIndex(p => p.Id);
|
||||
mb.Entity<CharaDataFile>().ToTable("chara_data_files");
|
||||
mb.Entity<CharaDataFile>().HasKey(c => new { c.ParentId, c.ParentUploaderUID, c.GamePath });
|
||||
mb.Entity<CharaDataFile>().HasIndex(c => c.ParentId);
|
||||
mb.Entity<CharaDataFile>().HasOne(f => f.FileCache).WithMany().HasForeignKey(f => f.FileCacheHash).OnDelete(DeleteBehavior.Cascade);
|
||||
mb.Entity<CharaDataFileSwap>().ToTable("chara_data_file_swaps");
|
||||
mb.Entity<CharaDataFileSwap>().HasKey(c => new { c.ParentId, c.ParentUploaderUID, c.GamePath });
|
||||
mb.Entity<CharaDataFileSwap>().HasIndex(c => c.ParentId);
|
||||
mb.Entity<CharaDataPose>().ToTable("chara_data_poses");
|
||||
mb.Entity<CharaDataPose>().Property(p => p.Id).ValueGeneratedOnAdd();
|
||||
mb.Entity<CharaDataPose>().HasKey(c => new { c.ParentId, c.ParentUploaderUID, c.Id });
|
||||
mb.Entity<CharaDataPose>().HasIndex(c => c.ParentId);
|
||||
mb.Entity<CharaDataOriginalFile>().ToTable("chara_data_orig_files");
|
||||
mb.Entity<CharaDataOriginalFile>().HasKey(c => new { c.ParentId, c.ParentUploaderUID, c.GamePath });
|
||||
mb.Entity<CharaDataOriginalFile>().HasIndex(c => c.ParentId);
|
||||
mb.Entity<CharaDataAllowance>().ToTable("chara_data_allowance");
|
||||
mb.Entity<CharaDataAllowance>().HasKey(c => new { c.ParentId, c.ParentUploaderUID, c.AllowedUserUID });
|
||||
mb.Entity<CharaDataAllowance>().HasIndex(c => c.ParentId);
|
||||
}
|
||||
}
|
||||
1024
MareSynchronosServer/MareSynchronosShared/Migrations/20241226112428_CharaData.Designer.cs
generated
Normal file
1024
MareSynchronosServer/MareSynchronosShared/Migrations/20241226112428_CharaData.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,198 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MareSynchronosServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CharaData : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "chara_data",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<string>(type: "text", nullable: false),
|
||||
uploader_uid = table.Column<string>(type: "character varying(10)", nullable: false),
|
||||
created_date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
updated_date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||
description = table.Column<string>(type: "text", nullable: true),
|
||||
access_type = table.Column<int>(type: "integer", nullable: false),
|
||||
share_type = table.Column<int>(type: "integer", nullable: false),
|
||||
expiry_date = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
|
||||
glamourer_data = table.Column<string>(type: "text", nullable: true),
|
||||
customize_data = table.Column<string>(type: "text", nullable: true),
|
||||
download_count = table.Column<int>(type: "integer", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_chara_data", x => new { x.id, x.uploader_uid });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_users_uploader_uid",
|
||||
column: x => x.uploader_uid,
|
||||
principalTable: "users",
|
||||
principalColumn: "uid",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "chara_data_allowance",
|
||||
columns: table => new
|
||||
{
|
||||
parent_id = table.Column<string>(type: "text", nullable: false),
|
||||
parent_uploader_uid = table.Column<string>(type: "character varying(10)", nullable: false),
|
||||
allowed_user_uid = table.Column<string>(type: "character varying(10)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_chara_data_allowance", x => new { x.parent_id, x.parent_uploader_uid, x.allowed_user_uid });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_allowance_chara_data_parent_id_parent_uploader_u",
|
||||
columns: x => new { x.parent_id, x.parent_uploader_uid },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_allowance_users_allowed_user_uid",
|
||||
column: x => x.allowed_user_uid,
|
||||
principalTable: "users",
|
||||
principalColumn: "uid",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "chara_data_files",
|
||||
columns: table => new
|
||||
{
|
||||
game_path = table.Column<string>(type: "text", nullable: false),
|
||||
parent_id = table.Column<string>(type: "text", nullable: false),
|
||||
file_cache_hash = table.Column<string>(type: "character varying(40)", nullable: true),
|
||||
parent_uploader_uid = table.Column<string>(type: "character varying(10)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_chara_data_files", x => new { x.parent_id, x.game_path });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_files_chara_data_parent_id_parent_uploader_uid",
|
||||
columns: x => new { x.parent_id, x.parent_uploader_uid },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_files_files_file_cache_hash",
|
||||
column: x => x.file_cache_hash,
|
||||
principalTable: "file_caches",
|
||||
principalColumn: "hash");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "chara_data_orig_files",
|
||||
columns: table => new
|
||||
{
|
||||
parent_id = table.Column<string>(type: "text", nullable: false),
|
||||
parent_uploader_uid = table.Column<string>(type: "character varying(10)", nullable: false),
|
||||
hash = table.Column<string>(type: "text", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_chara_data_orig_files", x => new { x.parent_id, x.parent_uploader_uid, x.hash });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_orig_files_chara_data_parent_id_parent_uploader_",
|
||||
columns: x => new { x.parent_id, x.parent_uploader_uid },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "chara_data_poses",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
parent_id = table.Column<string>(type: "text", nullable: false),
|
||||
parent_uploader_uid = table.Column<string>(type: "character varying(10)", nullable: false),
|
||||
description = table.Column<string>(type: "text", nullable: true),
|
||||
pose_data = table.Column<string>(type: "text", nullable: true),
|
||||
world_data = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_chara_data_poses", x => new { x.parent_id, x.parent_uploader_uid, x.id });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_poses_chara_data_parent_id_parent_uploader_uid",
|
||||
columns: x => new { x.parent_id, x.parent_uploader_uid },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_id",
|
||||
table: "chara_data",
|
||||
column: "id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_uploader_uid",
|
||||
table: "chara_data",
|
||||
column: "uploader_uid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_allowance_allowed_user_uid",
|
||||
table: "chara_data_allowance",
|
||||
column: "allowed_user_uid");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_allowance_parent_id",
|
||||
table: "chara_data_allowance",
|
||||
column: "parent_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_files_file_cache_hash",
|
||||
table: "chara_data_files",
|
||||
column: "file_cache_hash");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_files_parent_id",
|
||||
table: "chara_data_files",
|
||||
column: "parent_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_files_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_orig_files_parent_id",
|
||||
table: "chara_data_orig_files",
|
||||
column: "parent_id");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_poses_parent_id",
|
||||
table: "chara_data_poses",
|
||||
column: "parent_id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "chara_data_allowance");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "chara_data_files");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "chara_data_orig_files");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "chara_data_poses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "chara_data");
|
||||
}
|
||||
}
|
||||
}
|
||||
1064
MareSynchronosServer/MareSynchronosShared/Migrations/20241226194944_CharaDataFileSwap.Designer.cs
generated
Normal file
1064
MareSynchronosServer/MareSynchronosShared/Migrations/20241226194944_CharaDataFileSwap.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,114 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MareSynchronosServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CharaDataFileSwap : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_chara_data_files_chara_data_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "pk_chara_data_files",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "ix_chara_data_files_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "parent_uploader_uid",
|
||||
table: "chara_data_files",
|
||||
type: "character varying(10)",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(10)",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_chara_data_files",
|
||||
table: "chara_data_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid", "game_path" });
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "chara_data_file_swaps",
|
||||
columns: table => new
|
||||
{
|
||||
parent_id = table.Column<string>(type: "text", nullable: false),
|
||||
parent_uploader_uid = table.Column<string>(type: "character varying(10)", nullable: false),
|
||||
game_path = table.Column<string>(type: "text", nullable: false),
|
||||
file_path = table.Column<string>(type: "text", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("pk_chara_data_file_swaps", x => new { x.parent_id, x.parent_uploader_uid, x.game_path });
|
||||
table.ForeignKey(
|
||||
name: "fk_chara_data_file_swaps_chara_data_parent_id_parent_uploader_",
|
||||
columns: x => new { x.parent_id, x.parent_uploader_uid },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_file_swaps_parent_id",
|
||||
table: "chara_data_file_swaps",
|
||||
column: "parent_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "fk_chara_data_files_chara_data_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid" },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" },
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_chara_data_files_chara_data_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "chara_data_file_swaps");
|
||||
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "pk_chara_data_files",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "parent_uploader_uid",
|
||||
table: "chara_data_files",
|
||||
type: "character varying(10)",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(10)");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_chara_data_files",
|
||||
table: "chara_data_files",
|
||||
columns: new[] { "parent_id", "game_path" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "ix_chara_data_files_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid" });
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "fk_chara_data_files_chara_data_parent_id_parent_uploader_uid",
|
||||
table: "chara_data_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid" },
|
||||
principalTable: "chara_data",
|
||||
principalColumns: new[] { "id", "uploader_uid" });
|
||||
}
|
||||
}
|
||||
}
|
||||
1065
MareSynchronosServer/MareSynchronosShared/Migrations/20241227130901_CascadeFile.Designer.cs
generated
Normal file
1065
MareSynchronosServer/MareSynchronosShared/Migrations/20241227130901_CascadeFile.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,41 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MareSynchronosServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class CascadeFile : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_chara_data_files_files_file_cache_hash",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "fk_chara_data_files_files_file_cache_hash",
|
||||
table: "chara_data_files",
|
||||
column: "file_cache_hash",
|
||||
principalTable: "file_caches",
|
||||
principalColumn: "hash",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "fk_chara_data_files_files_file_cache_hash",
|
||||
table: "chara_data_files");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "fk_chara_data_files_files_file_cache_hash",
|
||||
table: "chara_data_files",
|
||||
column: "file_cache_hash",
|
||||
principalTable: "file_caches",
|
||||
principalColumn: "hash");
|
||||
}
|
||||
}
|
||||
}
|
||||
1069
MareSynchronosServer/MareSynchronosShared/Migrations/20241227190944_OrigFileGamePath.Designer.cs
generated
Normal file
1069
MareSynchronosServer/MareSynchronosShared/Migrations/20241227190944_OrigFileGamePath.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MareSynchronosServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OrigFileGamePath : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "pk_chara_data_orig_files",
|
||||
table: "chara_data_orig_files");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "hash",
|
||||
table: "chara_data_orig_files",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "game_path",
|
||||
table: "chara_data_orig_files",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_chara_data_orig_files",
|
||||
table: "chara_data_orig_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid", "game_path" });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "pk_chara_data_orig_files",
|
||||
table: "chara_data_orig_files");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "game_path",
|
||||
table: "chara_data_orig_files");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "hash",
|
||||
table: "chara_data_orig_files",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "pk_chara_data_orig_files",
|
||||
table: "chara_data_orig_files",
|
||||
columns: new[] { "parent_id", "parent_uploader_uid", "hash" });
|
||||
}
|
||||
}
|
||||
}
|
||||
1073
MareSynchronosServer/MareSynchronosShared/Migrations/20241228190750_ManipData.Designer.cs
generated
Normal file
1073
MareSynchronosServer/MareSynchronosShared/Migrations/20241228190750_ManipData.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace MareSynchronosServer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ManipData : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "manipulation_data",
|
||||
table: "chara_data",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "manipulation_data",
|
||||
table: "chara_data");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,216 @@ namespace MareSynchronosServer.Migrations
|
||||
b.ToTable("banned_registrations", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaData", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<string>("UploaderUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("uploader_uid");
|
||||
|
||||
b.Property<int>("AccessType")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("access_type");
|
||||
|
||||
b.Property<DateTime>("CreatedDate")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_date");
|
||||
|
||||
b.Property<string>("CustomizeData")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("customize_data");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("description");
|
||||
|
||||
b.Property<int>("DownloadCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("download_count");
|
||||
|
||||
b.Property<DateTime?>("ExpiryDate")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("expiry_date");
|
||||
|
||||
b.Property<string>("GlamourerData")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("glamourer_data");
|
||||
|
||||
b.Property<string>("ManipulationData")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("manipulation_data");
|
||||
|
||||
b.Property<int>("ShareType")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("share_type");
|
||||
|
||||
b.Property<DateTime>("UpdatedDate")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("updated_date");
|
||||
|
||||
b.HasKey("Id", "UploaderUID")
|
||||
.HasName("pk_chara_data");
|
||||
|
||||
b.HasIndex("Id")
|
||||
.HasDatabaseName("ix_chara_data_id");
|
||||
|
||||
b.HasIndex("UploaderUID")
|
||||
.HasDatabaseName("ix_chara_data_uploader_uid");
|
||||
|
||||
b.ToTable("chara_data", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataAllowance", b =>
|
||||
{
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("parent_id");
|
||||
|
||||
b.Property<string>("ParentUploaderUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("parent_uploader_uid");
|
||||
|
||||
b.Property<string>("AllowedUserUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("allowed_user_uid");
|
||||
|
||||
b.HasKey("ParentId", "ParentUploaderUID", "AllowedUserUID")
|
||||
.HasName("pk_chara_data_allowance");
|
||||
|
||||
b.HasIndex("AllowedUserUID")
|
||||
.HasDatabaseName("ix_chara_data_allowance_allowed_user_uid");
|
||||
|
||||
b.HasIndex("ParentId")
|
||||
.HasDatabaseName("ix_chara_data_allowance_parent_id");
|
||||
|
||||
b.ToTable("chara_data_allowance", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataFile", b =>
|
||||
{
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("parent_id");
|
||||
|
||||
b.Property<string>("ParentUploaderUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("parent_uploader_uid");
|
||||
|
||||
b.Property<string>("GamePath")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("game_path");
|
||||
|
||||
b.Property<string>("FileCacheHash")
|
||||
.HasColumnType("character varying(40)")
|
||||
.HasColumnName("file_cache_hash");
|
||||
|
||||
b.HasKey("ParentId", "ParentUploaderUID", "GamePath")
|
||||
.HasName("pk_chara_data_files");
|
||||
|
||||
b.HasIndex("FileCacheHash")
|
||||
.HasDatabaseName("ix_chara_data_files_file_cache_hash");
|
||||
|
||||
b.HasIndex("ParentId")
|
||||
.HasDatabaseName("ix_chara_data_files_parent_id");
|
||||
|
||||
b.ToTable("chara_data_files", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataFileSwap", b =>
|
||||
{
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("parent_id");
|
||||
|
||||
b.Property<string>("ParentUploaderUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("parent_uploader_uid");
|
||||
|
||||
b.Property<string>("GamePath")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("game_path");
|
||||
|
||||
b.Property<string>("FilePath")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("file_path");
|
||||
|
||||
b.HasKey("ParentId", "ParentUploaderUID", "GamePath")
|
||||
.HasName("pk_chara_data_file_swaps");
|
||||
|
||||
b.HasIndex("ParentId")
|
||||
.HasDatabaseName("ix_chara_data_file_swaps_parent_id");
|
||||
|
||||
b.ToTable("chara_data_file_swaps", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataOriginalFile", b =>
|
||||
{
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("parent_id");
|
||||
|
||||
b.Property<string>("ParentUploaderUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("parent_uploader_uid");
|
||||
|
||||
b.Property<string>("GamePath")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("game_path");
|
||||
|
||||
b.Property<string>("Hash")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("hash");
|
||||
|
||||
b.HasKey("ParentId", "ParentUploaderUID", "GamePath")
|
||||
.HasName("pk_chara_data_orig_files");
|
||||
|
||||
b.HasIndex("ParentId")
|
||||
.HasDatabaseName("ix_chara_data_orig_files_parent_id");
|
||||
|
||||
b.ToTable("chara_data_orig_files", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataPose", b =>
|
||||
{
|
||||
b.Property<string>("ParentId")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("parent_id");
|
||||
|
||||
b.Property<string>("ParentUploaderUID")
|
||||
.HasColumnType("character varying(10)")
|
||||
.HasColumnName("parent_uploader_uid");
|
||||
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint")
|
||||
.HasColumnName("id");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("description");
|
||||
|
||||
b.Property<string>("PoseData")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("pose_data");
|
||||
|
||||
b.Property<string>("WorldData")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("world_data");
|
||||
|
||||
b.HasKey("ParentId", "ParentUploaderUID", "Id")
|
||||
.HasName("pk_chara_data_poses");
|
||||
|
||||
b.HasIndex("ParentId")
|
||||
.HasDatabaseName("ix_chara_data_poses_parent_id");
|
||||
|
||||
b.ToTable("chara_data_poses", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.ClientPair", b =>
|
||||
{
|
||||
b.Property<string>("UserUID")
|
||||
@@ -513,6 +723,95 @@ namespace MareSynchronosServer.Migrations
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaData", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.User", "Uploader")
|
||||
.WithMany()
|
||||
.HasForeignKey("UploaderUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_users_uploader_uid");
|
||||
|
||||
b.Navigation("Uploader");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataAllowance", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.User", "AllowedUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("AllowedUserUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_allowance_users_allowed_user_uid");
|
||||
|
||||
b.HasOne("MareSynchronosShared.Models.CharaData", "Parent")
|
||||
.WithMany("AllowedIndividiuals")
|
||||
.HasForeignKey("ParentId", "ParentUploaderUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_allowance_chara_data_parent_id_parent_uploader_u");
|
||||
|
||||
b.Navigation("AllowedUser");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataFile", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.FileCache", "FileCache")
|
||||
.WithMany()
|
||||
.HasForeignKey("FileCacheHash")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.HasConstraintName("fk_chara_data_files_files_file_cache_hash");
|
||||
|
||||
b.HasOne("MareSynchronosShared.Models.CharaData", "Parent")
|
||||
.WithMany("Files")
|
||||
.HasForeignKey("ParentId", "ParentUploaderUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_files_chara_data_parent_id_parent_uploader_uid");
|
||||
|
||||
b.Navigation("FileCache");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataFileSwap", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.CharaData", "Parent")
|
||||
.WithMany("FileSwaps")
|
||||
.HasForeignKey("ParentId", "ParentUploaderUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_file_swaps_chara_data_parent_id_parent_uploader_");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataOriginalFile", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.CharaData", "Parent")
|
||||
.WithMany("OriginalFiles")
|
||||
.HasForeignKey("ParentId", "ParentUploaderUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_orig_files_chara_data_parent_id_parent_uploader_");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaDataPose", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.CharaData", "Parent")
|
||||
.WithMany("Poses")
|
||||
.HasForeignKey("ParentId", "ParentUploaderUID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired()
|
||||
.HasConstraintName("fk_chara_data_poses_chara_data_parent_id_parent_uploader_uid");
|
||||
|
||||
b.Navigation("Parent");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.ClientPair", b =>
|
||||
{
|
||||
b.HasOne("MareSynchronosShared.Models.User", "OtherUser")
|
||||
@@ -653,6 +952,19 @@ namespace MareSynchronosServer.Migrations
|
||||
|
||||
b.Navigation("ReportingUser");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("MareSynchronosShared.Models.CharaData", b =>
|
||||
{
|
||||
b.Navigation("AllowedIndividiuals");
|
||||
|
||||
b.Navigation("FileSwaps");
|
||||
|
||||
b.Navigation("Files");
|
||||
|
||||
b.Navigation("OriginalFiles");
|
||||
|
||||
b.Navigation("Poses");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace MareSynchronosShared.Models;
|
||||
|
||||
public enum CharaDataAccess
|
||||
{
|
||||
Individuals,
|
||||
ClosePairs,
|
||||
AllPairs,
|
||||
Public
|
||||
}
|
||||
|
||||
public enum CharaDataShare
|
||||
{
|
||||
Private,
|
||||
Shared
|
||||
}
|
||||
|
||||
public class CharaData
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public virtual User Uploader { get; set; }
|
||||
public string UploaderUID { get; set; }
|
||||
public DateTime CreatedDate { get; set; }
|
||||
public DateTime UpdatedDate { get; set; }
|
||||
public string Description { get; set; }
|
||||
public CharaDataAccess AccessType { get; set; }
|
||||
public CharaDataShare ShareType { get; set; }
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
public string? GlamourerData { get; set; }
|
||||
public string? CustomizeData { get; set; }
|
||||
public string? ManipulationData { get; set; }
|
||||
public int DownloadCount { get; set; } = 0;
|
||||
public virtual ICollection<CharaDataPose> Poses { get; set; } = [];
|
||||
public virtual ICollection<CharaDataFile> Files { get; set; } = [];
|
||||
public virtual ICollection<CharaDataFileSwap> FileSwaps { get; set; } = [];
|
||||
public virtual ICollection<CharaDataOriginalFile> OriginalFiles { get; set; } = [];
|
||||
public virtual ICollection<CharaDataAllowance> AllowedIndividiuals { get; set; } = [];
|
||||
}
|
||||
|
||||
public class CharaDataAllowance
|
||||
{
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public virtual User AllowedUser { get; set; }
|
||||
public string AllowedUserUID { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataOriginalFile
|
||||
{
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public string GamePath { get; set; }
|
||||
public string Hash { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataFile
|
||||
{
|
||||
public virtual FileCache FileCache { get; set; }
|
||||
public string FileCacheHash { get; set; }
|
||||
public string GamePath { get; set; }
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataFileSwap
|
||||
{
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public string GamePath { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
}
|
||||
|
||||
public class CharaDataPose
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public virtual CharaData Parent { get; set; }
|
||||
public string ParentId { get; set; }
|
||||
public string ParentUploaderUID { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string PoseData { get; set; }
|
||||
public string WorldData { get; set; }
|
||||
}
|
||||
@@ -25,6 +25,9 @@ public class ServerConfiguration : MareConfigurationBase
|
||||
[RemoteConfiguration]
|
||||
public int PurgeUnusedAccountsPeriodInDays { get; set; } = 14;
|
||||
|
||||
[RemoteConfiguration]
|
||||
public int MaxCharaDataByUser { get; set; } = 10;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new();
|
||||
@@ -37,6 +40,7 @@ public class ServerConfiguration : MareConfigurationBase
|
||||
sb.AppendLine($"{nameof(MaxGroupUserCount)} => {MaxGroupUserCount}");
|
||||
sb.AppendLine($"{nameof(PurgeUnusedAccounts)} => {PurgeUnusedAccounts}");
|
||||
sb.AppendLine($"{nameof(PurgeUnusedAccountsPeriodInDays)} => {PurgeUnusedAccountsPeriodInDays}");
|
||||
sb.AppendLine($"{nameof(MaxCharaDataByUser)} => {MaxCharaDataByUser}");
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user