Student Code: BE112/ 2023BE112
Student Name: Salma Magdy Ishak
This project aims to provide hands-on practice on ASP.NET Core, SQL Server, ASP.NET Core APIs, Identity Core, JWT Authentication and Authorizations,Entity Framework and Onion Architecture.
- Admin (User Class)
- Doctors (Doctor Class Extension of User Class)
- Patient (User Class)
User authentication and Authorization is done using JWT Token, with roles based on our 3 project entities. Role, for all entities types, is determined with user login with his given creditionals. He is given the access to only his authorized endpoints. Admin Data Has been seeded into the database as the App has one admin.
builder.Services.AddAuthorization(options =>
{
options.AddPolicy("Admin", policy =>
{
policy.RequireAuthenticatedUser();
policy.RequireRole("Admin");
});
options.AddPolicy("Doctor", policy =>
{
policy.RequireAuthenticatedUser();
policy.RequireRole("Doctor");
});
options.AddPolicy("Patient", policy =>
{
policy.RequireAuthenticatedUser();
policy.RequireRole("Patient");
});
});
--> Main Project : VezeetaEndPoints
-
- Models
- Appointment
- Booking
- Doctor
- User
- Discount
- Specalization
- Timeslot
- DTOs
- AddAppointmentDTO
- AddDoctorDTO
- DiscountDTO
- PatientDTO
- Repositories
- IAdminRepository
- IPatientRepository
- IDoctorRepository
- Models
-
- Dbcontexts
- VezeetaContext
- Repositories Implementations
- AdminRepository
- PatientRepository
- DoctorRepository
- Migrations
- Dbcontexts
-
- Interfaces
- IAdminServices
- IPatientServices
- IDoctorServices
- IEmailService
- Services
- AdminServices
- DoctorServices
- PatientServices
- EmailServices
- Interfaces
-
- API Endpoints Controller
- AdminController
- DoctorController
- PatientController
- UserController
- Program.cs
- API Endpoints Controller
(created inside SSMS)
(Back up is also in Database BackUp Folder)
- User Type
- Admin
- Doctor
- Patient
- Booking Status
- Pending
- Completed
- Canceled
- Gender
- Female
- Male
- Day Of Week
- Saturday
- Sunday
- Etc...
- Discount Activity
- Active
- Deactive
- Discount Type
- Percentage
- Value