Skip to content

Commit

Permalink
HRIS-333 [BE] Implement add new request schedule (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
arden-dave committed Jul 7, 2023
1 parent 6746005 commit 30576e0
Show file tree
Hide file tree
Showing 16 changed files with 4,416 additions and 13 deletions.
1 change: 1 addition & 0 deletions api/Context/HrisContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public HrisContext(DbContextOptions<HrisContext> options)
public DbSet<Overtime> Overtimes { get; set; } = default!;
public DbSet<ChangeShiftRequest> ChangeShiftRequests { get; set; } = default!;
public DbSet<ESLChangeShiftRequest> ESLChangeShiftRequests { get; set; } = default!;
public DbSet<ChangeScheduleRequest> ChangeScheduleRequests { get; set; } = default!;
public DbSet<Position> Positions { get; set; } = default!;
public DbSet<ESLOffset> ESLOffsets { get; set; } = default!;
public DbSet<Form> Forms { get; set; } = default!;
Expand Down
17 changes: 17 additions & 0 deletions api/Entities/ChangeScheduleRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace api.Entities
{
public class ChangeScheduleRequest : BaseEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public int UserId { get; set; }
public bool? IsManagerApproved { get; set; }
public bool? IsLeaderApproved { get; set; }
public string Data { get; set; } = default!;
public User User { get; set; } = default!;
}
}
2 changes: 1 addition & 1 deletion api/Entities/Notification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public class Notification : BaseEntity
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public int? RecipientId { get; set; }
public int? RelatedEntityId { get; set; }
public string Type { get; set; } = default!;
public string Data { get; set; } = default!;
public DateTime? ReadAt { get; set; } = default!;
public bool IsRead { get; set; } = false;

public User? Recipient { get; set; }
}
}
2 changes: 2 additions & 0 deletions api/Enums/NotificationTypeEnum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ public static class NotificationTypeEnum
public const string CHANGE_SHIFT = "change shift";
public const string ESL_OFFSET_SCHEDULE = "esl change shift";
public const string ESL_OFFSET = "offset";
public const string CHANGE_SCHEDULE = "change schedule";
public const string LEAVE_RESOLVED = "leave_resolved";
public const string OVERTIME_RESOLVED = "overtime_resolved";
public const string UNDERTIME_RESOLVED = "undertime_resolved";
public const string CHANGE_SHIFT_RESOLVED = "change shift_resolved";
public const string ESL_OFFSET_SCHEDULE_RESOLVED = "esl change shift_resolved";
public const string ESL_OFFSET_RESOLVED = "offset_resolved";
public const string CHANGE_SCHEDULE_RESOLVED = "change schedule_resolved";
}
}
Loading

0 comments on commit 30576e0

Please sign in to comment.