diff --git a/Model/DatabaseContext.cs b/Model/DatabaseContext.cs index ac8d3c94..aa0dea76 100644 --- a/Model/DatabaseContext.cs +++ b/Model/DatabaseContext.cs @@ -40,6 +40,9 @@ namespace reallife_gamemode.Model public DbSet UserVehicles { get; set; } public DbSet BankAccounts { get; set; } + public DbSet BankAccountTransactionHistories { get; set; } + public DbSet Deaths { get; set; } + public DbSet Blips { get; set; } public DbSet Markers { get; set; } public DbSet Peds { get; set; } diff --git a/Server/Entities/UserBankAccount.cs b/Server/Entities/UserBankAccount.cs index ba295a39..b636a940 100644 --- a/Server/Entities/UserBankAccount.cs +++ b/Server/Entities/UserBankAccount.cs @@ -7,7 +7,7 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Text; /** -* @overview Life of German Reallife - Entities UserVehicle (UserVehicle.cs) +* @overview Life of German Reallife - Entities UserBankAccount (UserBankAccount.cs) * @author VegaZ * @copyright (c) 2008 - 2018 Life of German */ @@ -23,10 +23,10 @@ namespace reallife_gamemode.Server.Entities public int UserId { get; set; } public User User { get; set; } [StringLength(12)] - public string bic { get; set; } + public string Bic { get; set; } [StringLength(32)] public string Iban { get; set; } - public float Money { get; set; } + public float Balance { get; set; } public bool Active { get; set; } } } \ No newline at end of file diff --git a/Server/Logs/BankAccountTransactionHistory.cs b/Server/Logs/BankAccountTransactionHistory.cs new file mode 100644 index 00000000..ac14e6c1 --- /dev/null +++ b/Server/Logs/BankAccountTransactionHistory.cs @@ -0,0 +1,34 @@ +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 reallife_gamemode.Server.Logs +{ + public class BankAccountTransactionHistory + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + + [StringLength(32)] + public string Sender { get; set; } + public float SenderBalance { get; set; } + public float MoneySent { get; set; } + [StringLength(32)] + public string Receiver { get; set; } + public float ReceiverBalance { get; set; } + public float NewSenderBalance { get; set; } + public float NewReceiverBalance { get; set; } + public float Fee { get; set; } + [Timestamp] + public byte[] Timestamp { get; set; } + } +} diff --git a/Server/Logs/Death.cs b/Server/Logs/Death.cs new file mode 100644 index 00000000..de924f52 --- /dev/null +++ b/Server/Logs/Death.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using reallife_gamemode.Server.Entities; + +/** +* @overview Life of German Reallife - Logs Death (Death.cs) +* @author VegaZ +* @copyright (c) 2008 - 2018 Life of German +*/ + +namespace reallife_gamemode.Server.Logs +{ + public class Death + { + [Key] + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int Id { get; set; } + + [ForeignKey("Killer")] + public int? KillerId { get; set; } + public User Killer { get; set; } + [ForeignKey("Victim")] + public int VictimId { get; set; } + public User Victim { get; set; } + + public float KillerPositionX { get; set; } + public float KillerPositionY { get; set; } + public float KillerPositionZ { get; set; } + public float KillerHeading { get; set; } + + public float VictimPositionX { get; set; } + public float VictimPositionY { get; set; } + public float VictimPositionZ { get; set; } + public float VictimHeading { get; set; } + + [StringLength(64)] + public string CauseOfDeath { get; set; } + [Timestamp] + public byte[] Timestamp { get; set; } + } +}