login logout logs
This commit is contained in:
2051
ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.Designer.cs
generated
Normal file
2051
ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class LoginLogoutLogs : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LoginLogoutLogs",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<long>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Username = table.Column<string>(nullable: true),
|
||||
SocialClubName = table.Column<string>(nullable: true),
|
||||
UserId = table.Column<int>(nullable: true),
|
||||
PlayerId = table.Column<long>(nullable: false),
|
||||
IpAddress = table.Column<string>(nullable: true),
|
||||
LoginLogout = table.Column<bool>(nullable: false),
|
||||
Time = table.Column<DateTime>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LoginLogoutLogs", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_LoginLogoutLogs_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LoginLogoutLogs_UserId",
|
||||
table: "LoginLogoutLogs",
|
||||
column: "UserId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "LoginLogoutLogs");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -872,6 +872,40 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
b.ToTable("DeathLogs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("IpAddress")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<bool>("LoginLogout")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<long>("PlayerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("SocialClubName")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.Property<DateTime>("Time")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<int?>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("LoginLogoutLogs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1898,6 +1932,13 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
.IsRequired();
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b =>
|
||||
{
|
||||
b.HasOne("ReallifeGamemode.Database.Entities.User", "User")
|
||||
|
||||
Reference in New Issue
Block a user