start car shop

This commit is contained in:
hydrant
2018-12-20 22:20:19 +01:00
parent b16ed270c2
commit 9f9d84f383
14 changed files with 144 additions and 70 deletions

View File

@@ -1,31 +0,0 @@
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 - Entities Shop (Shop.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Entities
{
public class Shop
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string ShopName { get; set; }
public float Balance { get; set; }
[ForeignKey("ShopCategory")]
public int Category { get; set; }
public ShopCategory ShopCategory { get; set; }
public int Owner { get; set; }
public bool Active { get; set; }
}
}

View File

@@ -1,23 +0,0 @@
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 - Entities ShopCategory (ShopCategory.cs)
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
namespace reallife_gamemode.Server.Entities
{
public class ShopCategory
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string Category { get; set; }
}
}

View File

@@ -1,4 +1,5 @@
using GTANetworkAPI;
using reallife_gamemode.Server.Business;
using reallife_gamemode.Server.Util;
using System;
using System.Collections.Generic;
@@ -19,7 +20,7 @@ namespace reallife_gamemode.Server.Entities
{
[ForeignKey("Shop")]
public int? ShopId { get; set; }
public Shop Shop { get; set; }
public int BusinessId { get; set; }
public int Price { get; set; }
public override string ToString()