forked from SoDOff-Project/sodoff

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>
11 lines
294 B
C#
11 lines
294 B
C#
using System.Xml.Serialization;
|
|
|
|
namespace sodoff.Schema;
|
|
|
|
[XmlRoot(ElementName = "ArrayOfUserRatingRankInfo", Namespace = "")]
|
|
[Serializable]
|
|
public class ArrayOfUserRatingRankInfo {
|
|
[XmlElement(ElementName = "UserRatingRankInfo")]
|
|
public UserRatingRankInfo[] UserRatingRankInfo;
|
|
}
|