package com.github.wxiaoqi.security.admin.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import tk.mybatis.mapper.annotation.KeySql;
import tk.mybatis.mapper.code.IdentityDialect;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import java.util.Objects;

/**
 * @author Administrator
 */
@Table(name = "app_staff_user")
@Data
public class AppStaffUser {
    @Id
    @KeySql(dialect = IdentityDialect.MYSQL)
    private Integer id;
    @Column(name = "su_id")
    @ApiModelProperty("员工app账号id")
    private Integer suId;
    @Column(name = "su_phone")
    @ApiModelProperty("员工手机号")
    private String suPhone;
    @Column(name = "u_name")
    @ApiModelProperty("客户姓名")
    private String uName;
    @Column(name = "u_id")
    @ApiModelProperty("客户id")
    private Integer uid;
    @ApiModelProperty("客户手机")
    private String phone;
    @ApiModelProperty("客户公司")
    private String company;
    @ApiModelProperty("备注")
    private String remarks;
    @Column(name = "crt_time")
    @ApiModelProperty("创建时间")
    private Date crtTime;
    @Column(name = "upd_time")
    @ApiModelProperty("修改时间")
    private Date updTime;
    @Column(name = "is_del")
    @ApiModelProperty("状态:0-未删除 1-已删除")
    private Integer isDel;
    private Integer status;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof AppStaffUser)) return false;
        AppStaffUser that = (AppStaffUser) o;
        return Objects.equals(phone, that.phone);
    }

    @Override
    public int hashCode() {
        return Objects.hash(phone);
    }
}
