package com.willalp.app.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.BaseEntity;
import com.willalp.common.core.domain.entity.SysDept;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * app首页对象 hs_app_home
 *
 * @author willalp
 * @date 2022-01-11
 */

@EqualsAndHashCode(callSuper = true)
@Data
@TableName("hs_app_home")
public class HsAppHome extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long appHomeId;

    /**
     * 首页id(表hs_app_home的父级列主键)
     */
    @Excel(name = "首页id(表hs_app_home的父级列主键)")
    private Long homeId;

    /**
     * 是否发布中
     */
    private int isIssue;

    /**
     * app首页名称
     */
    @Excel(name = "app首页名称")
    private String appHomeName;

    /**
     * 机构ID
     */
    @Excel(name = "机构ID")
    private String orgCode;

    /**
     * 是否删除（0.未删除；1.已删除）
     */
    private Integer isDelete;

    /**
     * 部门信息
     */
    @TableField(exist = false)
    private List<SysDept> sysDeptList;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("appHomeId", getAppHomeId())
                .append("homeId", getHomeId())
                .append("appHomeName", getAppHomeName())
                .append("orgCode", getOrgCode())
                .append("isDelete", getIsDelete())
                .append("sysDepList", getSysDeptList())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
