Commit c7511bcc authored by hasan khaddour's avatar hasan khaddour

adding Domain Entities

parent 13bc2dcc
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class EntityBase
{
public int Id { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class Category : EntityBase
{
public String Name { get; set; }
public ICollection<Medicine> Medicines { get; set; }
}
}
using Microsoft.AspNetCore.Identity;
using System;
namespace ApplicationCore.Entities
{
public class User :IdentityUser
{
public DateTime CreationTime { get; set; }
public int PatientId { get; set; }
public Patient Patient { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class Ingredient : EntityBase
{
public String Name { get; set; }
public String Description { get; set; }
public ICollection<Medicine> Medicines { get; set; }
public ICollection<MedicineIngredient> MedicineIngredients { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class Medicine : EntityBase
{
public String Name { get; set; }
public String Description { get; set; }
public int Price { get; set; }
public int Dosage { get; set; }
public Category Category { get; set; }
public MedicineType MedicineType { get; set; }
public ICollection<Ingredient> Ingredients { get; set; }
public ICollection<MedicineIngredient> MedicineIngredients { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class MedicineIngredient : EntityBase
{
public int Ratio { get; set; }
public int MedicineId { get; set; }
public int IngredientId { get; set; }
public Medicine Medicine { get; set; }
public Ingredient Ingredient { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class MedicineType : EntityBase
{
public String TypeName { get; set; }
public ICollection<Medicine> Medicines { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class Patient : EntityBase
{
public String FirstName { get; set; }
public String LastName { get; set; }
public String Avatar { get; set; }
public User User { get; set; }
public String BIO { get; set; }
public ICollection<Medicine> Medicines { get; set; }
public ICollection<PatientMedicine> PatientMedicines { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ApplicationCore.Entities
{
public class PatientMedicine : EntityBase
{
public DateTime PrescripDate { get; set; }
public int MedicineId { get; set; }
public int PatientId { get; set; }
public Medicine Medicine { get; set; }
public Patient Patient { get; set; }
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment