Begin faction system
This commit is contained in:
@@ -35,5 +35,6 @@ namespace reallife_gamemode.Model
|
||||
}
|
||||
|
||||
public DbSet<Server.Entities.User> Users { get; set; }
|
||||
public DbSet<Server.Entities.Faction> Factions { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
19
Server/Entities/Faction.cs
Normal file
19
Server/Entities/Faction.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 reallife_gamemode.Server.Entities
|
||||
{
|
||||
public class Faction
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
[StringLength(32)]
|
||||
public string Name { get; set; }
|
||||
public int BankAccount { get; set; }
|
||||
public bool StateOwned { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -31,6 +31,7 @@ namespace reallife_gamemode.Server.Entities
|
||||
[StringLength(64)]
|
||||
public string Email { get; set; }
|
||||
public AdminLevel AdminLevel { get; set; }
|
||||
public Faction Faction { get; set; }
|
||||
|
||||
public bool IsAdmin(AdminLevel level) => AdminLevel >= level;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user