package com.hchyun.test.entity;

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

/**
 * 关联查询父对象 test_ass_father
 *
 * @author hchyun
 * @date 2021-02-10
 */
@ApiModel("关联查询父")
public class AssFather extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty("主键")
    private Long id;

    /**
     * 名称
     */
    @Excel(name = "名称")
    @ApiModelProperty("名称")
    private String name;

    /**
     * 信息
     */
    @Excel(name = "信息")
    @ApiModelProperty("信息")
    private String info;

    @Excels({@Excel(name = "子表名称", targetAttr = "sname"), @Excel(name = "父id", targetAttr = "fId")})
    private AssSun assSun;

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

    public Long getId() {
        return id;
    }

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

    public String getName() {
        return name;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getInfo() {
        return info;
    }

    public AssSun getAssSun() {
        return assSun;
    }

    public void setAssSun(AssSun assSun) {
        this.assSun = assSun;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("name", getName())
                .append("info", getInfo())
                .append("createTime", getCreateTime())
                .toString();
    }
}
