From 71f85e0d3539539a74e72eb86ecb13a0e637e88a Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Sat, 29 Sep 2018 19:08:20 +0200 Subject: adding database class structure --- DSACore/Models/Network/Command.cs | 20 ++++++++++++++++++++ DSACore/Models/Network/Group.cs | 13 +++++++++++++ DSACore/Models/Network/User.cs | 13 +++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 DSACore/Models/Network/Command.cs create mode 100644 DSACore/Models/Network/Group.cs create mode 100644 DSACore/Models/Network/User.cs (limited to 'DSACore/Models/Network') diff --git a/DSACore/Models/Network/Command.cs b/DSACore/Models/Network/Command.cs new file mode 100644 index 0000000..dcfc692 --- /dev/null +++ b/DSACore/Models/Network/Command.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace DSACore.Models.Network +{ + public class Command + { + public ulong GroupId { get; set; } = 0; + public ulong CharId { get; set; } + public string Name { get; set; } + public string CmdIdentifier { get; set; } + public List CmdTexts { get; set; } + public string CmdText => CmdTexts.Count != 0 ? CmdTexts.First() : ""; + + public int Cmdmodifier => CmdTexts.Count!=0&&int.TryParse(CmdTexts.Last(),out int mod)?mod:0; + public bool IsDm { get; set; } = false; + } +} diff --git a/DSACore/Models/Network/Group.cs b/DSACore/Models/Network/Group.cs new file mode 100644 index 0000000..40f5aeb --- /dev/null +++ b/DSACore/Models/Network/Group.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace DSACore.Models.Network +{ + public class Group + { + public string Name { get; set; } + public List Users { get; set; }= new List(); + } +} diff --git a/DSACore/Models/Network/User.cs b/DSACore/Models/Network/User.cs new file mode 100644 index 0000000..b207a19 --- /dev/null +++ b/DSACore/Models/Network/User.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace DSACore.Models.Network +{ + public class User + { + public string Name { get; set; } + public string ConnectionId { get; set; } + } +} -- cgit v1.3.1