Skip to content
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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Review Backend - Poon #2

wants to merge 8 commits into from

Conversation

Poonpit
Copy link
Collaborator

@Poonpit Poonpit commented Apr 28, 2023

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

[Route("[controller]")]
public class CandidateController : ControllerBase
{
private readonly ITodoService _todoService;

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()

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; }

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; }

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; }

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; }

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; }

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

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants