package kr.co.accura.wtm.domain.config.entity;

import jakarta.persistence.*;
import kr.co.accura.wbx.spring.common.BaseEntity;
import lombok.*;

import java.math.BigDecimal;

@Entity
@Table(name = "work_rules")
@Getter @Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class WorkRule extends BaseEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(length = 50)
    private String location;

    @Column(name = "min_daily_hours", precision = 4, scale = 2)
    @Builder.Default
    private BigDecimal minDailyHours = new BigDecimal("8.00");

    @Column(name = "max_daily_hours", precision = 4, scale = 2)
    @Builder.Default
    private BigDecimal maxDailyHours = new BigDecimal("12.00");

    @Column(name = "max_weekly_hours", precision = 5, scale = 2)
    @Builder.Default
    private BigDecimal maxWeeklyHours = new BigDecimal("52.00");

    @Column(name = "is_active")
    @Builder.Default
    private Boolean isActive = true;
}
