76 lines
3.1 KiB
C#
76 lines
3.1 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
/**
|
|
* @overview Life of German Reallife - DatabaseContext.cs
|
|
* @author VegaZ
|
|
* @copyright (c) 2008 - 2018 Life of German
|
|
*/
|
|
|
|
namespace reallife_gamemode.Model
|
|
{
|
|
public partial class DatabaseContext : DbContext
|
|
{
|
|
public DatabaseContext(DbContextOptions<DatabaseContext> options) :base (options)
|
|
{
|
|
|
|
}
|
|
|
|
public DatabaseContext()
|
|
{
|
|
}
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
base.OnConfiguring(optionsBuilder);
|
|
optionsBuilder.UseMySql("Host=localhost;Port=3306;Database=gtav-devdb;Username=gtav-dev;Password=Test123");
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
}
|
|
|
|
//User
|
|
public DbSet<Server.Entities.Ban> Bans { get; set; }
|
|
public DbSet<Server.Entities.Character> Characters { get; set; }
|
|
public DbSet<Server.Entities.CharacterCloth> CharacterClothes { get; set; }
|
|
public DbSet<Server.Entities.CharacterProp> CharacterProps { get; set; }
|
|
public DbSet<Server.Entities.DutyCloth> DutyClothes { get; set; }
|
|
public DbSet<Server.Entities.DutyProp> DutyProps { get; set; }
|
|
public DbSet<Server.Entities.MaleCombination> MaleCombinations { get; set; }
|
|
public DbSet<Server.Entities.FemaleCombination> FemaleCombinations { get; set; }
|
|
public DbSet<Server.Entities.User> Users { get; set; }
|
|
public DbSet<Server.Entities.UserVehicle> UserVehicles { get; set; }
|
|
public DbSet<Server.Entities.UserBankAccount> UserBankAccounts { get; set; }
|
|
|
|
|
|
//Faction
|
|
public DbSet<Server.Entities.Faction> Factions { get; set; }
|
|
public DbSet<Server.Entities.FactionBankAccount> FactionBankAccounts { get; set; }
|
|
public DbSet<Server.Entities.FactionRank> FactionRanks { get; set; }
|
|
public DbSet<Server.Entities.FactionVehicle> FactionVehicles { get; set; }
|
|
|
|
//Shops
|
|
public DbSet<Server.Entities.Shop> Shops { get; set; }
|
|
|
|
//Logs
|
|
//public DbSet<Server.Logs.Ban> BanLogs { get; set; }
|
|
public DbSet<Server.Logs.BankAccountTransactionHistory> BankAccountTransactionLogs { get; set; }
|
|
public DbSet<Server.Logs.Death> DeathLogs { get; set; }
|
|
|
|
//Saves
|
|
public DbSet<Server.Saves.SavedBlip> Blips { get; set; }
|
|
public DbSet<Server.Entities.Door> Doors { get; set; }
|
|
public DbSet<Server.Entities.GotoPoint> GotoPoints { get; set; }
|
|
public DbSet<Server.Saves.SavedMarker> Markers { get; set; }
|
|
public DbSet<Server.Saves.SavedPed> Peds { get; set; }
|
|
public DbSet<Server.Saves.SavedPickup> Pickups { get; set; }
|
|
public DbSet<Server.Saves.SavedTextLabel> TextLabels { get; set; }
|
|
public DbSet<Server.Saves.SavedVehicle> Vehicles { get; set; }
|
|
public DbSet<Server.Entities.ShopVehicle> ShopVehicles { get; set; }
|
|
|
|
// Control Panel
|
|
public DbSet<Server.Entities.News> News { get; set; }
|
|
}
|
|
}
|