[reputation] Move reputation to separate module.

This commit is contained in:
West14
2022-02-14 00:18:53 +02:00
parent 6f02031e65
commit a4a44198c5
20 changed files with 595 additions and 228 deletions
@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace West.TelegramBot.Reputation.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterDatabase()
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "UserReputation",
columns: table => new
{
UserId = table.Column<long>(type: "bigint", nullable: false),
ChatId = table.Column<long>(type: "bigint", nullable: false),
Value = table.Column<double>(type: "double", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserReputation", x => new { x.ChatId, x.UserId });
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_UserReputation_ChatId",
table: "UserReputation",
column: "ChatId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "UserReputation");
}
}
}