You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Team leaders and PMs should be able to take attendance for each sprint. To add this new feature create the following endpoints:
POST /api/v1/user/userId/attendance
GET /api/v1/user/userId/attendance
PUT /api/v1/users/userId/attendance
DELETE /api/v1/users/userId/attendance
Notes on implementation
In model/users you will have to add a new table to persist the attendance records. Create a new class called Attendance.java. It should look something like this:
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
@Entity
@Table(name = "attendance")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Attendance {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_id")
private User user;
private LocalDate date;
private String status; // Could be an enum representing Present, Absent, Late, etc.
}
Once you added this class, you have to add to the user schema
Description
Team leaders and PMs should be able to take attendance for each sprint. To add this new feature create the following endpoints:
Notes on implementation
In
model/users
you will have to add a new table to persist the attendance records. Create a new class calledAttendance.java
. It should look something like this:Once you added this class, you have to add to the user schema
Create a new repository for the Attendance records in
repostiory/users/
. It should look something like thisAdd your new handlers in
service/users/UserService
and then implement them inservice/users/UserServiceImpl
Finally, map your handlers to an endpoint in
controller/UserController
The text was updated successfully, but these errors were encountered: