package cn.estsh.i3plus.pojo.platform.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.text.DecimalFormat;

/**
 * @Description : 关系-用户部门
 * @Reference   :
 * @Author      : wei.peng
 * @Date        : 2018-10-22 16:58:43.239
 * @Modify      :
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_REF_USER_DEPARTMENT")
@Api(value="关系-账号部门",description = "关系-账号部门")
public class SysRefUserDepartment extends BaseBean {

    private static final long serialVersionUID = -2361062982274833764L;
    @Column(name="USER_ID")
    @ApiParam(value ="用户ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @Column(name="USER_NAME")
    @ApiParam(value ="用户名称")
    private String userNameRdd;
 
    @Column(name="DEPARTMENT_ID")
    @ApiParam(value ="部门ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long departmentId;

    @Column(name="DEPARTMENT_NAME_RDD")
    @ApiParam(value ="部门名称")
    private String departmentNameRdd;

    @Column(name="ORGANIZE_ID")
    @ApiParam(value ="组织ID" , example = "-1")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long organizeId;

    @Column(name="ORGANIZE_NAME_RDD")
    @ApiParam(value ="组织名称")
    private String organizeNameRdd;

    public SysRefUserDepartment() {
    }

    public SysRefUserDepartment(Long userId, String userName,Long departmentId, String departmentNameRdd) {
        this.userId = userId;
        this.userNameRdd = userName;
        this.departmentId = departmentId;
        this.departmentNameRdd = departmentNameRdd;
    }
}
