From eb64fedb029374a4a19d563cd7b433d3415a7cb9 Mon Sep 17 00:00:00 2001 From: Daniel Gyulai Date: Sun, 11 Oct 2020 21:04:03 +0200 Subject: [PATCH] Prepare project to Entity Framework with base classes --- CoviDok/CoviDok.csproj | 1 + CoviDok/data/Assistant.cs | 24 ++++++++++++++++++++++++ CoviDok/data/Case.cs | 20 ++++++++++++++++++++ CoviDok/data/Child.cs | 17 +++++++++++++++++ CoviDok/data/Doctor.cs | 26 ++++++++++++++++++++++++++ CoviDok/data/Image.cs | 14 ++++++++++++++ CoviDok/data/Parent.cs | 24 ++++++++++++++++++++++++ CoviDok/data/Update.cs | 15 +++++++++++++++ 8 files changed, 141 insertions(+) create mode 100644 CoviDok/data/Assistant.cs create mode 100644 CoviDok/data/Case.cs create mode 100644 CoviDok/data/Child.cs create mode 100644 CoviDok/data/Doctor.cs create mode 100644 CoviDok/data/Image.cs create mode 100644 CoviDok/data/Parent.cs create mode 100644 CoviDok/data/Update.cs diff --git a/CoviDok/CoviDok.csproj b/CoviDok/CoviDok.csproj index f450963..43df7ad 100644 --- a/CoviDok/CoviDok.csproj +++ b/CoviDok/CoviDok.csproj @@ -8,6 +8,7 @@ + diff --git a/CoviDok/data/Assistant.cs b/CoviDok/data/Assistant.cs new file mode 100644 index 0000000..a6df0f9 --- /dev/null +++ b/CoviDok/data/Assistant.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + public class Assistant + { + public string Id { get; set; } + + public string Email { get; set; } + + public string Password { get; set; } + + public string FirstName { get; set; } + + public string LastName { get; set; } + + public DateTime RegistrationDate { get; set; } + + public string DoctorId { get; set; } + } +} diff --git a/CoviDok/data/Case.cs b/CoviDok/data/Case.cs new file mode 100644 index 0000000..d9d403c --- /dev/null +++ b/CoviDok/data/Case.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + public class Case + { + public string DoctorID { get; set; } + public string ParentID { get; set; } + public string ChildID { get; set; } + + public ICollection updates = new List(); + + public string Assignee { get; set; } + + + } +} diff --git a/CoviDok/data/Child.cs b/CoviDok/data/Child.cs new file mode 100644 index 0000000..9bd3e2c --- /dev/null +++ b/CoviDok/data/Child.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + public class Child + { + public string Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string DoctorId { get; set; } + public string ParentId { get; set; } + public ICollection MedicalHistory { get; } = new List(); + } +} diff --git a/CoviDok/data/Doctor.cs b/CoviDok/data/Doctor.cs new file mode 100644 index 0000000..85ab01b --- /dev/null +++ b/CoviDok/data/Doctor.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + public class Doctor + { + public string Id { get; set; } + + public string Email { get; set; } + + public string Password { get; set; } + + public string FirstName { get; set; } + + public string LastName { get; set; } + + public DateTime RegistrationDate { get; set; } + + public ICollection Children { get; } = new List(); + + public ICollection Assistants { get; } = new List(); + } +} diff --git a/CoviDok/data/Image.cs b/CoviDok/data/Image.cs new file mode 100644 index 0000000..6453057 --- /dev/null +++ b/CoviDok/data/Image.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + //Store Image ID, get actual content from MinIO backend. + public class Image + { + public string ImageID { get; set; } + + } +} diff --git a/CoviDok/data/Parent.cs b/CoviDok/data/Parent.cs new file mode 100644 index 0000000..db1a994 --- /dev/null +++ b/CoviDok/data/Parent.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + public class Parent + { + public string Id { get; set; } + + public string Email { get; set; } + + public string Password { get; set; } + + public string FirstName { get; set; } + + public string LastName { get; set; } + + public DateTime RegistrationDate { get; set; } + + public ICollection Children { get; } = new List(); + } +} diff --git a/CoviDok/data/Update.cs b/CoviDok/data/Update.cs new file mode 100644 index 0000000..fe499d0 --- /dev/null +++ b/CoviDok/data/Update.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace CoviDok.data +{ + public class Update + { + public string Sender { get; set; } + public string Content { get; set; } + + public ICollection Images = new List(); + } +}