package com.qmth.paper.library.common.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.qmth.paper.library.common.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

/**
 * <p>
 * 字段管理表
 * </p>
 *
 * @author xf
 * @since 2024-07-30
 */
@TableName("basic_field")
@ApiModel(value = "BasicField对象", description = "字段管理表")
public class BasicField extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "学校ID")
    private Long schoolId;

    @ApiModelProperty(value = "字段代码")
    private String code;

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

    @ApiModelProperty(value = "是否选中")
    private Boolean enable;

    @ApiModelProperty(value = "是否禁用")
    private Boolean disabled;

    @ApiModelProperty(value = "是否基础字段")
    private Boolean basicField;

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public Boolean getDisabled() {
        return disabled;
    }

    public void setDisabled(Boolean disabled) {
        this.disabled = disabled;
    }

    public Boolean getBasicField() {
        return basicField;
    }

    public void setBasicField(Boolean basicField) {
        this.basicField = basicField;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BasicField that = (BasicField) o;
        return code.equals(that.code);
    }

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

    @Override
    public String toString() {
        return "BasicField{" +
                ", schoolId=" + schoolId +
                ", code=" + code +
                ", name=" + name +
                ", enable=" + enable +
                ", disabled=" + disabled +
                ", basicField=" + basicField +
                "}";
    }
}
