chat logs
This commit is contained in:
2167
ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.Designer.cs
generated
Normal file
2167
ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class ChatLogs : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ChatLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
UserId = table.Column<int>(nullable: true),
|
||||
Text = table.Column<string>(nullable: true),
|
||||
Time = table.Column<DateTime>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Discriminator = table.Column<string>(nullable: false),
|
||||
FactionId = table.Column<int>(nullable: true),
|
||||
GroupId = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ChatLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_ChatLogs_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_ChatLogs_Factions_FactionId",
|
||||
column: x => x.FactionId,
|
||||
principalTable: "Factions",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_ChatLogs_Groups_GroupId",
|
||||
column: x => x.GroupId,
|
||||
principalTable: "Groups",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChatLogs_UserId",
|
||||
table: "ChatLogs",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChatLogs_FactionId",
|
||||
table: "ChatLogs",
|
||||
column: "FactionId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ChatLogs_GroupId",
|
||||
table: "ChatLogs",
|
||||
column: "GroupId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ChatLogs");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -797,6 +797,35 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
b.ToTable("BankAccountTransactionLogs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Discriminator")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<string>("Text")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<DateTime>("Time")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("ChatLogs");
|
||||
|
||||
b.HasDiscriminator<string>("Discriminator").HasValue("ChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
@@ -1709,6 +1738,72 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
b.ToTable("WhitelistEntries");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.DepartmentChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.HasDiscriminator().HasValue("DepartmentChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.FactionChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.Property<int?>("FactionId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasIndex("FactionId");
|
||||
|
||||
b.HasDiscriminator().HasValue("FactionChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GangChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.HasDiscriminator().HasValue("GangChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.Property<int?>("GroupId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasIndex("GroupId");
|
||||
|
||||
b.HasDiscriminator().HasValue("GroupChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.LeaderChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.HasDiscriminator().HasValue("LeaderChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.LocalChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.HasDiscriminator().HasValue("LocalChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.NewsChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.HasDiscriminator().HasValue("NewsChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.OChatLogEntry", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry");
|
||||
|
||||
b.HasDiscriminator().HasValue("OChatLogEntry");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionVehicle", b =>
|
||||
{
|
||||
b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle");
|
||||
@@ -1912,6 +2007,13 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.User", "User")
|
||||
@@ -2028,6 +2130,20 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.FactionChatLogEntry", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction")
|
||||
.WithMany()
|
||||
.HasForeignKey("FactionId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group")
|
||||
.WithMany()
|
||||
.HasForeignKey("GroupId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group")
|
||||
|
||||
Reference in New Issue
Block a user