Implemented new rating system
This commit is contained in:
@@ -29,6 +29,8 @@ public class User
|
||||
public UserStatus Status { get; set; } = UserStatus.Unverified;
|
||||
public bool Admin { get; set; } = false;
|
||||
public bool SupportPending { get; set; } = false;
|
||||
public bool HasRated { get; set; } = false;
|
||||
public int Rating { get; set; } = 0;
|
||||
|
||||
// Security
|
||||
public bool TotpEnabled { get; set; } = false;
|
||||
|
||||
1034
Moonlight/App/Database/Migrations/20230504094654_AddedRatingDataToUser.Designer.cs
generated
Normal file
1034
Moonlight/App/Database/Migrations/20230504094654_AddedRatingDataToUser.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Moonlight.App.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedRatingDataToUser : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "HasRated",
|
||||
table: "Users",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Rating",
|
||||
table: "Users",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HasRated",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Rating",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -733,6 +733,9 @@ namespace Moonlight.App.Database.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("HasRated")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
@@ -741,6 +744,9 @@ namespace Moonlight.App.Database.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<int>("Rating")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
Reference in New Issue
Block a user