Added initial migration

This commit is contained in:
hydrant
2019-02-26 19:58:39 +01:00
parent 77d257cda2
commit 82d418c7cc
4 changed files with 2879 additions and 4 deletions

4
.gitignore vendored
View File

@@ -332,7 +332,3 @@ ASALocalRun/
# Local History for Visual Studio # Local History for Visual Studio
.localhistory/ .localhistory/
# Migrations Folder
Migrations/
/Properties/launchSettings.json

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,881 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
namespace ReallifeGamemode.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "BankAccountTransactionLogs",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Sender = table.Column<string>(maxLength: 32, nullable: true),
SenderBalance = table.Column<int>(nullable: false),
MoneySent = table.Column<int>(nullable: false),
Receiver = table.Column<string>(maxLength: 32, nullable: true),
ReceiverBalance = table.Column<int>(nullable: false),
NewSenderBalance = table.Column<int>(nullable: false),
NewReceiverBalance = table.Column<int>(nullable: false),
Fee = table.Column<int>(nullable: false),
Origin = table.Column<string>(maxLength: 32, nullable: true),
Timestamp = table.Column<DateTime>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
},
constraints: table =>
{
table.PrimaryKey("PK_BankAccountTransactionLogs", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Blips",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Sprite = table.Column<short>(nullable: false),
PositionX = table.Column<float>(nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
Name = table.Column<string>(nullable: true),
Scale = table.Column<float>(nullable: false),
Color = table.Column<byte>(nullable: false),
Alpha = table.Column<byte>(nullable: false),
DrawDistance = table.Column<float>(nullable: false),
ShortRange = table.Column<bool>(nullable: false),
Rotation = table.Column<float>(nullable: false),
Dimension = table.Column<byte>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Blips", x => x.Id);
});
migrationBuilder.CreateTable(
name: "BusinessBankAccounts",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Balance = table.Column<int>(nullable: false),
BusinessId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_BusinessBankAccounts", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ClothCombinations",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Gender = table.Column<bool>(nullable: false),
Top = table.Column<int>(nullable: false),
Torso = table.Column<int>(nullable: false),
Undershirt = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClothCombinations", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Factions",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(maxLength: 32, nullable: true),
StateOwned = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Factions", x => x.Id);
});
migrationBuilder.CreateTable(
name: "GotoPoints",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Description = table.Column<string>(maxLength: 32, nullable: true),
X = table.Column<float>(nullable: false),
Y = table.Column<float>(nullable: false),
Z = table.Column<float>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_GotoPoints", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Interiors",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(nullable: true),
EnterPosition = table.Column<string>(nullable: true),
ExitPosition = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Interiors", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Markers",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Type = table.Column<byte>(nullable: false),
PositionX = table.Column<float>(nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
Scale = table.Column<float>(nullable: false),
DirectionX = table.Column<float>(nullable: false),
DirectionY = table.Column<float>(nullable: false),
DirectionZ = table.Column<float>(nullable: false),
RotationX = table.Column<float>(nullable: false),
RotationY = table.Column<float>(nullable: false),
RotationZ = table.Column<float>(nullable: false),
ColorR = table.Column<byte>(nullable: false),
ColorG = table.Column<byte>(nullable: false),
ColorB = table.Column<byte>(nullable: false),
ColorA = table.Column<byte>(nullable: false),
Visible = table.Column<bool>(nullable: false),
Dimension = table.Column<byte>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Markers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Peds",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
HashModel = table.Column<string>(nullable: true),
PositionX = table.Column<float>(nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
Heading = table.Column<float>(nullable: false),
Dimension = table.Column<byte>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Peds", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Pickups",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
PositionX = table.Column<float>(maxLength: 128, nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
RotationX = table.Column<float>(nullable: false),
RotationY = table.Column<float>(nullable: false),
RotationZ = table.Column<float>(nullable: false),
Vehicle = table.Column<bool>(nullable: false),
RespawnTime = table.Column<int>(nullable: false),
Dimension = table.Column<byte>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Pickups", x => x.Id);
});
migrationBuilder.CreateTable(
name: "TextLabels",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Text = table.Column<string>(nullable: false),
PositionX = table.Column<float>(nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
LOS = table.Column<bool>(nullable: false),
Font = table.Column<byte>(nullable: false),
DrawDistance = table.Column<float>(nullable: false),
ColorR = table.Column<byte>(nullable: false),
ColorG = table.Column<byte>(nullable: false),
ColorB = table.Column<byte>(nullable: false),
ColorA = table.Column<byte>(nullable: false),
Dimension = table.Column<byte>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TextLabels", x => x.Id);
});
migrationBuilder.CreateTable(
name: "WhitelistEntries",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
SocialClubName = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_WhitelistEntries", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Doors",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Category = table.Column<string>(nullable: true),
Name = table.Column<string>(nullable: true),
Locked = table.Column<bool>(nullable: false),
Model = table.Column<int>(nullable: false),
X = table.Column<float>(nullable: false),
Y = table.Column<float>(nullable: false),
Z = table.Column<float>(nullable: false),
Radius = table.Column<float>(nullable: false),
FactionId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Doors", x => x.Id);
table.ForeignKey(
name: "FK_Doors_Factions_FactionId",
column: x => x.FactionId,
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "DutyClothes",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
FactionId = table.Column<int>(nullable: false),
Gender = table.Column<bool>(nullable: false),
SlotType = table.Column<byte>(nullable: false),
SlotId = table.Column<int>(nullable: false),
ClothId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DutyClothes", x => x.Id);
table.ForeignKey(
name: "FK_DutyClothes_Factions_FactionId",
column: x => x.FactionId,
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FactionBankAccounts",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
FactionId = table.Column<int>(nullable: false),
Bic = table.Column<string>(maxLength: 12, nullable: true),
Iban = table.Column<string>(maxLength: 32, nullable: true),
Balance = table.Column<int>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FactionBankAccounts", x => x.Id);
table.ForeignKey(
name: "FK_FactionBankAccounts_Factions_FactionId",
column: x => x.FactionId,
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "FactionRanks",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
RankName = table.Column<string>(nullable: true),
Order = table.Column<int>(nullable: false),
FactionId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_FactionRanks", x => x.Id);
table.ForeignKey(
name: "FK_FactionRanks_Factions_FactionId",
column: x => x.FactionId,
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Users",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Name = table.Column<string>(maxLength: 32, nullable: true),
SocialClubName = table.Column<string>(maxLength: 32, nullable: true),
Password = table.Column<string>(maxLength: 64, nullable: true),
LogUserId = table.Column<int>(nullable: false),
RegistrationDate = table.Column<DateTime>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Email = table.Column<string>(maxLength: 64, nullable: true),
AdminLevel = table.Column<int>(nullable: false),
Dead = table.Column<bool>(nullable: false),
PositionX = table.Column<float>(nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
CharacterId = table.Column<int>(nullable: true),
BanId = table.Column<int>(nullable: true),
FactionId = table.Column<int>(nullable: true),
FactionLeader = table.Column<bool>(nullable: false),
FactionRankId = table.Column<int>(nullable: true),
BusinessId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Users", x => x.Id);
table.ForeignKey(
name: "FK_Users_Factions_FactionId",
column: x => x.FactionId,
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_Users_FactionRanks_FactionRankId",
column: x => x.FactionRankId,
principalTable: "FactionRanks",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "Bans",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<int>(nullable: false),
Reason = table.Column<string>(nullable: true),
BannedBy = table.Column<string>(nullable: true),
Applied = table.Column<int>(nullable: false),
UntilDateTime = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Bans", x => x.Id);
table.ForeignKey(
name: "FK_Bans_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "CharacterClothes",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<int>(nullable: false),
Duty = table.Column<bool>(nullable: false),
SlotType = table.Column<byte>(nullable: false),
SlotId = table.Column<int>(nullable: false),
ClothId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CharacterClothes", x => x.Id);
table.ForeignKey(
name: "FK_CharacterClothes_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Characters",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<int>(nullable: false),
Gender = table.Column<bool>(nullable: false),
Father = table.Column<byte>(nullable: false),
Mother = table.Column<byte>(nullable: false),
Similarity = table.Column<float>(nullable: false),
SkinSimilarity = table.Column<float>(nullable: false),
NoseWidth = table.Column<float>(nullable: false),
NoseBottomHeight = table.Column<float>(nullable: false),
NoseTipLength = table.Column<float>(nullable: false),
NoseBridgeDepth = table.Column<float>(nullable: false),
NoseTipHeight = table.Column<float>(nullable: false),
NoseBroken = table.Column<float>(nullable: false),
BrowHeight = table.Column<float>(nullable: false),
BrowDepth = table.Column<float>(nullable: false),
CheekboneHeight = table.Column<float>(nullable: false),
CheekboneWidth = table.Column<float>(nullable: false),
CheekDepth = table.Column<float>(nullable: false),
EyeSize = table.Column<float>(nullable: false),
LipThickness = table.Column<float>(nullable: false),
JawWidth = table.Column<float>(nullable: false),
JawShape = table.Column<float>(nullable: false),
ChinHeight = table.Column<float>(nullable: false),
ChinDepth = table.Column<float>(nullable: false),
ChinWidth = table.Column<float>(nullable: false),
ChinIndent = table.Column<float>(nullable: false),
NeckWidth = table.Column<float>(nullable: false),
Blemishes = table.Column<byte>(nullable: false),
BlemishesOpacity = table.Column<float>(nullable: false),
FacialHair = table.Column<byte>(nullable: false),
FacialHairOpacity = table.Column<float>(nullable: false),
Eyebrows = table.Column<byte>(nullable: false),
EyebrowsOpacity = table.Column<float>(nullable: false),
Ageing = table.Column<byte>(nullable: false),
AgeingOpacity = table.Column<float>(nullable: false),
Makeup = table.Column<byte>(nullable: false),
MakeupOpacity = table.Column<float>(nullable: false),
Blush = table.Column<byte>(nullable: false),
BlushOpacity = table.Column<float>(nullable: false),
Complexion = table.Column<byte>(nullable: false),
ComplexionOpacity = table.Column<float>(nullable: false),
SunDamage = table.Column<byte>(nullable: false),
SunDamageOpacity = table.Column<float>(nullable: false),
Lipstick = table.Column<byte>(nullable: false),
LipstickOpacity = table.Column<float>(nullable: false),
Freckles = table.Column<byte>(nullable: false),
FrecklesOpacity = table.Column<float>(nullable: false),
ChestHair = table.Column<byte>(nullable: false),
ChestHairOpacity = table.Column<float>(nullable: false),
Hair = table.Column<byte>(nullable: false),
HairColor = table.Column<byte>(nullable: false),
HairHighlightColor = table.Column<byte>(nullable: false),
EyebrowColor = table.Column<byte>(nullable: false),
BeardColor = table.Column<byte>(nullable: false),
EyeColor = table.Column<byte>(nullable: false),
BlushColor = table.Column<byte>(nullable: false),
LipstickColor = table.Column<byte>(nullable: false),
ChestHairColor = table.Column<byte>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Characters", x => x.Id);
table.ForeignKey(
name: "FK_Characters_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "DeathLogs",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
VictimId = table.Column<int>(nullable: false),
KillerId = table.Column<int>(nullable: true),
VictimPositionX = table.Column<float>(nullable: false),
VictimPositionY = table.Column<float>(nullable: false),
VictimPositionZ = table.Column<float>(nullable: false),
VictimHeading = table.Column<float>(nullable: false),
KillerPositionX = table.Column<float>(nullable: false),
KillerPositionY = table.Column<float>(nullable: false),
KillerPositionZ = table.Column<float>(nullable: false),
KillerHeading = table.Column<float>(nullable: false),
CauseOfDeath = table.Column<string>(maxLength: 64, nullable: true),
Timestamp = table.Column<DateTime>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn)
},
constraints: table =>
{
table.PrimaryKey("PK_DeathLogs", x => x.Id);
table.ForeignKey(
name: "FK_DeathLogs_Users_KillerId",
column: x => x.KillerId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_DeathLogs_Users_VictimId",
column: x => x.VictimId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "News",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<int>(nullable: true),
Caption = table.Column<string>(nullable: true),
Content = table.Column<string>(nullable: true),
Active = table.Column<bool>(nullable: false),
Timestamp = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_News", x => x.Id);
table.ForeignKey(
name: "FK_News_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "ServerVehicles",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
Model = table.Column<uint>(nullable: false),
PositionX = table.Column<float>(nullable: false),
PositionY = table.Column<float>(nullable: false),
PositionZ = table.Column<float>(nullable: false),
Heading = table.Column<float>(nullable: false),
NumberPlate = table.Column<string>(maxLength: 8, nullable: true),
PrimaryColor = table.Column<int>(nullable: false),
SecondaryColor = table.Column<int>(nullable: false),
Locked = table.Column<bool>(nullable: false),
Active = table.Column<bool>(nullable: false, defaultValue: true),
Discriminator = table.Column<string>(nullable: false),
FactionId = table.Column<int>(nullable: true),
ShopId = table.Column<int>(nullable: true),
BusinessId = table.Column<int>(nullable: true),
Price = table.Column<int>(nullable: true),
UserId = table.Column<int>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ServerVehicles", x => x.Id);
table.ForeignKey(
name: "FK_ServerVehicles_Factions_FactionId",
column: x => x.FactionId,
principalTable: "Factions",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_ServerVehicles_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "UserBankAccounts",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
UserId = table.Column<int>(nullable: false),
Bic = table.Column<string>(maxLength: 12, nullable: true),
Iban = table.Column<string>(maxLength: 32, nullable: true),
Balance = table.Column<int>(nullable: false),
Active = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserBankAccounts", x => x.Id);
table.ForeignKey(
name: "FK_UserBankAccounts_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "UserItems",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ItemId = table.Column<int>(nullable: false),
UserId = table.Column<int>(nullable: false),
Amount = table.Column<int>(nullable: false),
Slot = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserItems", x => x.Id);
table.ForeignKey(
name: "FK_UserItems_Users_UserId",
column: x => x.UserId,
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "VehicleMods",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
ServerVehicleId = table.Column<int>(nullable: false),
Slot = table.Column<int>(nullable: false),
ModId = table.Column<int>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_VehicleMods", x => x.Id);
table.ForeignKey(
name: "FK_VehicleMods_ServerVehicles_ServerVehicleId",
column: x => x.ServerVehicleId,
principalTable: "ServerVehicles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Bans_UserId",
table: "Bans",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_BusinessBankAccounts_BusinessId",
table: "BusinessBankAccounts",
column: "BusinessId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_CharacterClothes_UserId",
table: "CharacterClothes",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_Characters_UserId",
table: "Characters",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_DeathLogs_KillerId",
table: "DeathLogs",
column: "KillerId");
migrationBuilder.CreateIndex(
name: "IX_DeathLogs_VictimId",
table: "DeathLogs",
column: "VictimId");
migrationBuilder.CreateIndex(
name: "IX_Doors_FactionId",
table: "Doors",
column: "FactionId");
migrationBuilder.CreateIndex(
name: "IX_DutyClothes_FactionId",
table: "DutyClothes",
column: "FactionId");
migrationBuilder.CreateIndex(
name: "IX_FactionBankAccounts_FactionId",
table: "FactionBankAccounts",
column: "FactionId");
migrationBuilder.CreateIndex(
name: "IX_FactionRanks_FactionId",
table: "FactionRanks",
column: "FactionId");
migrationBuilder.CreateIndex(
name: "IX_News_UserId",
table: "News",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_ServerVehicles_FactionId",
table: "ServerVehicles",
column: "FactionId");
migrationBuilder.CreateIndex(
name: "IX_ServerVehicles_UserId",
table: "ServerVehicles",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_UserBankAccounts_UserId",
table: "UserBankAccounts",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_UserItems_UserId",
table: "UserItems",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_Users_BanId",
table: "Users",
column: "BanId");
migrationBuilder.CreateIndex(
name: "IX_Users_BusinessId",
table: "Users",
column: "BusinessId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_Users_CharacterId",
table: "Users",
column: "CharacterId");
migrationBuilder.CreateIndex(
name: "IX_Users_FactionId",
table: "Users",
column: "FactionId");
migrationBuilder.CreateIndex(
name: "IX_Users_FactionRankId",
table: "Users",
column: "FactionRankId");
migrationBuilder.CreateIndex(
name: "IX_VehicleMods_ServerVehicleId_Slot",
table: "VehicleMods",
columns: new[] { "ServerVehicleId", "Slot" },
unique: true);
migrationBuilder.AddForeignKey(
name: "FK_Users_Bans_BanId",
table: "Users",
column: "BanId",
principalTable: "Bans",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Users_Characters_CharacterId",
table: "Users",
column: "CharacterId",
principalTable: "Characters",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Bans_Users_UserId",
table: "Bans");
migrationBuilder.DropForeignKey(
name: "FK_Characters_Users_UserId",
table: "Characters");
migrationBuilder.DropTable(
name: "BankAccountTransactionLogs");
migrationBuilder.DropTable(
name: "Blips");
migrationBuilder.DropTable(
name: "BusinessBankAccounts");
migrationBuilder.DropTable(
name: "CharacterClothes");
migrationBuilder.DropTable(
name: "ClothCombinations");
migrationBuilder.DropTable(
name: "DeathLogs");
migrationBuilder.DropTable(
name: "Doors");
migrationBuilder.DropTable(
name: "DutyClothes");
migrationBuilder.DropTable(
name: "FactionBankAccounts");
migrationBuilder.DropTable(
name: "GotoPoints");
migrationBuilder.DropTable(
name: "Interiors");
migrationBuilder.DropTable(
name: "Markers");
migrationBuilder.DropTable(
name: "News");
migrationBuilder.DropTable(
name: "Peds");
migrationBuilder.DropTable(
name: "Pickups");
migrationBuilder.DropTable(
name: "TextLabels");
migrationBuilder.DropTable(
name: "UserBankAccounts");
migrationBuilder.DropTable(
name: "UserItems");
migrationBuilder.DropTable(
name: "VehicleMods");
migrationBuilder.DropTable(
name: "WhitelistEntries");
migrationBuilder.DropTable(
name: "ServerVehicles");
migrationBuilder.DropTable(
name: "Users");
migrationBuilder.DropTable(
name: "Bans");
migrationBuilder.DropTable(
name: "Characters");
migrationBuilder.DropTable(
name: "FactionRanks");
migrationBuilder.DropTable(
name: "Factions");
}
}
}

View File

@@ -0,0 +1,998 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using reallife_gamemode.Server.Models;
namespace ReallifeGamemode.Migrations
{
[DbContext(typeof(DatabaseContext))]
partial class DatabaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.0-rtm-35687")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
modelBuilder.Entity("reallife_gamemode.Server.Entities.Ban", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Applied");
b.Property<string>("BannedBy");
b.Property<string>("Reason");
b.Property<int>("UntilDateTime");
b.Property<int>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Bans");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.BusinessBankAccount", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Balance");
b.Property<int>("BusinessId");
b.HasKey("Id");
b.HasIndex("BusinessId")
.IsUnique();
b.ToTable("BusinessBankAccounts");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Character", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<byte>("Ageing");
b.Property<float>("AgeingOpacity");
b.Property<byte>("BeardColor");
b.Property<byte>("Blemishes");
b.Property<float>("BlemishesOpacity");
b.Property<byte>("Blush");
b.Property<byte>("BlushColor");
b.Property<float>("BlushOpacity");
b.Property<float>("BrowDepth");
b.Property<float>("BrowHeight");
b.Property<float>("CheekDepth");
b.Property<float>("CheekboneHeight");
b.Property<float>("CheekboneWidth");
b.Property<byte>("ChestHair");
b.Property<byte>("ChestHairColor");
b.Property<float>("ChestHairOpacity");
b.Property<float>("ChinDepth");
b.Property<float>("ChinHeight");
b.Property<float>("ChinIndent");
b.Property<float>("ChinWidth");
b.Property<byte>("Complexion");
b.Property<float>("ComplexionOpacity");
b.Property<byte>("EyeColor");
b.Property<float>("EyeSize");
b.Property<byte>("EyebrowColor");
b.Property<byte>("Eyebrows");
b.Property<float>("EyebrowsOpacity");
b.Property<byte>("FacialHair");
b.Property<float>("FacialHairOpacity");
b.Property<byte>("Father");
b.Property<byte>("Freckles");
b.Property<float>("FrecklesOpacity");
b.Property<bool>("Gender");
b.Property<byte>("Hair");
b.Property<byte>("HairColor");
b.Property<byte>("HairHighlightColor");
b.Property<float>("JawShape");
b.Property<float>("JawWidth");
b.Property<float>("LipThickness");
b.Property<byte>("Lipstick");
b.Property<byte>("LipstickColor");
b.Property<float>("LipstickOpacity");
b.Property<byte>("Makeup");
b.Property<float>("MakeupOpacity");
b.Property<byte>("Mother");
b.Property<float>("NeckWidth");
b.Property<float>("NoseBottomHeight");
b.Property<float>("NoseBridgeDepth");
b.Property<float>("NoseBroken");
b.Property<float>("NoseTipHeight");
b.Property<float>("NoseTipLength");
b.Property<float>("NoseWidth");
b.Property<float>("Similarity");
b.Property<float>("SkinSimilarity");
b.Property<byte>("SunDamage");
b.Property<float>("SunDamageOpacity");
b.Property<int>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("Characters");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.CharacterCloth", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("ClothId");
b.Property<bool>("Duty");
b.Property<int>("SlotId");
b.Property<byte>("SlotType");
b.Property<int>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("CharacterClothes");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.ClothCombination", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Gender");
b.Property<int>("Top");
b.Property<int>("Torso");
b.Property<int>("Undershirt");
b.HasKey("Id");
b.ToTable("ClothCombinations");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Door", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Category");
b.Property<int?>("FactionId");
b.Property<bool>("Locked");
b.Property<int>("Model");
b.Property<string>("Name");
b.Property<float>("Radius");
b.Property<float>("X");
b.Property<float>("Y");
b.Property<float>("Z");
b.HasKey("Id");
b.HasIndex("FactionId");
b.ToTable("Doors");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.DutyCloth", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("ClothId");
b.Property<int>("FactionId");
b.Property<bool>("Gender");
b.Property<int>("SlotId");
b.Property<byte>("SlotType");
b.HasKey("Id");
b.HasIndex("FactionId");
b.ToTable("DutyClothes");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Faction", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.HasMaxLength(32);
b.Property<bool>("StateOwned");
b.HasKey("Id");
b.ToTable("Factions");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.FactionBankAccount", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<int>("Balance");
b.Property<string>("Bic")
.HasMaxLength(12);
b.Property<int>("FactionId");
b.Property<string>("Iban")
.HasMaxLength(32);
b.HasKey("Id");
b.HasIndex("FactionId");
b.ToTable("FactionBankAccounts");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.FactionRank", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("FactionId");
b.Property<int>("Order");
b.Property<string>("RankName");
b.HasKey("Id");
b.HasIndex("FactionId");
b.ToTable("FactionRanks");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.GotoPoint", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<string>("Description")
.HasMaxLength(32);
b.Property<float>("X");
b.Property<float>("Y");
b.Property<float>("Z");
b.HasKey("Id");
b.ToTable("GotoPoints");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Interior", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("EnterPositionStr")
.HasColumnName("EnterPosition");
b.Property<string>("ExitPositionStr")
.HasColumnName("ExitPosition");
b.Property<string>("Name");
b.HasKey("Id");
b.ToTable("Interiors");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.News", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<string>("Caption");
b.Property<string>("Content");
b.Property<int>("Timestamp");
b.Property<int?>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("News");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.ServerVehicle", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active")
.ValueGeneratedOnAdd()
.HasDefaultValue(true);
b.Property<string>("Discriminator")
.IsRequired();
b.Property<float>("Heading");
b.Property<bool>("Locked");
b.Property<uint>("Model");
b.Property<string>("NumberPlate")
.HasMaxLength(8);
b.Property<float>("PositionX");
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.Property<int>("PrimaryColor");
b.Property<int>("SecondaryColor");
b.HasKey("Id");
b.ToTable("ServerVehicles");
b.HasDiscriminator<string>("Discriminator").HasValue("ServerVehicle");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.User", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AdminLevel");
b.Property<int?>("BanId");
b.Property<int?>("BusinessId");
b.Property<int?>("CharacterId");
b.Property<bool>("Dead");
b.Property<string>("Email")
.HasMaxLength(64);
b.Property<int?>("FactionId");
b.Property<bool>("FactionLeader");
b.Property<int?>("FactionRankId");
b.Property<int>("LogUserId");
b.Property<string>("Name")
.HasMaxLength(32);
b.Property<string>("Password")
.HasMaxLength(64);
b.Property<float>("PositionX");
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.Property<DateTime>("RegistrationDate")
.ValueGeneratedOnAdd();
b.Property<string>("SocialClubName")
.HasMaxLength(32);
b.HasKey("Id");
b.HasIndex("BanId");
b.HasIndex("BusinessId")
.IsUnique();
b.HasIndex("CharacterId");
b.HasIndex("FactionId");
b.HasIndex("FactionRankId");
b.ToTable("Users");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.UserBankAccount", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<int>("Balance");
b.Property<string>("Bic")
.HasMaxLength(12);
b.Property<string>("Iban")
.HasMaxLength(32);
b.Property<int>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UserBankAccounts");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.UserItem", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Amount");
b.Property<int>("ItemId");
b.Property<int>("Slot");
b.Property<int>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("UserItems");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.VehicleMod", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("ModId");
b.Property<int>("ServerVehicleId");
b.Property<int>("Slot");
b.HasKey("Id");
b.HasIndex("ServerVehicleId", "Slot")
.IsUnique();
b.ToTable("VehicleMods");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Whitelist", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("SocialClubName");
b.HasKey("Id");
b.ToTable("WhitelistEntries");
});
modelBuilder.Entity("reallife_gamemode.Server.Logs.BankAccountTransactionHistory", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("Fee");
b.Property<int>("MoneySent");
b.Property<int>("NewReceiverBalance");
b.Property<int>("NewSenderBalance");
b.Property<string>("Origin")
.HasMaxLength(32);
b.Property<string>("Receiver")
.HasMaxLength(32);
b.Property<int>("ReceiverBalance");
b.Property<string>("Sender")
.HasMaxLength(32);
b.Property<int>("SenderBalance");
b.Property<DateTime>("Timestamp")
.ValueGeneratedOnAdd();
b.HasKey("Id");
b.ToTable("BankAccountTransactionLogs");
});
modelBuilder.Entity("reallife_gamemode.Server.Logs.Death", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("CauseOfDeath")
.HasMaxLength(64);
b.Property<float>("KillerHeading");
b.Property<int?>("KillerId");
b.Property<float>("KillerPositionX");
b.Property<float>("KillerPositionY");
b.Property<float>("KillerPositionZ");
b.Property<DateTime>("Timestamp")
.ValueGeneratedOnAdd();
b.Property<float>("VictimHeading");
b.Property<int>("VictimId");
b.Property<float>("VictimPositionX");
b.Property<float>("VictimPositionY");
b.Property<float>("VictimPositionZ");
b.HasKey("Id");
b.HasIndex("KillerId");
b.HasIndex("VictimId");
b.ToTable("DeathLogs");
});
modelBuilder.Entity("reallife_gamemode.Server.Saves.SavedBlip", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<byte>("Alpha");
b.Property<byte>("Color");
b.Property<byte>("Dimension");
b.Property<float>("DrawDistance");
b.Property<string>("Name");
b.Property<float>("PositionX");
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.Property<float>("Rotation");
b.Property<float>("Scale");
b.Property<bool>("ShortRange");
b.Property<short>("Sprite");
b.HasKey("Id");
b.ToTable("Blips");
});
modelBuilder.Entity("reallife_gamemode.Server.Saves.SavedMarker", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<byte>("ColorA");
b.Property<byte>("ColorB");
b.Property<byte>("ColorG");
b.Property<byte>("ColorR");
b.Property<byte>("Dimension");
b.Property<float>("DirectionX");
b.Property<float>("DirectionY");
b.Property<float>("DirectionZ");
b.Property<float>("PositionX");
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.Property<float>("RotationX");
b.Property<float>("RotationY");
b.Property<float>("RotationZ");
b.Property<float>("Scale");
b.Property<byte>("Type");
b.Property<bool>("Visible");
b.HasKey("Id");
b.ToTable("Markers");
});
modelBuilder.Entity("reallife_gamemode.Server.Saves.SavedPed", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<byte>("Dimension");
b.Property<string>("HashModel");
b.Property<float>("Heading");
b.Property<float>("PositionX");
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.HasKey("Id");
b.ToTable("Peds");
});
modelBuilder.Entity("reallife_gamemode.Server.Saves.SavedPickup", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<byte>("Dimension");
b.Property<float>("PositionX")
.HasMaxLength(128);
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.Property<int>("RespawnTime");
b.Property<float>("RotationX");
b.Property<float>("RotationY");
b.Property<float>("RotationZ");
b.Property<bool>("Vehicle");
b.HasKey("Id");
b.ToTable("Pickups");
});
modelBuilder.Entity("reallife_gamemode.Server.Saves.SavedTextLabel", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<bool>("Active");
b.Property<byte>("ColorA");
b.Property<byte>("ColorB");
b.Property<byte>("ColorG");
b.Property<byte>("ColorR");
b.Property<byte>("Dimension");
b.Property<float>("DrawDistance");
b.Property<byte>("Font");
b.Property<bool>("LOS");
b.Property<float>("PositionX");
b.Property<float>("PositionY");
b.Property<float>("PositionZ");
b.Property<string>("Text")
.IsRequired();
b.HasKey("Id");
b.ToTable("TextLabels");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.FactionVehicle", b =>
{
b.HasBaseType("reallife_gamemode.Server.Entities.ServerVehicle");
b.Property<int?>("FactionId");
b.HasIndex("FactionId");
b.ToTable("FactionVehicles");
b.HasDiscriminator().HasValue("FactionVehicle");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.ShopVehicle", b =>
{
b.HasBaseType("reallife_gamemode.Server.Entities.ServerVehicle");
b.Property<int>("BusinessId");
b.Property<int>("Price");
b.Property<int?>("ShopId");
b.ToTable("ShopVehicles");
b.HasDiscriminator().HasValue("ShopVehicle");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.UserVehicle", b =>
{
b.HasBaseType("reallife_gamemode.Server.Entities.ServerVehicle");
b.Property<int>("UserId");
b.HasIndex("UserId");
b.ToTable("UserVehicles");
b.HasDiscriminator().HasValue("UserVehicle");
});
modelBuilder.Entity("reallife_gamemode.Server.Saves.SavedVehicle", b =>
{
b.HasBaseType("reallife_gamemode.Server.Entities.ServerVehicle");
b.HasDiscriminator().HasValue("SavedVehicle");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Ban", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Character", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.CharacterCloth", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.Door", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.Faction", "Faction")
.WithMany()
.HasForeignKey("FactionId");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.DutyCloth", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.Faction", "Faction")
.WithMany()
.HasForeignKey("FactionId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.FactionBankAccount", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.Faction", "Faction")
.WithMany()
.HasForeignKey("FactionId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.FactionRank", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.Faction", "Faction")
.WithMany()
.HasForeignKey("FactionId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.News", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.User", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.Ban", "Ban")
.WithMany()
.HasForeignKey("BanId");
b.HasOne("reallife_gamemode.Server.Entities.Character", "Character")
.WithMany()
.HasForeignKey("CharacterId");
b.HasOne("reallife_gamemode.Server.Entities.Faction", "Faction")
.WithMany()
.HasForeignKey("FactionId");
b.HasOne("reallife_gamemode.Server.Entities.FactionRank", "FactionRank")
.WithMany()
.HasForeignKey("FactionRankId");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.UserBankAccount", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.UserItem", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.VehicleMod", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.ServerVehicle", "Vehicle")
.WithMany()
.HasForeignKey("ServerVehicleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Logs.Death", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "Killer")
.WithMany()
.HasForeignKey("KillerId");
b.HasOne("reallife_gamemode.Server.Entities.User", "Victim")
.WithMany()
.HasForeignKey("VictimId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.FactionVehicle", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.Faction", "Faction")
.WithMany()
.HasForeignKey("FactionId");
});
modelBuilder.Entity("reallife_gamemode.Server.Entities.UserVehicle", b =>
{
b.HasOne("reallife_gamemode.Server.Entities.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}