package com.jsowell.pile.domain;

import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 桩与用户绑定关系对象 pile_member_relation
 * 
 * @author jsowell
 * @date 2023-02-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PileMemberRelation extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Integer id;

    /** 桩编码 */
    @Excel(name = "桩编码")
    private String pileSn;

    /** 会员id */
    @Excel(name = "会员id")
    private String memberId;

    /** 身份类型（1-管理员，2-用户） */
    @Excel(name = "身份类型", readConverterExp = "1=-管理员，2-用户")
    private String type;

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

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
            .append("id", getId())
            .append("pileSn", getPileSn())
            .append("memberId", getMemberId())
            .append("type", getType())
            .append("createTime", getCreateTime())
            .toString();
    }
}
