Umstrukturierung
This commit is contained in:
24
ReallifeGamemode.Database/AdminLevel.cs
Normal file
24
ReallifeGamemode.Database/AdminLevel.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Admin Levels (AdminLevel.cs)
|
||||
* @author VegaZ, hydrant
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database
|
||||
{
|
||||
public enum AdminLevel : int
|
||||
{
|
||||
PLAYER = 0,
|
||||
TEAM = 1,
|
||||
SUPPORTER = 2,
|
||||
ADMIN = 3,
|
||||
ADMIN2 = 4,
|
||||
ADMIN3 = 5,
|
||||
HEADADMIN = 1337,
|
||||
PROJEKTLEITUNG = 1338
|
||||
}
|
||||
}
|
||||
42
ReallifeGamemode.Database/Entities/ATM.cs
Normal file
42
ReallifeGamemode.Database/Entities/ATM.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities ATM (ATM.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class ATM : IBankAccountOwner, IBankAccount
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public int Balance { get; set; }
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
public float Z { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(X, Y, Z);
|
||||
|
||||
public bool Faulty { get; set; } = false;
|
||||
public bool Active { get; set; } = true;
|
||||
|
||||
public string Name => throw new NotImplementedException();
|
||||
|
||||
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
|
||||
{
|
||||
databaseContext = databaseContext ?? new DatabaseContext();
|
||||
return databaseContext.ATMs.Where(a => a.Id == this.Id).First();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
ReallifeGamemode.Database/Entities/Ban.cs
Normal file
32
ReallifeGamemode.Database/Entities/Ban.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities Ban (Ban.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Ban
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public string Reason { get; set; }
|
||||
public string BannedBy { get; set; }
|
||||
|
||||
public int Applied { get; set; }
|
||||
public int UntilDateTime { get; set; }
|
||||
}
|
||||
}
|
||||
39
ReallifeGamemode.Database/Entities/BusRoute.cs
Normal file
39
ReallifeGamemode.Database/Entities/BusRoute.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class BusRoute
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public List<BusRoutePoint> RoutePoints { get; set; }
|
||||
}
|
||||
|
||||
public class BusRoutePoint
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public float X { get; set; }
|
||||
|
||||
public float Y { get; set; }
|
||||
|
||||
public float Z { get; set; }
|
||||
|
||||
[ForeignKey("BusRouteId")]
|
||||
public int? BusRouteId { get; set; }
|
||||
|
||||
public BusRoute BusRoute { get; set; }
|
||||
}
|
||||
}
|
||||
23
ReallifeGamemode.Database/Entities/BusinessBankAccount.cs
Normal file
23
ReallifeGamemode.Database/Entities/BusinessBankAccount.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class BusinessBankAccount : IBankAccount
|
||||
{
|
||||
[NotMapped]
|
||||
private int _balance;
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
public int Balance { get; set; }
|
||||
|
||||
public int BusinessId { get; set; }
|
||||
}
|
||||
}
|
||||
19
ReallifeGamemode.Database/Entities/BusinessData.cs
Normal file
19
ReallifeGamemode.Database/Entities/BusinessData.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class BusinessData
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int BusinessId { get; set; }
|
||||
|
||||
public int Price { get; set; }
|
||||
}
|
||||
}
|
||||
82
ReallifeGamemode.Database/Entities/Character.cs
Normal file
82
ReallifeGamemode.Database/Entities/Character.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities Ban (Ban.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Character
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public bool Gender { get; set; }
|
||||
public byte Father { get; set; }
|
||||
public byte Mother { get; set; }
|
||||
public float Similarity { get; set; }
|
||||
public float SkinSimilarity { get; set; }
|
||||
|
||||
public float NoseWidth { get; set; }
|
||||
public float NoseBottomHeight { get; set; }
|
||||
public float NoseTipLength { get; set; }
|
||||
public float NoseBridgeDepth { get; set; }
|
||||
public float NoseTipHeight { get; set; }
|
||||
public float NoseBroken { get; set; }
|
||||
public float BrowHeight { get; set; }
|
||||
public float BrowDepth { get; set; }
|
||||
public float CheekboneHeight { get; set; }
|
||||
public float CheekboneWidth { get; set; }
|
||||
public float CheekDepth { get; set; }
|
||||
public float EyeSize { get; set; }
|
||||
public float LipThickness { get; set; }
|
||||
public float JawWidth { get; set; }
|
||||
public float JawShape { get; set; }
|
||||
public float ChinHeight { get; set; }
|
||||
public float ChinDepth { get; set; }
|
||||
public float ChinWidth { get; set; }
|
||||
public float ChinIndent { get; set; }
|
||||
public float NeckWidth { get; set; }
|
||||
|
||||
public byte Blemishes { get; set; }
|
||||
public float BlemishesOpacity { get; set; }
|
||||
public byte FacialHair { get; set; }
|
||||
public float FacialHairOpacity { get; set; }
|
||||
public byte Eyebrows { get; set; }
|
||||
public float EyebrowsOpacity { get; set; }
|
||||
public byte Ageing { get; set; }
|
||||
public float AgeingOpacity { get; set; }
|
||||
public byte Makeup { get; set; }
|
||||
public float MakeupOpacity { get; set; }
|
||||
public byte Blush { get; set; }
|
||||
public float BlushOpacity { get; set; }
|
||||
public byte Complexion { get; set; }
|
||||
public float ComplexionOpacity { get; set; }
|
||||
public byte SunDamage { get; set; }
|
||||
public float SunDamageOpacity { get; set; }
|
||||
public byte Lipstick { get; set; }
|
||||
public float LipstickOpacity { get; set; }
|
||||
public byte Freckles { get; set; }
|
||||
public float FrecklesOpacity { get; set; }
|
||||
public byte ChestHair { get; set; }
|
||||
public float ChestHairOpacity { get; set; }
|
||||
|
||||
public byte Hair { get; set; }
|
||||
public byte HairColor { get; set; }
|
||||
public byte HairHighlightColor { get; set; }
|
||||
public byte EyebrowColor { get; set; }
|
||||
public byte BeardColor { get; set; }
|
||||
public byte EyeColor { get; set; }
|
||||
public byte BlushColor { get; set; }
|
||||
public byte LipstickColor { get; set; }
|
||||
public byte ChestHairColor { get; set; }
|
||||
}
|
||||
}
|
||||
29
ReallifeGamemode.Database/Entities/CharacterCloth.cs
Normal file
29
ReallifeGamemode.Database/Entities/CharacterCloth.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities CharacterCloth CharacterCloth.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class CharacterCloth
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public bool Duty { get; set; }
|
||||
|
||||
public byte SlotType { get; set; }
|
||||
public int SlotId { get; set; }
|
||||
public int ClothId { get; set; }
|
||||
public int Texture { get; set; }
|
||||
}
|
||||
}
|
||||
25
ReallifeGamemode.Database/Entities/ClothCombination.cs
Normal file
25
ReallifeGamemode.Database/Entities/ClothCombination.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities MaleCombination (MaleCombination.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class ClothCombination
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public bool Gender { get; set; }
|
||||
public int Top { get; set; }
|
||||
public int Torso { get; set; }
|
||||
public int Undershirt { get; set; }
|
||||
}
|
||||
}
|
||||
36
ReallifeGamemode.Database/Entities/Door.cs
Normal file
36
ReallifeGamemode.Database/Entities/Door.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using GTANetworkAPI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities Door (Door.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Door
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public string Category { get; set; }
|
||||
public string Name { get; set; }
|
||||
public bool Locked { get; set; }
|
||||
public int Model { get; set; }
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
public float Z { get; set; }
|
||||
public float Radius { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(X, Y, Z);
|
||||
|
||||
[ForeignKey("FactionId")]
|
||||
public int? FactionId { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
}
|
||||
}
|
||||
31
ReallifeGamemode.Database/Entities/DutyCloth.cs
Normal file
31
ReallifeGamemode.Database/Entities/DutyCloth.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities DutyCloth DutyCloth.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class DutyCloth
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("Faction")]
|
||||
public int FactionId { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
public bool Gender { get; set; }
|
||||
|
||||
public byte SlotType { get; set; }
|
||||
public int SlotId { get; set; }
|
||||
public int ClothId { get; set; }
|
||||
}
|
||||
}
|
||||
39
ReallifeGamemode.Database/Entities/Faction.cs
Normal file
39
ReallifeGamemode.Database/Entities/Faction.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities Faction (Faction.cs)
|
||||
* @author VegaZ, hydrant
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Faction : IBankAccountOwner
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Name { get; set; }
|
||||
public bool StateOwned { get; set; }
|
||||
|
||||
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
|
||||
{
|
||||
if (databaseContext == null)
|
||||
{
|
||||
using (databaseContext = new DatabaseContext())
|
||||
{
|
||||
return databaseContext.FactionBankAccounts.FirstOrDefault(u => u.FactionId == this.Id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return databaseContext.FactionBankAccounts.FirstOrDefault(u => u.FactionId == this.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
30
ReallifeGamemode.Database/Entities/FactionBankAccount.cs
Normal file
30
ReallifeGamemode.Database/Entities/FactionBankAccount.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using GTANetworkAPI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities FactionBankAccount (FactionBankAccount.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class FactionBankAccount : IBankAccount
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[ForeignKey("Faction")]
|
||||
public int FactionId { 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; }
|
||||
}
|
||||
}
|
||||
27
ReallifeGamemode.Database/Entities/FactionRank.cs
Normal file
27
ReallifeGamemode.Database/Entities/FactionRank.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class FactionRank
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
public string RankName { get; set; }
|
||||
public int Order { get; set; }
|
||||
|
||||
|
||||
public int FactionId { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
public Faction GetFaction()
|
||||
{
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
return context.Factions.FirstOrDefault(f => f.Id == FactionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
ReallifeGamemode.Database/Entities/FactionVehicles.cs
Normal file
34
ReallifeGamemode.Database/Entities/FactionVehicles.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities FactionVehicles (FactionVehicle.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
[Table("FactionVehicles")]
|
||||
public class FactionVehicle : ServerVehicle
|
||||
{
|
||||
[ForeignKey("Faction")]
|
||||
public int? FactionId { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
public Faction GetFaction()
|
||||
{
|
||||
using (var context = new DatabaseContext())
|
||||
{
|
||||
return context.Factions.FirstOrDefault(f => f.Id == FactionId);
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Fraktions Fahrzeug | Fraktion: " + GetFaction().Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
24
ReallifeGamemode.Database/Entities/FactionWeapon.cs
Normal file
24
ReallifeGamemode.Database/Entities/FactionWeapon.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using GTANetworkAPI;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class FactionWeapon
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("Faction")]
|
||||
public int? FactionId { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
public string WeaponModel { get; set; }
|
||||
public int SlotID { get; set; }
|
||||
public int Rank { get; set; }
|
||||
}
|
||||
}
|
||||
28
ReallifeGamemode.Database/Entities/GotoPoints.cs
Normal file
28
ReallifeGamemode.Database/Entities/GotoPoints.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities GotoPoints (GotoPoints.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class GotoPoint
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Description { get; set; }
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
public float Z { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
51
ReallifeGamemode.Database/Entities/Group.cs
Normal file
51
ReallifeGamemode.Database/Entities/Group.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ReallifeGamemode.Database;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Group : IBankAccountOwner
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
|
||||
{
|
||||
GroupBankAccount bankAccount = null;
|
||||
if (databaseContext == null)
|
||||
{
|
||||
using (databaseContext = new DatabaseContext())
|
||||
{
|
||||
bankAccount = databaseContext.GroupBankAccounts.Include(g => g.Group).Where(g => g.Group == this).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bankAccount = databaseContext.GroupBankAccounts.Include(g => g.Group).Where(g => g.Group == this).FirstOrDefault();
|
||||
}
|
||||
|
||||
if (bankAccount == null)
|
||||
{
|
||||
bankAccount = new GroupBankAccount
|
||||
{
|
||||
Group = this,
|
||||
Balance = 0
|
||||
};
|
||||
|
||||
databaseContext.GroupBankAccounts.Add(bankAccount);
|
||||
databaseContext.SaveChanges();
|
||||
}
|
||||
|
||||
return bankAccount;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
ReallifeGamemode.Database/Entities/GroupBankAccount.cs
Normal file
19
ReallifeGamemode.Database/Entities/GroupBankAccount.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class GroupBankAccount : IBankAccount
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public Group Group { get; set; }
|
||||
|
||||
public int Balance { get; set; }
|
||||
}
|
||||
}
|
||||
25
ReallifeGamemode.Database/Entities/GroupVehicle.cs
Normal file
25
ReallifeGamemode.Database/Entities/GroupVehicle.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class GroupVehicle : ServerVehicle
|
||||
{
|
||||
public Group Group { get; set; }
|
||||
|
||||
[ForeignKey("Group")]
|
||||
public int? GroupId { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
return "Gruppen Fahrzeug | Gruppe: " + dbContext.GroupVehicles.Include(g => g.Group).First(g => g.Id == this.Id).Group.Name;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
ReallifeGamemode.Database/Entities/House.cs
Normal file
39
ReallifeGamemode.Database/Entities/House.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using GTANetworkAPI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class House
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
|
||||
public int Price { get; set; }
|
||||
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
public float Z { get; set; }
|
||||
|
||||
public int RentalFee { get; set; }
|
||||
|
||||
public bool CanRentIn { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(X, Y, Z);
|
||||
|
||||
[ForeignKey("Owner")]
|
||||
public int? OwnerId { get; set; }
|
||||
public User Owner { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Client User => Owner?.Client;
|
||||
}
|
||||
}
|
||||
25
ReallifeGamemode.Database/Entities/HouseRental.cs
Normal file
25
ReallifeGamemode.Database/Entities/HouseRental.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class HouseRental
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("House")]
|
||||
public int? HouseId { get; set; }
|
||||
|
||||
public House House { get; set; }
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int? UserId { get; set; }
|
||||
|
||||
public User User { get; set; }
|
||||
}
|
||||
}
|
||||
75
ReallifeGamemode.Database/Entities/Interior.cs
Normal file
75
ReallifeGamemode.Database/Entities/Interior.cs
Normal file
@@ -0,0 +1,75 @@
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Interior
|
||||
{
|
||||
[NotMapped]
|
||||
private Vector3 _enterPosition;
|
||||
[NotMapped]
|
||||
private Vector3 _exitPosition;
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("EnterPosition")]
|
||||
public string EnterPositionStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonConvert.SerializeObject(this._enterPosition);
|
||||
}
|
||||
set
|
||||
{
|
||||
this._enterPosition = JsonConvert.DeserializeObject<Vector3>(value);
|
||||
}
|
||||
}
|
||||
|
||||
[Column("ExitPosition")]
|
||||
public string ExitPositionStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return JsonConvert.SerializeObject(this._exitPosition);
|
||||
}
|
||||
set
|
||||
{
|
||||
this._exitPosition = JsonConvert.DeserializeObject<Vector3>(value);
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 EnterPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._enterPosition;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._enterPosition = value;
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 ExitPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._exitPosition;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._exitPosition = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
ReallifeGamemode.Database/Entities/JobVehicle.cs
Normal file
15
ReallifeGamemode.Database/Entities/JobVehicle.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class JobVehicle : ServerVehicle
|
||||
{
|
||||
public int JobId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Logs BankAccountTransactionHistory (BankAccountTransactionHistory.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Logs
|
||||
{
|
||||
public class BankAccountTransactionHistory
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[StringLength(32)]
|
||||
public string Sender { get; set; }
|
||||
public int SenderBalance { get; set; }
|
||||
public int MoneySent { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Receiver { get; set; }
|
||||
public int ReceiverBalance { get; set; }
|
||||
public int NewSenderBalance { get; set; }
|
||||
public int NewReceiverBalance { get; set; }
|
||||
public int Fee { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Origin { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime Timestamp { get; set; }
|
||||
}
|
||||
}
|
||||
45
ReallifeGamemode.Database/Entities/Logs/Death.cs
Normal file
45
ReallifeGamemode.Database/Entities/Logs/Death.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Logs Death (Death.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Logs
|
||||
{
|
||||
public class Death
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("Victim")]
|
||||
public int VictimId { get; set; }
|
||||
public User Victim { get; set; }
|
||||
|
||||
[ForeignKey("Killer")]
|
||||
public int? KillerId { get; set; }
|
||||
public User Killer { get; set; }
|
||||
|
||||
public float VictimPositionX { get; set; }
|
||||
public float VictimPositionY { get; set; }
|
||||
public float VictimPositionZ { get; set; }
|
||||
public float VictimHeading { get; set; }
|
||||
|
||||
public float KillerPositionX { get; set; }
|
||||
public float KillerPositionY { get; set; }
|
||||
public float KillerPositionZ { get; set; }
|
||||
public float KillerHeading { get; set; }
|
||||
|
||||
[StringLength(64)]
|
||||
public string CauseOfDeath { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime Timestamp { get; set; }
|
||||
}
|
||||
}
|
||||
24
ReallifeGamemode.Database/Entities/News.cs
Normal file
24
ReallifeGamemode.Database/Entities/News.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class News
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int? UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public string Caption { get; set; }
|
||||
public string Content { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public int Timestamp { get; set; }
|
||||
}
|
||||
}
|
||||
38
ReallifeGamemode.Database/Entities/Saves/SavedBlip.cs
Normal file
38
ReallifeGamemode.Database/Entities/Saves/SavedBlip.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Saves SavedBlip.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Saves
|
||||
{
|
||||
public class SavedBlip
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
public short Sprite { get; set; }
|
||||
[Required]
|
||||
public float PositionX { get; set; }
|
||||
[Required]
|
||||
public float PositionY { get; set; }
|
||||
[Required]
|
||||
public float PositionZ { get; set; }
|
||||
public string Name { get; set; }
|
||||
public float Scale { get; set; }
|
||||
public byte Color { get; set; }
|
||||
public byte Alpha { get; set; }
|
||||
public float DrawDistance { get; set; }
|
||||
public bool ShortRange { get; set; }
|
||||
public float Rotation { get; set; }
|
||||
public byte Dimension { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
39
ReallifeGamemode.Database/Entities/Saves/SavedMarker.cs
Normal file
39
ReallifeGamemode.Database/Entities/Saves/SavedMarker.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Saves SavedMarker.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Saves
|
||||
{
|
||||
public class SavedMarker
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
public byte Type { get; set; }
|
||||
public float PositionX { get; set; }
|
||||
public float PositionY { get; set; }
|
||||
public float PositionZ { get; set; }
|
||||
public float Scale { get; set; }
|
||||
public float DirectionX { get; set; }
|
||||
public float DirectionY { get; set; }
|
||||
public float DirectionZ { get; set; }
|
||||
public float RotationX { get; set; }
|
||||
public float RotationY { get; set; }
|
||||
public float RotationZ { get; set; }
|
||||
public byte ColorR { get; set; }
|
||||
public byte ColorG { get; set; }
|
||||
public byte ColorB { get; set; }
|
||||
public byte ColorA { get; set; }
|
||||
public bool Visible { get; set; }
|
||||
public byte Dimension { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
28
ReallifeGamemode.Database/Entities/Saves/SavedPed.cs
Normal file
28
ReallifeGamemode.Database/Entities/Saves/SavedPed.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Saves SavedPed.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Saves
|
||||
{
|
||||
public class SavedPed
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
public string HashModel { get; set; }
|
||||
public float PositionX { get; set; }
|
||||
public float PositionY { get; set; }
|
||||
public float PositionZ { get; set; }
|
||||
public float Heading { get; set; }
|
||||
public byte Dimension { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
32
ReallifeGamemode.Database/Entities/Saves/SavedPickup.cs
Normal file
32
ReallifeGamemode.Database/Entities/Saves/SavedPickup.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Saves SavedPickup.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Saves
|
||||
{
|
||||
public class SavedPickup
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[StringLength(128)]
|
||||
public float PositionX { get; set; }
|
||||
public float PositionY { get; set; }
|
||||
public float PositionZ { get; set; }
|
||||
public float RotationX { get; set; }
|
||||
public float RotationY { get; set; }
|
||||
public float RotationZ { get; set; }
|
||||
public bool Vehicle { get; set; }
|
||||
public int RespawnTime { get; set; }
|
||||
public byte Dimension { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
38
ReallifeGamemode.Database/Entities/Saves/SavedTextLabel.cs
Normal file
38
ReallifeGamemode.Database/Entities/Saves/SavedTextLabel.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Saves SavedTextLabel.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Saves
|
||||
{
|
||||
public class SavedTextLabel
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
public string Text { get; set; }
|
||||
[Required]
|
||||
public float PositionX { get; set; }
|
||||
[Required]
|
||||
public float PositionY { get; set; }
|
||||
[Required]
|
||||
public float PositionZ { get; set; }
|
||||
public bool LOS { get; set; }
|
||||
public byte Font { get; set; }
|
||||
public float DrawDistance { get; set; }
|
||||
public byte ColorR { get; set; }
|
||||
public byte ColorG { get; set; }
|
||||
public byte ColorB { get; set; }
|
||||
public byte ColorA { get; set; }
|
||||
public byte Dimension { get; set; }
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
24
ReallifeGamemode.Database/Entities/Saves/SavedVehicle.cs
Normal file
24
ReallifeGamemode.Database/Entities/Saves/SavedVehicle.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using GTANetworkAPI;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Saves SavedVehicle.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities.Saves
|
||||
{
|
||||
public class SavedVehicle : ServerVehicle
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "Gespeichertes Fahrzeug";
|
||||
}
|
||||
}
|
||||
}
|
||||
36
ReallifeGamemode.Database/Entities/ServerVehicle.cs
Normal file
36
ReallifeGamemode.Database/Entities/ServerVehicle.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using GTANetworkAPI;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public abstract class ServerVehicle
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public VehicleHash Model { get; set; }
|
||||
public float PositionX { get; set; }
|
||||
public float PositionY { get; set; }
|
||||
public float PositionZ { get; set; }
|
||||
public float Heading { get; set; }
|
||||
[StringLength(8)]
|
||||
public string NumberPlate { get; set; }
|
||||
public int PrimaryColor { get; set; }
|
||||
public int SecondaryColor { get; set; }
|
||||
public bool Locked { get; set; }
|
||||
public bool Active { get; set; }
|
||||
public float DistanceDriven { get; set; }
|
||||
public float TankAmount { get; set; }
|
||||
public int Livery { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(PositionX, PositionY, PositionZ);
|
||||
|
||||
public new virtual string ToString()
|
||||
{
|
||||
return $"{Model}";
|
||||
}
|
||||
}
|
||||
}
|
||||
27
ReallifeGamemode.Database/Entities/ShopVehicles.cs
Normal file
27
ReallifeGamemode.Database/Entities/ShopVehicles.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using GTANetworkAPI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities ShopVehicles (ShopVehicles.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
[Table("ShopVehicles")]
|
||||
public class ShopVehicle : ServerVehicle
|
||||
{
|
||||
public int BusinessId { get; set; }
|
||||
public int Price { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "ShopVehicle";
|
||||
}
|
||||
}
|
||||
}
|
||||
25
ReallifeGamemode.Database/Entities/TuningGarage.cs
Normal file
25
ReallifeGamemode.Database/Entities/TuningGarage.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using GTANetworkAPI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class TuningGarage
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public float X { get; set; }
|
||||
|
||||
public float Y { get; set; }
|
||||
|
||||
public float Z { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Vector3 Position => new Vector3(X, Y, Z);
|
||||
}
|
||||
}
|
||||
118
ReallifeGamemode.Database/Entities/User.cs
Normal file
118
ReallifeGamemode.Database/Entities/User.cs
Normal file
@@ -0,0 +1,118 @@
|
||||
using GTANetworkAPI;
|
||||
using Newtonsoft.Json;
|
||||
using ReallifeGamemode.Database;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities User (User.cs)
|
||||
* @author VegaZ, hydrant
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class User : IBankAccountOwner
|
||||
{
|
||||
[NotMapped]
|
||||
private int _wanteds;
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Name { get; set; }
|
||||
[StringLength(32)]
|
||||
public string SocialClubName { get; set; }
|
||||
[StringLength(64)]
|
||||
public string Password { get; set; }
|
||||
public int LogUserId { get; set; }
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public DateTime RegistrationDate { get; set; }
|
||||
|
||||
[EmailAddress]
|
||||
[StringLength(64)]
|
||||
public string Email { get; set; }
|
||||
public AdminLevel AdminLevel { get; set; }
|
||||
|
||||
public bool Dead { get; set; }
|
||||
public int Handmoney { get; set; }
|
||||
|
||||
public float PositionX { get; set; }
|
||||
public float PositionY { get; set; }
|
||||
public float PositionZ { get; set; }
|
||||
|
||||
[ForeignKey("Character")]
|
||||
public int? CharacterId { get; set; }
|
||||
public Character Character { get; set; }
|
||||
|
||||
[ForeignKey("Ban")]
|
||||
public int? BanId { get; set; }
|
||||
public Ban Ban { get; set; }
|
||||
|
||||
public int? BusinessId { get; set; }
|
||||
|
||||
public int? FactionId { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
public bool FactionLeader { get; set; }
|
||||
|
||||
public int? FactionRankId { get; set; }
|
||||
public FactionRank FactionRank { get; set; }
|
||||
|
||||
public Group Group { get; set; }
|
||||
|
||||
public GroupRank GroupRank { get; set; }
|
||||
|
||||
[ForeignKey("House")]
|
||||
public int? HouseId { get; set; }
|
||||
public House House { get; set; }
|
||||
|
||||
public int? JobId { get; set; }
|
||||
|
||||
public int Wanteds
|
||||
{
|
||||
get => _wanteds;
|
||||
set
|
||||
{
|
||||
this._wanteds = value;
|
||||
Client.TriggerEvent("SERVER:SetWanteds", value);
|
||||
}
|
||||
}
|
||||
|
||||
public int Wage { get; set; }
|
||||
|
||||
public int JailTime { get; set; }
|
||||
|
||||
public int PaydayTimer { get; set; }
|
||||
|
||||
public bool IsAdmin(AdminLevel level) => AdminLevel >= level;
|
||||
|
||||
public IBankAccount GetBankAccount(DatabaseContext databaseContext = null)
|
||||
{
|
||||
if (databaseContext == null)
|
||||
{
|
||||
using (databaseContext = new DatabaseContext())
|
||||
{
|
||||
return databaseContext.UserBankAccounts.FirstOrDefault(u => u.UserId == this.Id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return databaseContext.UserBankAccounts.FirstOrDefault(u => u.UserId == this.Id);
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public Client Client
|
||||
{
|
||||
get => NAPI.Pools.GetAllPlayers().Where(c => c.Name.ToLower() == this.Name.ToLower()).FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
45
ReallifeGamemode.Database/Entities/UserBankAccount.cs
Normal file
45
ReallifeGamemode.Database/Entities/UserBankAccount.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using ReallifeGamemode.Services;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities UserBankAccount (UserBankAccount.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class UserBankAccount : IBankAccount
|
||||
{
|
||||
[NotMapped]
|
||||
private int _balance;
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[ForeignKey("User")]
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
[StringLength(12)]
|
||||
public string Bic { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Iban { get; set; }
|
||||
public int Balance
|
||||
{
|
||||
get => _balance;
|
||||
set
|
||||
{
|
||||
_balance = value;
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
ClientService.GetClientByNameOrId(dbContext.Users.First(u => u.Id == UserId).Name).TriggerEvent("updateMoney", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool Active { get; set; }
|
||||
}
|
||||
}
|
||||
38
ReallifeGamemode.Database/Entities/UserItem.cs
Normal file
38
ReallifeGamemode.Database/Entities/UserItem.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities UserItem (UserItem.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class UserItem
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ItemId { get; set; }
|
||||
|
||||
[ForeignKey("User")]
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public int Amount { get; set; }
|
||||
public int Slot { get; set; }
|
||||
|
||||
public User GetUser()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
return dbContext.Users.FirstOrDefault(u => u.Id == UserId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
40
ReallifeGamemode.Database/Entities/UserVehicle.cs
Normal file
40
ReallifeGamemode.Database/Entities/UserVehicle.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - Entities UserVehicle (UserVehicle.cs)
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
[Table("UserVehicles")]
|
||||
public class UserVehicle : ServerVehicle
|
||||
{
|
||||
[ForeignKey("User")]
|
||||
public int UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Spieler Fahrzeug | Besitzer: " + GetOwner().Name;
|
||||
}
|
||||
|
||||
public User GetOwner(DatabaseContext dbContext = null)
|
||||
{
|
||||
if (dbContext == null)
|
||||
{
|
||||
using (dbContext = new DatabaseContext())
|
||||
{
|
||||
return dbContext.Users.FirstOrDefault(u => u.Id == UserId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return dbContext.Users.FirstOrDefault(u => u.Id == UserId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
ReallifeGamemode.Database/Entities/VehicleInventory.cs
Normal file
18
ReallifeGamemode.Database/Entities/VehicleInventory.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class VehicleInventory
|
||||
{
|
||||
public int ID;
|
||||
public int currentWeight;
|
||||
public int totalWeight;
|
||||
public string[] ivehName;
|
||||
public int[] ivehAmount;
|
||||
public int[] ivehId;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
35
ReallifeGamemode.Database/Entities/VehicleItem.cs
Normal file
35
ReallifeGamemode.Database/Entities/VehicleItem.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Database.Entities;
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class VehicleItem
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
public int ItemId { get; set; }
|
||||
|
||||
[ForeignKey("ServerVehicle")]
|
||||
public int VehicleId { get; set; }
|
||||
public ServerVehicle Vehicle { get; set; }
|
||||
|
||||
public int Amount { get; set; }
|
||||
public int Slot { get; set; }
|
||||
|
||||
public ServerVehicle GetVehicle()
|
||||
{
|
||||
using (var dbContext = new DatabaseContext())
|
||||
{
|
||||
return dbContext.ServerVehicles.FirstOrDefault(v => v.Id == VehicleId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
22
ReallifeGamemode.Database/Entities/VehicleMod.cs
Normal file
22
ReallifeGamemode.Database/Entities/VehicleMod.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class VehicleMod
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[ForeignKey("Vehicle")]
|
||||
public int ServerVehicleId { get; set; }
|
||||
public ServerVehicle Vehicle { get; set; }
|
||||
|
||||
public int Slot { get; set; }
|
||||
public int ModId { get; set; }
|
||||
}
|
||||
}
|
||||
16
ReallifeGamemode.Database/Entities/Whitelist.cs
Normal file
16
ReallifeGamemode.Database/Entities/Whitelist.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database.Entities
|
||||
{
|
||||
public class Whitelist
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
public string SocialClubName { get; set; }
|
||||
}
|
||||
}
|
||||
14
ReallifeGamemode.Database/GroupRanks.cs
Normal file
14
ReallifeGamemode.Database/GroupRanks.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database
|
||||
{
|
||||
public enum GroupRank
|
||||
{
|
||||
NONE,
|
||||
MEMBER,
|
||||
MANAGER,
|
||||
OWNER
|
||||
}
|
||||
}
|
||||
11
ReallifeGamemode.Database/IBankAccount.cs
Normal file
11
ReallifeGamemode.Database/IBankAccount.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ReallifeGamemode.Database
|
||||
{
|
||||
public interface IBankAccount
|
||||
{
|
||||
int Balance { get; set; }
|
||||
}
|
||||
}
|
||||
11
ReallifeGamemode.Database/IBankAccountOwner.cs
Normal file
11
ReallifeGamemode.Database/IBankAccountOwner.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using ReallifeGamemode.Database.Models;
|
||||
|
||||
namespace ReallifeGamemode.Database
|
||||
{
|
||||
public interface IBankAccountOwner
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
IBankAccount GetBankAccount(DatabaseContext databaseContext = null);
|
||||
}
|
||||
}
|
||||
117
ReallifeGamemode.Database/Models/DatabaseContext.cs
Normal file
117
ReallifeGamemode.Database/Models/DatabaseContext.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
/**
|
||||
* @overview Life of German Reallife - DatabaseContext.cs
|
||||
* @author VegaZ
|
||||
* @copyright (c) 2008 - 2018 Life of German
|
||||
*/
|
||||
|
||||
namespace ReallifeGamemode.Database.Models
|
||||
{
|
||||
public partial class DatabaseContext : DbContext
|
||||
{
|
||||
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);
|
||||
|
||||
modelBuilder.Entity<Entities.BusinessBankAccount>()
|
||||
.HasIndex(b => b.BusinessId)
|
||||
.IsUnique(true);
|
||||
|
||||
modelBuilder.Entity<Entities.User>()
|
||||
.HasIndex(u => u.BusinessId)
|
||||
.IsUnique(true);
|
||||
|
||||
modelBuilder.Entity<Entities.ServerVehicle>()
|
||||
.Property(sv => sv.Active)
|
||||
.HasDefaultValue(true);
|
||||
|
||||
modelBuilder.Entity<Entities.VehicleMod>()
|
||||
.HasIndex(vM => new { vM.ServerVehicleId, vM.Slot }).IsUnique();
|
||||
}
|
||||
|
||||
//User
|
||||
public DbSet<Entities.Ban> Bans { get; set; }
|
||||
public DbSet<Entities.Character> Characters { get; set; }
|
||||
public DbSet<Entities.CharacterCloth> CharacterClothes { get; set; }
|
||||
public DbSet<Entities.DutyCloth> DutyClothes { get; set; }
|
||||
public DbSet<Entities.FactionWeapon> FactionWeapons { get; set; }
|
||||
public DbSet<Entities.ClothCombination> ClothCombinations { get; set; }
|
||||
public DbSet<Entities.User> Users { get; set; }
|
||||
public DbSet<Entities.UserVehicle> UserVehicles { get; set; }
|
||||
public DbSet<Entities.UserBankAccount> UserBankAccounts { get; set; }
|
||||
|
||||
|
||||
//Inventar
|
||||
public DbSet<Entities.UserItem> UserItems { get; set; }
|
||||
|
||||
//Faction
|
||||
public DbSet<Entities.Faction> Factions { get; set; }
|
||||
public DbSet<Entities.FactionBankAccount> FactionBankAccounts { get; set; }
|
||||
public DbSet<Entities.FactionRank> FactionRanks { get; set; }
|
||||
public DbSet<Entities.FactionVehicle> FactionVehicles { get; set; }
|
||||
|
||||
//Shops
|
||||
|
||||
//Logs
|
||||
//public DbSet<Logs.Ban> BanLogs { get; set; }
|
||||
public DbSet<Entities.Logs.BankAccountTransactionHistory> BankAccountTransactionLogs { get; set; }
|
||||
public DbSet<Entities.Logs.Death> DeathLogs { get; set; }
|
||||
|
||||
//Saves
|
||||
public DbSet<Entities.ATM> ATMs { get; set; }
|
||||
public DbSet<Entities.Saves.SavedBlip> Blips { get; set; }
|
||||
public DbSet<Entities.Door> Doors { get; set; }
|
||||
public DbSet<Entities.GotoPoint> GotoPoints { get; set; }
|
||||
public DbSet<Entities.Saves.SavedMarker> Markers { get; set; }
|
||||
public DbSet<Entities.Saves.SavedPed> Peds { get; set; }
|
||||
public DbSet<Entities.Saves.SavedPickup> Pickups { get; set; }
|
||||
public DbSet<Entities.Saves.SavedTextLabel> TextLabels { get; set; }
|
||||
public DbSet<Entities.Saves.SavedVehicle> Vehicles { get; set; }
|
||||
public DbSet<Entities.ShopVehicle> ShopVehicles { get; set; }
|
||||
|
||||
|
||||
// Business
|
||||
public DbSet<Entities.BusinessBankAccount> BusinessBankAccounts { get; set; }
|
||||
public DbSet<Entities.BusinessData> BusinessData { get; set; }
|
||||
|
||||
// Control Panel
|
||||
public DbSet<Entities.News> News { get; set; }
|
||||
|
||||
// Server Vehicles
|
||||
public DbSet<Entities.ServerVehicle> ServerVehicles { get; set; }
|
||||
public DbSet<Entities.VehicleMod> VehicleMods { get; set; }
|
||||
public DbSet<Entities.VehicleItem> VehicleItems { get; set; }
|
||||
|
||||
// Whitelist
|
||||
public DbSet<Entities.Whitelist> WhitelistEntries { get; set; }
|
||||
|
||||
// Interiors
|
||||
public DbSet<Entities.Interior> Interiors { get; set; }
|
||||
|
||||
// Tuning Garages
|
||||
public DbSet<Entities.TuningGarage> TuningGarages { get; set; }
|
||||
|
||||
// Gruppen
|
||||
public DbSet<Entities.Group> Groups { get; set; }
|
||||
public DbSet<Entities.GroupBankAccount> GroupBankAccounts { get; set; }
|
||||
public DbSet<Entities.GroupVehicle> GroupVehicles { get; set; }
|
||||
|
||||
// Jobs
|
||||
public DbSet<Entities.JobVehicle> JobVehicles { get; set; }
|
||||
|
||||
// Houses
|
||||
public DbSet<Entities.House> Houses { get; set; }
|
||||
public DbSet<Entities.HouseRental> HouseRentals { get; set; }
|
||||
|
||||
// Bus Routes
|
||||
public DbSet<Entities.BusRoute> BusRoutes { get; set; }
|
||||
public DbSet<Entities.BusRoutePoint> BusRoutesPoints { get; set; }
|
||||
}
|
||||
}
|
||||
26
ReallifeGamemode.Database/ReallifeGamemode.Database.csproj
Normal file
26
ReallifeGamemode.Database/ReallifeGamemode.Database.csproj
Normal file
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.2.6">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.2.0" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ReallifeGamemode.Services\ReallifeGamemode.Services.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Bootstrapper">
|
||||
<HintPath>..\..\bridge\runtime\Bootstrapper.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user