package com.ruoyi.framework.recovery.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;

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

/**
 * 回收品牌对象 rec_brand
 *
 * @author jin
 * @date 2024-11-16
 */
@Schema(description = "用户实体")
public class RecBrand extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 回收品牌id */
    @Schema(title = "回收品牌id")
    private Long id;

    /** 品牌名称 */
    @Excel(name = "品牌名称")
    @Schema(title = "品牌名称")
    private String brand;

    /**
     * 父类id
     */
    @Schema(title = "父类id")
    @Excel(name = "父类id")
    private Long parentId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(title = "创建时间")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Schema(title = "更新时间")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updateDate;

    /**
     * 子节点
     */
    @Schema(title = "子节点")
    private List<RecBrand> children = new ArrayList<RecBrand>();

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

    public Long getId()
    {
        return id;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }

    public String getBrand()
    {
        return brand;
    }
    public void setCreateDate(Date createDate)
    {
        this.createDate = createDate;
    }

    public Date getCreateDate()
    {
        return createDate;
    }
    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public Date getUdateDate()
    {
        return updateDate;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public List<RecBrand> getChildren() {
        return children;
    }

    public void setChildren(List<RecBrand> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("RecBrand{");
        sb.append("id=").append(id);
        sb.append(", brand='").append(brand).append('\'');
        sb.append(", parentId=").append(parentId);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", children=").append(children);
        sb.append('}');
        return sb.toString();
    }
}
