package com.storlead.centre.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.mybatis.entity.SysBaseField;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * OA系统签到/签退记录表
 * </p>
 *
 * @author chenkq
 * @since 2026-01-04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("attendance_sign_record")
@ApiModel(value="AttendanceSignRecordEntity对象", description="OA系统签到/签退记录表")
public class AttendanceSignRecordEntity extends SysBaseField {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "微信Id")
    @TableField("wx_user_id")
    private String wxUserId;

    @ApiModelProperty(value = "员工ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "员工姓名（冗余）")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "部门ID")
    @TableField("dept_id")
    private Long deptId;

    @ApiModelProperty(value = "部门名称（冗余）")
    @TableField("dept_name")
    private String deptName;

    @ApiModelProperty(value = "考勤组ID")
    @TableField("group_id")
    private Long groupId;

    @ApiModelProperty(value = "考勤组名称")
    @TableField("group_name")
    private String groupName;

    @ApiModelProperty(value = "打卡类型：ON_DUTY上班 OFF_DUTY下班")
    @TableField("checkin_type")
    private String checkinType;

    @ApiModelProperty(value = "是否同步OA：0 未同步，1：已同步")
    @TableField("sync_oa")
    private Integer syncOa;

    @ApiModelProperty(value = "异常类型：NORMAL LATE EARLY ABSENT")
    @TableField("exception_type")
    private String exceptionType;

    @TableField("checkin_wx_time")
    private Long checkinWxTime;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @TableField("checkin_date")
    private LocalDate checkinDate;

    @ApiModelProperty(value = "打卡时间（Unix时间戳，秒）")
    @TableField("checkin_time")
    private String checkinTime;


    @ApiModelProperty(value = "打卡地点名称")
    @TableField("location_title")
    private String locationTitle;

    @ApiModelProperty(value = "打卡地点详细地址")
    @TableField("location_detail")
    private String locationDetail;

    @ApiModelProperty(value = "WiFi 名称")
    @TableField("wifi_name")
    private String wifiName;

    @ApiModelProperty(value = "WiFi MAC 地址")
    @TableField("wifi_mac")
    private String wifiMac;

    @ApiModelProperty(value = "经度（放大后的整型）")
    @TableField("longitude")
    private String longitude;

    @ApiModelProperty(value = "纬度（放大后的整型）")
    @TableField("latitude")
    private String latitude;

    @ApiModelProperty(value = "设备唯一标识")
    @TableField("device_id")
    private String deviceId;

    @ApiModelProperty(value = "打卡媒体ID列表（JSON数组）")
    @TableField("media_ids")
    private String mediaIds;

    @ApiModelProperty(value = "打卡备注")
    @TableField("remark")
    private String remark;


}
