*WhitelistStatus hinzugefügt *Servervariablen hinzugefügt: /setsvar
This commit is contained in:
18
ReallifeGamemode.Database/Entities/ServerVariable.cs
Normal file
18
ReallifeGamemode.Database/Entities/ServerVariable.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using GTANetworkAPI;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public partial class ServerVariable
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Variable { get; set; }
|
||||
|
||||
public int Value { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
1882
ReallifeGamemode.Database/Migrations/20210331203931_SVars.Designer.cs
generated
Normal file
1882
ReallifeGamemode.Database/Migrations/20210331203931_SVars.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
51
ReallifeGamemode.Database/Migrations/20210331203931_SVars.cs
Normal file
51
ReallifeGamemode.Database/Migrations/20210331203931_SVars.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace ReallifeGamemode.Database.Migrations
|
||||
{
|
||||
public partial class SVars : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "failpoints",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "warn",
|
||||
table: "Users",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "ServerVariables",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
Variable = table.Column<string>(nullable: true),
|
||||
Value = table.Column<int>(nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_ServerVariables", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "ServerVariables");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "failpoints",
|
||||
table: "Users");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "warn",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1121,6 +1121,23 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
b.ToTable("TextLabels");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVariable", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Value")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Variable")
|
||||
.HasColumnType("longtext CHARACTER SET utf8mb4");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("ServerVariables");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVehicle", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
@@ -1415,12 +1432,18 @@ namespace ReallifeGamemode.Database.Migrations
|
||||
b.Property<bool>("WeaponLicense")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<int>("failpoints")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("otheramount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("trashcount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("warn")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BanId");
|
||||
|
||||
@@ -152,6 +152,9 @@ namespace ReallifeGamemode.Database.Models
|
||||
|
||||
//ItemShop
|
||||
public DbSet<Entities.ShopItem> ShopItems { get; set; }
|
||||
|
||||
//Server Variablen
|
||||
public DbSet<Entities.ServerVariable> ServerVariables { get; set; }
|
||||
}
|
||||
|
||||
public class DesignTimeDbContextFactory : IDesignTimeDbContextFactory<DatabaseContext>
|
||||
|
||||
Reference in New Issue
Block a user