35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
namespace timetracker.Shared;
|
|
|
|
public class AppSettings
|
|
{
|
|
public int Id { get; set; }
|
|
public int UserId { get; set; }
|
|
public double DailyTargetHours { get; set; } = 7.5;
|
|
public int MinimumBreakMinutes { get; set; } = 30;
|
|
public int VacationDaysPerYear { get; set; } = 30;
|
|
public string? GermanState { get; set; }
|
|
public DateOnly? FlexTimeStartDate { get; set; }
|
|
public double FlexTimeStartingBalanceHours { get; set; } = 0.0;
|
|
|
|
// Arbeitstage
|
|
public bool WorkMonday { get; set; } = true;
|
|
public bool WorkTuesday { get; set; } = true;
|
|
public bool WorkWednesday { get; set; } = true;
|
|
public bool WorkThursday { get; set; } = true;
|
|
public bool WorkFriday { get; set; } = true;
|
|
public bool WorkSaturday { get; set; } = false;
|
|
public bool WorkSunday { get; set; } = false;
|
|
|
|
public bool IsWorkDay(DayOfWeek day) => day switch
|
|
{
|
|
DayOfWeek.Monday => WorkMonday,
|
|
DayOfWeek.Tuesday => WorkTuesday,
|
|
DayOfWeek.Wednesday => WorkWednesday,
|
|
DayOfWeek.Thursday => WorkThursday,
|
|
DayOfWeek.Friday => WorkFriday,
|
|
DayOfWeek.Saturday => WorkSaturday,
|
|
DayOfWeek.Sunday => WorkSunday,
|
|
_ => false
|
|
};
|
|
}
|