Log UserWeapon

This commit is contained in:
VegaZ
2021-04-11 19:28:12 +02:00
parent d27b205242
commit e0a34d8f00
6 changed files with 92 additions and 6 deletions

View 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 partial class UserWeapon
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
[ForeignKey("User")]
public int UserId { get; set; }
public User User { get; set; }
[ForeignKey("Weapon")]
public int WeaponId { get; set; }
public Weapon Weapon { get; set; }
public int Ammo { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace ReallifeGamemode.Database.Entities
{
public partial class Weapon
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string WeaponModel { get; set; }
public string Category { get; set; }
public int SlotID { get; set; }
public int Ammo { get; set; }
public float Price { get; set; }
}
}

View File

@@ -74,6 +74,8 @@ namespace ReallifeGamemode.Database.Models
public DbSet<Entities.UserVehicle> UserVehicles { get; set; }
public DbSet<Entities.UserBankAccount> UserBankAccounts { get; set; }
public DbSet<Entities.UserWeapon> UserWeapons { get; set; }
//Inventar
public DbSet<Entities.UserItem> UserItems { get; set; }
@@ -85,8 +87,12 @@ namespace ReallifeGamemode.Database.Models
public DbSet<Entities.FactionVehicle> FactionVehicles { get; set; }
//Shops
public DbSet<Entities.ShopClothe> ShopClothes { get; set; }
public DbSet<Entities.ShopItem> ShopItems { get; set; }
public DbSet<Entities.Weapon> Weapons { get; set; }
//Logs
//public DbSet<Logs.Ban> BanLogs { get; set; }
public DbSet<Entities.Logs.BankAccountTransactionHistory> BankAccountTransactionLogs { get; set; }
public DbSet<Entities.Logs.Death> DeathLogs { get; set; }
@@ -155,12 +161,6 @@ namespace ReallifeGamemode.Database.Models
//Gangwar
public DbSet<Entities.Turfs> Turfs { get; set; }
//ClothesShop
public DbSet<Entities.ShopClothe> ShopClothes { get; set; }
//ItemShop
public DbSet<Entities.ShopItem> ShopItems { get; set; }
//Server Variablen
public DbSet<Entities.ServerVariable> ServerVariables { get; set; }
}