uid colors
This commit is contained in:
1172
LightlessSyncServer/LightlessSyncShared/Migrations/20250925225205_AddUserVanityFields.Designer.cs
generated
Normal file
1172
LightlessSyncServer/LightlessSyncShared/Migrations/20250925225205_AddUserVanityFields.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,53 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace LightlessSyncServer.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddUserVanityFields : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<bool>(
|
||||||
|
name: "has_vanity",
|
||||||
|
table: "users",
|
||||||
|
type: "boolean",
|
||||||
|
nullable: true,
|
||||||
|
defaultValue: false);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "text_color_hex",
|
||||||
|
table: "users",
|
||||||
|
type: "character varying(9)",
|
||||||
|
maxLength: 9,
|
||||||
|
nullable: true,
|
||||||
|
defaultValue: "");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "text_glow_color_hex",
|
||||||
|
table: "users",
|
||||||
|
type: "character varying(9)",
|
||||||
|
maxLength: 9,
|
||||||
|
nullable: true,
|
||||||
|
defaultValue: "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "has_vanity",
|
||||||
|
table: "users");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "text_color_hex",
|
||||||
|
table: "users");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "text_glow_color_hex",
|
||||||
|
table: "users");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
using LightlessSyncShared.Data;
|
using LightlessSyncShared.Data;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
@@ -683,6 +683,11 @@ namespace LightlessSyncServer.Migrations
|
|||||||
.HasColumnType("character varying(15)")
|
.HasColumnType("character varying(15)")
|
||||||
.HasColumnName("alias");
|
.HasColumnName("alias");
|
||||||
|
|
||||||
|
b.Property<bool?>("HasVanity")
|
||||||
|
.HasColumnType("boolean")
|
||||||
|
.HasDefaultValue(false)
|
||||||
|
.HasColumnName("has_vanity");
|
||||||
|
|
||||||
b.Property<bool>("IsAdmin")
|
b.Property<bool>("IsAdmin")
|
||||||
.HasColumnType("boolean")
|
.HasColumnType("boolean")
|
||||||
.HasColumnName("is_admin");
|
.HasColumnName("is_admin");
|
||||||
@@ -695,6 +700,18 @@ namespace LightlessSyncServer.Migrations
|
|||||||
.HasColumnType("timestamp with time zone")
|
.HasColumnType("timestamp with time zone")
|
||||||
.HasColumnName("last_logged_in");
|
.HasColumnName("last_logged_in");
|
||||||
|
|
||||||
|
b.Property<string>("TextColorHex")
|
||||||
|
.HasMaxLength(9)
|
||||||
|
.HasColumnType("character varying(9)")
|
||||||
|
.HasDefaultValue(string.Empty)
|
||||||
|
.HasColumnName("text_color_hex");
|
||||||
|
|
||||||
|
b.Property<string>("TextGlowColorHex")
|
||||||
|
.HasMaxLength(9)
|
||||||
|
.HasColumnType("character varying(9)")
|
||||||
|
.HasDefaultValue(string.Empty)
|
||||||
|
.HasColumnName("text_glow_color_hex");
|
||||||
|
|
||||||
b.Property<byte[]>("Timestamp")
|
b.Property<byte[]>("Timestamp")
|
||||||
.IsConcurrencyToken()
|
.IsConcurrencyToken()
|
||||||
.ValueGeneratedOnAddOrUpdate()
|
.ValueGeneratedOnAddOrUpdate()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace LightlessSyncShared.Models;
|
namespace LightlessSyncShared.Models;
|
||||||
|
|
||||||
@@ -14,6 +14,14 @@ public class User
|
|||||||
|
|
||||||
public bool IsAdmin { get; set; } = false;
|
public bool IsAdmin { get; set; } = false;
|
||||||
|
|
||||||
|
public bool? HasVanity { get; set; } = false;
|
||||||
|
|
||||||
|
[MaxLength(9)]
|
||||||
|
public string? TextColorHex { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[MaxLength(9)]
|
||||||
|
public string? TextGlowColorHex { get; set; } = string.Empty;
|
||||||
|
|
||||||
public DateTime LastLoggedIn { get; set; }
|
public DateTime LastLoggedIn { get; set; }
|
||||||
[MaxLength(15)]
|
[MaxLength(15)]
|
||||||
public string Alias { get; set; }
|
public string Alias { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user