-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review Backend - Poon #2
base: main
Are you sure you want to change the base?
Conversation
[Route("[controller]")] | ||
public class CandidateController : ControllerBase | ||
{ | ||
private readonly ITodoService _todoService; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename the service
|
||
} | ||
[HttpGet("Dashboard")] | ||
public List<UserContract> Dashboard() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename the path and method to relate to the operation
public DateTime Meet { get; set; } | ||
[Key] | ||
public Guid UserId { get; set; } | ||
public User User_Appointment { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change User_Appointment to Pascal Case
public DateTime Warn { get; set; } | ||
[Key] | ||
public Guid UserId { get; set; } | ||
public User User_Notification { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to Pascal Case
public string Image { get; set; } | ||
[Key] | ||
public Guid UserId { get; set; } | ||
public User User_Picture { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to Pascal Case
public float Evaluation { get; set; } | ||
[Key] | ||
public Guid UserId { get; set; } | ||
public User User_Score { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to Pascal Case
public string? File { get; set; } = null; | ||
[Key] | ||
public Guid UserId { get; set; } | ||
public User User_File { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to Pascal Case
|
||
namespace Candidate.Services | ||
{ | ||
public interface ITodoService |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename the interface
|
||
namespace Candidate.Data | ||
{ | ||
public class Picture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming the class more specific such as UserPicture or add the comment
Candidate Project
Database
Have 5 tables --> Appointments Table, Pictures Table, Scores Table, UrlFiles Table, Users Tables
Note: Primary key is Id in Users Table references foreign key is UserId in Other Tables
Controllers
GET Method have 6 --> Dashboard, Applied, Accept, Interview, Disqualified, Hired
Note: For get data from database to render in front-end
PUT Method have 1 --> /User/{id}
Note: For update answer form by admin of each
POST Method have 1 --> CreateUser
Note: For create user and set default of data
DELETE Method have 1 --> {id}
Note: For delete data of the user of each