Besciamello (#1)
* Fixed login & auth * Added dynamic breadcrumb * Added DOC * Added Patient * Added Notifications * Added Messages * Refactoring api * Re-writed menu * Removed unused things * Created README
This commit was merged in pull request #1.
This commit is contained in:
committed by
GitHub
parent
191daf8218
commit
1246116804
@@ -7,7 +7,6 @@ namespace SeniorAssistant.Models
|
||||
{
|
||||
[PrimaryKey]
|
||||
[NotNull]
|
||||
[Association(ThisKey = nameof(Username), OtherKey = nameof(User.Username), CanBeNull = false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[PrimaryKey]
|
||||
@@ -15,5 +14,10 @@ namespace SeniorAssistant.Models
|
||||
public DateTime Time { get; set; }
|
||||
|
||||
public double Value { get; set; }
|
||||
|
||||
/*
|
||||
[Association(ThisKey = nameof(Username), OtherKey = nameof(User.Username), CanBeNull = false)]
|
||||
public User UserObj { get; set; }
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -25,6 +21,6 @@ namespace SeniorAssistant.Models
|
||||
public class SubMenu : IMenuItem
|
||||
{
|
||||
public string Text { get; set; }
|
||||
public IEnumerable<MenuItem> Items { get; set; }
|
||||
public IList<MenuItem> Items { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SeniorAssistant.Models
|
||||
{
|
||||
public class Register
|
||||
{
|
||||
public string Username { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool Doctor { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@ namespace SeniorAssistant.Models
|
||||
{
|
||||
[PrimaryKey]
|
||||
[NotNull]
|
||||
[Association(ThisKey = nameof(Username), OtherKey = nameof(User.Username), CanBeNull = false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[PrimaryKey]
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace SeniorAssistant.Models
|
||||
{
|
||||
[PrimaryKey]
|
||||
[NotNull]
|
||||
[Association(ThisKey = nameof(Username), OtherKey = nameof(User.Username), CanBeNull = false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[PrimaryKey]
|
||||
|
||||
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,26 +1,22 @@
|
||||
using LinqToDB.Mapping;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace SeniorAssistant.Models
|
||||
{
|
||||
public class User : IHasUsername
|
||||
{
|
||||
[PrimaryKey]
|
||||
[NotNull]
|
||||
[Column(IsPrimaryKey = true, CanBeNull = false)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public string Email { get; set; }
|
||||
|
||||
[NotNull]
|
||||
[JsonIgnore]
|
||||
public string Password { get; set; }
|
||||
|
||||
[NotNull]
|
||||
public bool Doctor { get; set; }
|
||||
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public string LastName { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user