package jnpf.entity.attendance;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import jnpf.base.entity.SuperBaseEntity;
import jnpf.util.ConstantUtil;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 考勤组-考勤点配置表
 *
 * @author yanwenfu
 * @create 2023-11-23
 */

@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName(value = "ftb_attendance_location_setting")
public class AttendanceLocationSetting extends SuperBaseEntity.SuperCUDBaseEntity<String> implements Serializable {

    private static final long serialVersionUID = 544929660727500368L;

    /**
     * 考勤组id
     */
    @TableField(value = "F_GroupId")
    private String groupId;

    /**
     * 打卡方式（1GPS打卡 2WIFI打卡 3考勤机打卡）
     */
    @TableField(value = "F_Type")
    private Integer type;

    /**
     * 考勤点名称
     */
    @TableField(value = "F_Name")
    private String name;

    /**
     * 考勤地址/MAC地址/考勤机ID
     */
    @TableField(value = "F_Address")
    private String address;

    /**
     * 厂商code(考勤机使用)
     */
    @TableField(value = "F_FactoryCode")
    private String factoryCode;

    /**
     * 范围（米）
     */
    @TableField(value = "F_Range")
    private Integer clockRange;

    /**
     * 是否启用
     */
    @TableField(value = "F_Enable")
    private Integer enable;

    /**
     * 经度
     */
    @TableField(value = "F_Lng")
    private String lng;

    /**
     * 维度
     */
    @TableField(value = "F_Lat")
    private String lat;
    /**
     * 门店id
     */
    @TableField(value = "F_StoreId")
    private String storeId;

    @TableField(value = "F_DeleteMark")
    private Integer deleteMark;

    public AttendanceLocationSetting(String id, String groupId, String name, String address, String factoryCode) {
        // id为考勤机管理的id
        super.setId(id);
        this.groupId = groupId;
        this.type = ConstantUtil.DEVICE_MACHINE;
        this.name = name;
        this.address = address;
        this.factoryCode = factoryCode;
        this.enable = 1;
    }
}
