summarize bank accounts
This commit is contained in:
26
ReallifeGamemode.Server/Entities/BankAccount.cs
Normal file
26
ReallifeGamemode.Server/Entities/BankAccount.cs
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
using ReallifeGamemode.Server.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace ReallifeGamemode.Server.Entities
|
||||||
|
{
|
||||||
|
public abstract class BankAccount
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[StringLength(12)]
|
||||||
|
public string Bic { get; set; }
|
||||||
|
|
||||||
|
[StringLength(32)]
|
||||||
|
public string Iban { get; set; }
|
||||||
|
|
||||||
|
public virtual int Balance { get; set; }
|
||||||
|
|
||||||
|
public bool Active { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,15 +9,12 @@ using System.Text;
|
|||||||
|
|
||||||
namespace ReallifeGamemode.Server.Entities
|
namespace ReallifeGamemode.Server.Entities
|
||||||
{
|
{
|
||||||
public class BusinessBankAccount : IBankAccount
|
public class BusinessBankAccount : BankAccount, IBankAccount
|
||||||
{
|
{
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
private int _balance;
|
private int _balance;
|
||||||
|
|
||||||
[Key]
|
public override int Balance
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
public int Balance
|
|
||||||
{
|
{
|
||||||
get => _balance;
|
get => _balance;
|
||||||
set
|
set
|
||||||
|
|||||||
@@ -13,19 +13,11 @@ using System.Text;
|
|||||||
*/
|
*/
|
||||||
namespace ReallifeGamemode.Server.Entities
|
namespace ReallifeGamemode.Server.Entities
|
||||||
{
|
{
|
||||||
public class FactionBankAccount : IBankAccount
|
public class FactionBankAccount : BankAccount, IBankAccount
|
||||||
{
|
{
|
||||||
[Key]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
[ForeignKey("Faction")]
|
[ForeignKey("Faction")]
|
||||||
public int FactionId { get; set; }
|
public int FactionId { get; set; }
|
||||||
|
|
||||||
public Faction Faction { get; set; }
|
public Faction Faction { get; set; }
|
||||||
[StringLength(12)]
|
|
||||||
public string Bic { get; set; }
|
|
||||||
[StringLength(32)]
|
|
||||||
public string Iban { get; set; }
|
|
||||||
public int Balance { get; set; }
|
|
||||||
public bool Active { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,14 +7,8 @@ using System.Text;
|
|||||||
|
|
||||||
namespace ReallifeGamemode.Server.Entities
|
namespace ReallifeGamemode.Server.Entities
|
||||||
{
|
{
|
||||||
public class GroupBankAccount : IBankAccount
|
public class GroupBankAccount : BankAccount, IBankAccount
|
||||||
{
|
{
|
||||||
[Key]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
|
|
||||||
public Group Group { get; set; }
|
public Group Group { get; set; }
|
||||||
|
|
||||||
public int Balance { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,22 +13,17 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace ReallifeGamemode.Server.Entities
|
namespace ReallifeGamemode.Server.Entities
|
||||||
{
|
{
|
||||||
public class UserBankAccount : IBankAccount
|
public class UserBankAccount : BankAccount, IBankAccount
|
||||||
{
|
{
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
private int _balance;
|
private int _balance;
|
||||||
|
|
||||||
[Key]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
public int Id { get; set; }
|
|
||||||
[ForeignKey("User")]
|
[ForeignKey("User")]
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
|
|
||||||
public User User { get; set; }
|
public User User { get; set; }
|
||||||
[StringLength(12)]
|
|
||||||
public string Bic { get; set; }
|
public override int Balance
|
||||||
[StringLength(32)]
|
|
||||||
public string Iban { get; set; }
|
|
||||||
public int Balance
|
|
||||||
{
|
{
|
||||||
get => _balance;
|
get => _balance;
|
||||||
set
|
set
|
||||||
@@ -40,6 +35,5 @@ namespace ReallifeGamemode.Server.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool Active { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,11 +17,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
table: "ServerVehicles",
|
table: "ServerVehicles",
|
||||||
nullable: true);
|
nullable: true);
|
||||||
|
|
||||||
migrationBuilder.AddColumn<int>(
|
|
||||||
name: "ShopId",
|
|
||||||
table: "ServerVehicles",
|
|
||||||
nullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "Jobs",
|
name: "Jobs",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
@@ -90,10 +85,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
migrationBuilder.DropColumn(
|
migrationBuilder.DropColumn(
|
||||||
name: "JobId",
|
name: "JobId",
|
||||||
table: "ServerVehicles");
|
table: "ServerVehicles");
|
||||||
|
|
||||||
migrationBuilder.DropColumn(
|
|
||||||
name: "ShopId",
|
|
||||||
table: "ServerVehicles");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1132
ReallifeGamemode.Server/Migrations/20190513174429_BankAccountSummary.Designer.cs
generated
Normal file
1132
ReallifeGamemode.Server/Migrations/20190513174429_BankAccountSummary.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,248 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
namespace ReallifeGamemode.Migrations
|
||||||
|
{
|
||||||
|
public partial class BankAccountSummary : Migration
|
||||||
|
{
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_UserBankAccounts_Users_UserId",
|
||||||
|
table: "UserBankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "BusinessBankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "FactionBankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "GroupBankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_UserBankAccounts",
|
||||||
|
table: "UserBankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "UserBankAccounts",
|
||||||
|
newName: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "UserId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(int));
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Discriminator",
|
||||||
|
table: "BankAccounts",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "BusinessId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "FactionId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<int>(
|
||||||
|
name: "GroupId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_BankAccounts",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_BankAccounts_BusinessId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "BusinessId",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_BankAccounts_FactionId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "FactionId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_BankAccounts_GroupId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "GroupId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_BankAccounts_Factions_FactionId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "FactionId",
|
||||||
|
principalTable: "Factions",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_BankAccounts_Groups_GroupId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "GroupId",
|
||||||
|
principalTable: "Groups",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_BankAccounts_Users_UserId",
|
||||||
|
table: "BankAccounts",
|
||||||
|
column: "UserId",
|
||||||
|
principalTable: "Users",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_BankAccounts_Factions_FactionId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_BankAccounts_Groups_GroupId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_BankAccounts_Users_UserId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_BankAccounts",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_BankAccounts_BusinessId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_BankAccounts_FactionId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_BankAccounts_GroupId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Discriminator",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "BusinessId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "FactionId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GroupId",
|
||||||
|
table: "BankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "BankAccounts",
|
||||||
|
newName: "UserBankAccounts");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<int>(
|
||||||
|
name: "UserId",
|
||||||
|
table: "UserBankAccounts",
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(int),
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_UserBankAccounts",
|
||||||
|
table: "UserBankAccounts",
|
||||||
|
column: "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: "FactionBankAccounts",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
Active = table.Column<bool>(nullable: false),
|
||||||
|
Balance = table.Column<int>(nullable: false),
|
||||||
|
Bic = table.Column<string>(maxLength: 12, nullable: true),
|
||||||
|
FactionId = table.Column<int>(nullable: false),
|
||||||
|
Iban = table.Column<string>(maxLength: 32, nullable: true)
|
||||||
|
},
|
||||||
|
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: "GroupBankAccounts",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(nullable: false)
|
||||||
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||||
|
Balance = table.Column<int>(nullable: false),
|
||||||
|
GroupId = table.Column<int>(nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_GroupBankAccounts", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_GroupBankAccounts_Groups_GroupId",
|
||||||
|
column: x => x.GroupId,
|
||||||
|
principalTable: "Groups",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Restrict);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_BusinessBankAccounts_BusinessId",
|
||||||
|
table: "BusinessBankAccounts",
|
||||||
|
column: "BusinessId",
|
||||||
|
unique: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_FactionBankAccounts_FactionId",
|
||||||
|
table: "FactionBankAccounts",
|
||||||
|
column: "FactionId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_GroupBankAccounts_GroupId",
|
||||||
|
table: "GroupBankAccounts",
|
||||||
|
column: "GroupId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_UserBankAccounts_Users_UserId",
|
||||||
|
table: "UserBankAccounts",
|
||||||
|
column: "UserId",
|
||||||
|
principalTable: "Users",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -61,21 +61,29 @@ namespace ReallifeGamemode.Migrations
|
|||||||
b.ToTable("Bans");
|
b.ToTable("Bans");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.BusinessBankAccount", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.BankAccount", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
.ValueGeneratedOnAdd();
|
.ValueGeneratedOnAdd();
|
||||||
|
|
||||||
|
b.Property<bool>("Active");
|
||||||
|
|
||||||
b.Property<int>("Balance");
|
b.Property<int>("Balance");
|
||||||
|
|
||||||
b.Property<int>("BusinessId");
|
b.Property<string>("Bic")
|
||||||
|
.HasMaxLength(12);
|
||||||
|
|
||||||
|
b.Property<string>("Discriminator")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.Property<string>("Iban")
|
||||||
|
.HasMaxLength(32);
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("BusinessId")
|
b.ToTable("BankAccounts");
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("BusinessBankAccounts");
|
b.HasDiscriminator<string>("Discriminator").HasValue("BankAccount");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Character", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Character", b =>
|
||||||
@@ -311,30 +319,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
b.ToTable("Factions");
|
b.ToTable("Factions");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.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("ReallifeGamemode.Server.Entities.FactionRank", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionRank", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -386,22 +370,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
b.ToTable("Groups");
|
b.ToTable("Groups");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.GroupBankAccount", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd();
|
|
||||||
|
|
||||||
b.Property<int>("Balance");
|
|
||||||
|
|
||||||
b.Property<int?>("GroupId");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("GroupId");
|
|
||||||
|
|
||||||
b.ToTable("GroupBankAccounts");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Interior", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Interior", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -832,30 +800,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
b.ToTable("Users");
|
b.ToTable("Users");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.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("ReallifeGamemode.Server.Entities.UserItem", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserItem", b =>
|
||||||
{
|
{
|
||||||
b.Property<int>("Id")
|
b.Property<int>("Id")
|
||||||
@@ -907,6 +851,51 @@ namespace ReallifeGamemode.Migrations
|
|||||||
b.ToTable("WhitelistEntries");
|
b.ToTable("WhitelistEntries");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.BusinessBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("ReallifeGamemode.Server.Entities.BankAccount");
|
||||||
|
|
||||||
|
b.Property<int>("BusinessId");
|
||||||
|
|
||||||
|
b.HasIndex("BusinessId")
|
||||||
|
.IsUnique();
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("BusinessBankAccount");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("ReallifeGamemode.Server.Entities.BankAccount");
|
||||||
|
|
||||||
|
b.Property<int>("FactionId");
|
||||||
|
|
||||||
|
b.HasIndex("FactionId");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("FactionBankAccount");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.GroupBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("ReallifeGamemode.Server.Entities.BankAccount");
|
||||||
|
|
||||||
|
b.Property<int?>("GroupId");
|
||||||
|
|
||||||
|
b.HasIndex("GroupId");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("GroupBankAccount");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasBaseType("ReallifeGamemode.Server.Entities.BankAccount");
|
||||||
|
|
||||||
|
b.Property<int>("UserId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.HasDiscriminator().HasValue("UserBankAccount");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionVehicle", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionVehicle", b =>
|
||||||
{
|
{
|
||||||
b.HasBaseType("ReallifeGamemode.Server.Entities.ServerVehicle");
|
b.HasBaseType("ReallifeGamemode.Server.Entities.ServerVehicle");
|
||||||
@@ -957,8 +946,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
|
|
||||||
b.Property<int>("Price");
|
b.Property<int>("Price");
|
||||||
|
|
||||||
b.Property<int?>("ShopId");
|
|
||||||
|
|
||||||
b.ToTable("ShopVehicles");
|
b.ToTable("ShopVehicles");
|
||||||
|
|
||||||
b.HasDiscriminator().HasValue("ShopVehicle");
|
b.HasDiscriminator().HasValue("ShopVehicle");
|
||||||
@@ -1016,14 +1003,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionBankAccount", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("FactionId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionRank", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionRank", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
||||||
@@ -1032,13 +1011,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.GroupBankAccount", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.Group", "Group")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("GroupId");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Logs.Death", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.Logs.Death", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.User", "Killer")
|
b.HasOne("ReallifeGamemode.Server.Entities.User", "Killer")
|
||||||
@@ -1085,14 +1057,6 @@ namespace ReallifeGamemode.Migrations
|
|||||||
.HasForeignKey("JobId");
|
.HasForeignKey("JobId");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserBankAccount", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("UserId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserItem", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserItem", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
|
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
|
||||||
@@ -1109,6 +1073,29 @@ namespace ReallifeGamemode.Migrations
|
|||||||
.OnDelete(DeleteBehavior.Cascade);
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("FactionId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.GroupBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("ReallifeGamemode.Server.Entities.Group", "Group")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("GroupId");
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.UserBankAccount", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("ReallifeGamemode.Server.Entities.User", "User")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionVehicle", b =>
|
modelBuilder.Entity("ReallifeGamemode.Server.Entities.FactionVehicle", b =>
|
||||||
{
|
{
|
||||||
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
b.HasOne("ReallifeGamemode.Server.Entities.Faction", "Faction")
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ namespace ReallifeGamemode.Server.Models
|
|||||||
.HasIndex(vM => new { vM.ServerVehicleId, vM.Slot }).IsUnique();
|
.HasIndex(vM => new { vM.ServerVehicleId, vM.Slot }).IsUnique();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bank Accounts
|
||||||
|
public DbSet<Entities.BankAccount> BankAccounts { get; set; }
|
||||||
|
|
||||||
//User
|
//User
|
||||||
public DbSet<Entities.Ban> Bans { get; set; }
|
public DbSet<Entities.Ban> Bans { get; set; }
|
||||||
public DbSet<Entities.Character> Characters { get; set; }
|
public DbSet<Entities.Character> Characters { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user