package cn.iocoder.yudao.module.system.dal.dataobject.holiday.holidayuser;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 员工假期 DO
 *
 * @author 艾楷
 */
@TableName("kq_holiday_user")
@KeySequence("kq_holiday_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HolidayUserDO extends BaseDO {

    /**
     * 编号
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 假期设置id
     */
    private Long holidaySettingId;
    /**
     * 假期余额设置id
     */
    private Long holidayBalanceSettingId;
    /**
     * 假期余额(这里的单位根据假期设置的来 没有固定单位)
     */
    private BigDecimal holidayBalance;

    public HolidayUserDO(Long id, Long userId, Long holidaySettingId, Long holidayBalanceSettingId) {
        this.id = id;
        this.userId = userId;
        this.holidaySettingId = holidaySettingId;
        this.holidayBalanceSettingId = holidayBalanceSettingId;
        this.holidayBalance = BigDecimal.ZERO;
    }
}
