/* * Copyright 2019-2020 Zheng Jie * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package me.zhengjie.modules.attendance.domain; import lombok.Data; import cn.hutool.core.bean.BeanUtil; import io.swagger.annotations.ApiModelProperty; import cn.hutool.core.bean.copier.CopyOptions; import javax.persistence.*; import javax.validation.constraints.*; import javax.persistence.Entity; import javax.persistence.Table; import me.zhengjie.base.BaseEntity; import java.sql.Timestamp; import java.io.Serializable; /** * @website https://eladmin.vip * @description / * @author baolh * @date 2025-03-12 **/ @Entity @Data @Table(name="new_attendance") public class NewAttendance extends BaseEntity implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "`id`") @ApiModelProperty(value = "ID") private Long id; @Column(name = "`user_id`",nullable = false) @NotNull @ApiModelProperty(value = "用户ID 外键") private Long userId; @Column(name = "`attendance_date`",nullable = false) @NotNull @ApiModelProperty(value = "考勤日期") private Timestamp attendanceDate; @Column(name = "`rostering_work_start_time`",nullable = false) @NotNull @ApiModelProperty(value = "排班工作开始时间") private Timestamp rosteringWorkStartTime; @Column(name = "`actual_work_start_time`") @ApiModelProperty(value = "实际工作开始时间") private Timestamp actualWorkStartTime; @Column(name = "`start_location_results`") @ApiModelProperty(value = "开始位置结果") private String startLocationResults; @Column(name = "`start_clock_results`") @ApiModelProperty(value = "开始打卡结果") private String startClockResults; @Column(name = "`rostering_lunch_start_time`",nullable = false) @NotNull @ApiModelProperty(value = "排班午休开始时间") private Timestamp rosteringLunchStartTime; @Column(name = "`rostering_lunch_end_time`",nullable = false) @NotNull @ApiModelProperty(value = "排班午休结束时间") private Timestamp rosteringLunchEndTime; @Column(name = "`rostering_work_end_time`",nullable = false) @NotNull @ApiModelProperty(value = "排班工作结束时间") private Timestamp rosteringWorkEndTime; @Column(name = "`actual_work_end_time`") @ApiModelProperty(value = "实际工作结束时间") private Timestamp actualWorkEndTime; @Column(name = "`end_location_results`") @ApiModelProperty(value = "结束位置结果") private String endLocationResults; @Column(name = "`end_clock_results`") @ApiModelProperty(value = "结束打卡结果") private String endClockResults; @Column(name = "`date_type`",nullable = false) @NotBlank @ApiModelProperty(value = "日期类型") private String dateType; @Column(name = "`remarks`") @ApiModelProperty(value = "备注") private String remarks; @Column(name = "`dept_id`") @ApiModelProperty(value = "部门ID") private Long deptId; public void copy(NewAttendance source){ BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } }