package com.willalp.canteen.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.willalp.common.annotation.Excel;
import com.willalp.common.core.domain.TreeEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 礼品类型对象 hs_gift_type
 *
 * @author willalp
 * @date 2022-12-19
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HsGiftType extends TreeEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId
    private String id;
    /** 礼品类型编号 */
    @Excel(name = "礼品类型编号")
    private String giftTypeNo;
    /** 礼品类型名称 */
    @Excel(name = "礼品类型名称")
    private String giftTypeName;

    private int orderNum;
    /** 是否删除（0.未删除；1.已删除） */
    private Integer isDelete;
    /** 子部门 */
    @TableField(exist = false)
    private List<?> children = new ArrayList<>();

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("giftTypeNo", getGiftTypeNo())
            .append("giftTypeName", getGiftTypeName())
            .append("parentId", getParentId())
            .append("orderNum", getOrderNum())
            .append("isDelete", getIsDelete())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
        .toString();
    }
}
