package com.fzm.mall.server.admin.home_page.model;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author wangp
 * @date 2021/2/26 16:06
 * @description 管理员模型
 * @since JDK 1.8
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Admin对象", description = "")
@TableName("admin")
public class Admin implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 平台
     */
    public static final Integer PALT_TYPE = 1;

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

    @ApiModelProperty(value = "管理员id")
    private String adminId;

    @ApiModelProperty(value = "商户号")
    private String merchantId;

    @ApiModelProperty(value = "管理员角色id")
    private String roleId;

    @ApiModelProperty(value = "头像")
    private String headImg;

    @ApiModelProperty(value = "管理员账号")
    private String account;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "使用者")
    private String user;

    @ApiModelProperty(value = "联系电话")
    private String linkPhone;

    @ApiModelProperty(value = "管理员归属 (1-平台 2.商户 3.平台商户)")
    private Integer type;

    @ApiModelProperty(value = "状态(0.删除 1.可用 2.禁用)")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    public Admin() {
    }

    public Admin(String merchantId, String roleId, String headImg, String account, String password, String user, Integer type, Integer status) {
        this.merchantId = merchantId;
        this.roleId = roleId;
        this.headImg = headImg;
        this.account = account;
        this.password = password;
        this.user = user;
        this.type = type;
        this.status = status;
    }
}
