package com.hchyun.test.entity;

import com.hchyun.common.annotation.Excels;
import com.hchyun.common.core.entity.BaseEntity;
import com.hchyun.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 测试a对象 test_rel_a
 * 
 * @author hchyun
 * @date 2021-02-26
 */
@ApiModel("测试a")
public class RelA extends BaseEntity{

    /** id表a */
    @ApiModelProperty("id表a")
    private Long aid;

    /** a表信息 */
    @Excel(name = "a表信息")
    @ApiModelProperty("a表信息")
    private String infoa;


    /**  测试b表信息 */
    @Excels({@Excel(name = "b创建时间",targetAttr = "createTime"),@Excel(name = "信息b",targetAttr = "infob"),@Excel(name = "关联id",targetAttr = "uniconId"),@Excel(name = "b表id",targetAttr = "bid"),})
    private RelB relB;

    /**  测试c表信息 */
    @Excels({@Excel(name = "c表信息",targetAttr = "infoc"),@Excel(name = "关联ID",targetAttr = "uniconId"),@Excel(name = "c表id",targetAttr = "cid"),@Excel(name = "c创建时间",targetAttr = "createTime"),})
    private RelC relC;


    public void setAid(Long aid){
        this.aid = aid;
    }

    public Long getAid(){
        return aid;
    }
    public void setInfoa(String infoa){
        this.infoa = infoa;
    }

    public String getInfoa(){
        return infoa;
    }

    public RelB getRelB(){
        return relB;
    }

    public void setRelB(RelB relB){
        this.relB = relB;
    }
    public RelC getRelC(){
        return relC;
    }

    public void setRelC(RelC relC){
        this.relC = relC;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("aid", getAid())
            .append("infoa", getInfoa())
            .append("createTime", getCreateTime())
            .append("relB",getRelB())
            .append("relC",getRelC())
            .toString();
    }
}
