Added various
- Added DOC - Added Patient - Added Notifications - Added Messages - Various Refactoring
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SeniorAssistant.Models
|
||||
{
|
||||
@@ -12,8 +9,7 @@ namespace SeniorAssistant.Models
|
||||
|
||||
public class MenuItem : IMenuItem
|
||||
{
|
||||
public MenuItem(string text) : this(text, "#") { }
|
||||
public MenuItem(string text, string href)
|
||||
public MenuItem(string text, string href = "#")
|
||||
{
|
||||
Text = text;
|
||||
HRef = href;
|
||||
|
||||
26
SeniorAssistant/Models/Message.cs
Normal file
26
SeniorAssistant/Models/Message.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using LinqToDB.Mapping;
|
||||
using System;
|
||||
|
||||
namespace SeniorAssistant.Models
|
||||
{
|
||||
public class Message : IHasTime
|
||||
{
|
||||
[Column(IsPrimaryKey = true, CanBeNull = false, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public DateTime Time { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Username { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Reciver { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Body { get; set; }
|
||||
|
||||
public bool Seen { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
21
SeniorAssistant/Models/Notification.cs
Normal file
21
SeniorAssistant/Models/Notification.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using LinqToDB.Mapping;
|
||||
using System;
|
||||
|
||||
namespace SeniorAssistant.Models
|
||||
{
|
||||
public class Notification : IHasTime
|
||||
{
|
||||
[Column(IsPrimaryKey = true, CanBeNull = false, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Username { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public DateTime Time { get; set; }
|
||||
|
||||
public bool Seen { get; set; }
|
||||
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
17
SeniorAssistant/Models/Users/Doctor.cs
Normal file
17
SeniorAssistant/Models/Users/Doctor.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using LinqToDB.Mapping;
|
||||
|
||||
namespace SeniorAssistant.Models.Users
|
||||
{
|
||||
public class Doctor : IHasUsername
|
||||
{
|
||||
[Column(IsPrimaryKey = true, CanBeNull = false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Association(ThisKey = "Username", OtherKey = nameof(User.Username), CanBeNull = false)]
|
||||
public User UserData { get; set; }
|
||||
|
||||
public string Location { get; set; }
|
||||
|
||||
public string Schedule { get; set; }
|
||||
}
|
||||
}
|
||||
18
SeniorAssistant/Models/Users/Patient.cs
Normal file
18
SeniorAssistant/Models/Users/Patient.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using LinqToDB.Mapping;
|
||||
|
||||
namespace SeniorAssistant.Models.Users
|
||||
{
|
||||
public class Patient : IHasUsername
|
||||
{
|
||||
[Column(IsPrimaryKey = true, CanBeNull = false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Association(ThisKey = "Username", OtherKey = nameof(User.Username), CanBeNull = false)]
|
||||
public User UserData { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Doctor { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using LinqToDB.Mapping;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SeniorAssistant.Models
|
||||
@@ -15,10 +14,7 @@ namespace SeniorAssistant.Models
|
||||
[NotNull]
|
||||
[JsonIgnore]
|
||||
public string Password { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Role { get; set; }
|
||||
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string LastName { get; set; }
|
||||
Reference in New Issue
Block a user