package com.mortals.xhx.module.demo.model;
import java.util.List;
import java.util.List;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityStr;
import com.mortals.xhx.module.demo.model.vo.DemoVo;
import com.mortals.xhx.module.demo.detail.model.DemoDetailEntity;
/**
 * 测试demo实体对象
 *
 * @author zxfei
 * @date 2021-10-22
 */

public class DemoEntity extends DemoVo {
    private static final long serialVersionUID = 1L;

    /**
     * 字段1
     */
    private String fieldOne;
    /**
     * 字段2
     */
    private Long fieldTwo;
    /**
     * 字段3
     */
    private Integer fieldThree;

    /**
     * 测试详细信息
     */
    private List<DemoDetailEntity> demoDetailList;


    public DemoEntity(){}
    /**
     * 获取 字段1
     * @return String
     */
    public String getFieldOne(){
        return fieldOne;
    }
    /**
     * 设置 字段1
     * @param fieldOne
     */
    public void setFieldOne(String fieldOne){
        this.fieldOne = fieldOne;
    }
    /**
     * 获取 字段2
     * @return Long
     */
    public Long getFieldTwo(){
        return fieldTwo;
    }
    /**
     * 设置 字段2
     * @param fieldTwo
     */
    public void setFieldTwo(Long fieldTwo){
        this.fieldTwo = fieldTwo;
    }
    /**
     * 获取 字段3
     * @return Integer
     */
    public Integer getFieldThree(){
        return fieldThree;
    }
    /**
     * 设置 字段3
     * @param fieldThree
     */
    public void setFieldThree(Integer fieldThree){
        this.fieldThree = fieldThree;
    }


    public List<DemoDetailEntity> getDemoDetailList(){
        return demoDetailList;
    }

    public void setDemoDetailList(List<DemoDetailEntity> demoDetailList){
        this.demoDetailList = demoDetailList;
    }


    @Override
    public int hashCode() {
        return this.getId().hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj instanceof DemoEntity) {
            DemoEntity tmp = (DemoEntity) obj;
            if (this.getId() == tmp.getId()) {
                return true;
            }
        }
        return false;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder("");
        sb.append(",fieldOne:").append(getFieldOne());
        sb.append(",fieldTwo:").append(getFieldTwo());
        sb.append(",fieldThree:").append(getFieldThree());
        return sb.toString();
    }

    public void initAttrValue(){
        this.fieldOne = null;
        this.fieldTwo = null;
        this.fieldThree = null;
    }
}