package com.willalp.salary.domain;

import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;

/**
 * 工资条基础对象 hs_salary_slip
 *
 * @author willalp
 * @date 2022-07-26
 */

@TableName(value = "hs_salary_slip", autoResultMap = true)
public class HsSalarySlip extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private String id;


    private String source;

    /**
     * 用户系统编码
     */
    @Excel(name = "用户编号")
    private String userCode;

    /**
     * 用户工号（所属机构内部工号）
     */
    @Excel(name = "工号")
    private String userWorkNum;

    /**
     * 用户姓名
     */
    @Excel(name = "姓名")
    private String userName;

    /**
     * 工资发放日期
     */
    @Excel(name = "日期")
    private String payDate;

    /**
     * 应发工资
     */
    private BigDecimal salary;

    /**
     * 实发工资
     */
    @Excel(name = "实发金额")
    private BigDecimal fsalary;

    /**
     * 完整数据
     */
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONArray zend;

    /**
     * 工资条状态（未发布，已发布 。。。）
     */
    private String paySlipStatus;

    /**
     * 是否删除（0.未删除；1.已删除）
     */
    @TableLogic
    private Integer isDelete;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserCode() {
        return userCode;
    }

    public void setUserWorkNum(String userWorkNum) {
        this.userWorkNum = userWorkNum;
    }

    public String getUserWorkNum() {
        return userWorkNum;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setPayDate(String payDate) {
        this.payDate = payDate;
    }

    public String getPayDate() {
        return payDate;
    }

    public void setSalary(BigDecimal salary) {
        this.salary = salary;
    }

    public BigDecimal getSalary() {
        return salary;
    }

    public void setFsalary(BigDecimal fsalary) {
        this.fsalary = fsalary;
    }

    public BigDecimal getFsalary() {
        return fsalary;
    }

    public void setPaySlipStatus(String paySlipStatus) {
        this.paySlipStatus = paySlipStatus;
    }

    public String getPaySlipStatus() {
        return paySlipStatus;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userCode", getUserCode())
                .append("userWorkNum", getUserWorkNum())
                .append("userName", getUserName())
                .append("payDate", getPayDate())
                .append("salary", getSalary())
                .append("fsalary", getFsalary())
                .append("paySlipStatus", getPaySlipStatus())
                .append("isDelete", getIsDelete())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }

    public JSONArray getZend() {
        return zend;
    }

    public void setZend(JSONArray zend) {
        this.zend = zend;
    }
}
