mirror of
https://github.com/SoDOff-Project/sodoff.git
synced 2025-10-12 00:38:48 -07:00

Implements the rating system. Shipwreck Lagoon tracks theoretically work, but there's currently no way of testing them. There is a hack to make the ranked pods section of the blaster party board work. Don't know if that'll cause any issues (but I don't think so). SQLite database schema changes: ```sql CREATE TABLE "RatingRanks" ( "Id" INTEGER NOT NULL, "CategoryID" INTEGER NOT NULL, "RatedEntityID" INTEGER, "RatedUserID" TEXT, "Rank" INTEGER NOT NULL, "RatingAverage" REAL NOT NULL, "UpdateDate" TEXT NOT NULL, CONSTRAINT "PK_RatingRanks" PRIMARY KEY("Id" AUTOINCREMENT) ); CREATE TABLE "Ratings" ( "Id" INTEGER NOT NULL, "VikingId" INTEGER NOT NULL, "RankId" INTEGER NOT NULL, "Value" INTEGER NOT NULL, "Date" TEXT NOT NULL, CONSTRAINT "FK_Ratings_RatingRanks_RankId" FOREIGN KEY("RankId") REFERENCES "RatingRanks"("Id") ON DELETE CASCADE, CONSTRAINT "PK_Ratings" PRIMARY KEY("Id" AUTOINCREMENT), CONSTRAINT "FK_Ratings_Vikings_VikingId" FOREIGN KEY("VikingId") REFERENCES "Vikings"("Id") ON DELETE CASCADE ); ``` --------- Co-authored-by: Robert Paciorek <robert@opcode.eu.org>
14 lines
303 B
C#
14 lines
303 B
C#
using System.Xml.Serialization;
|
|
|
|
namespace sodoff.Schema;
|
|
|
|
[XmlRoot(ElementName = "URRI", Namespace = "")]
|
|
[Serializable]
|
|
public class UserRatingRankInfo {
|
|
[XmlElement(ElementName = "RI")]
|
|
public RatingRankInfo RankInfo;
|
|
|
|
[XmlElement(ElementName = "RUID")]
|
|
public Guid RatedUserID;
|
|
}
|