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

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.fzm.mall.server.admin.util.UUIDUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 系统中心-区块链管理-通证
 * </p>
 *
 * @author fzm
 * @since 2021-08-12
 */
@Data
@TableName("sys_block_chain_pass")
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SysBlockChainPass对象", description="系统中心-区块链管理-通证")
public class SysBlockChainPass implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 是否可用(0--已被删除 1--正常 2->停用)
     */
    public static final Integer PASS_STATUS_DELETED = 0;

    public static final Integer PASS_STATUS_EFFECTIVE = 1;

    public static final Integer PASS_STATUS_DISABLED = 2;

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

    @ApiModelProperty(value = "区块链编号")
    private String blockChainId;

    @ApiModelProperty(value = "通证编号")
    private String passId;

    @ApiModelProperty(value = "标识")
    private String passIdentification;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "备注")
    private String remark;

    @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 void init() {
        setPassId(UUIDUtil.getUUID());
        setStatus(PASS_STATUS_EFFECTIVE);
    }
}
