package com.ruoyi.common.core.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 仓库对象 t_warehouse
 *
 * @author ruoyi
 * @date 2021-01-07
 */
public class TWarehouse extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long fId;

    /**
     * 父部门ID
     */
    private Long parentId;

    /**
     * 祖级列表
     */
    private String ancestors;


    /**
     * 显示顺序
     */
    private String orderNum;


    /** 编号 */
    @Excel(name = "编号")
    private String fNo;

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

    /** 是否保税 */
    @Excel(name = "是否保税")
    private String fIsBonded;

    /** 地址 */
    @Excel(name = "地址")
    private String fAddr;

    /** 库容 */
    @Excel(name = "库容")
    private BigDecimal fTotalgross;

    /** 联系人 */
    @Excel(name = "联系人")
    private String fContacts;

    /** 电话 */
    @Excel(name = "电话")
    private String fTel;

    /** 是否计费 */
    @Excel(name = "是否计费：0 计费，1 不计费 ")
    private Long fCharg;

    /** 状态，默认 T ,正常T 停用F 下拉选择 */
    @Excel(name = "状态，默认 T ,正常T 停用F 下拉选择")
    private String fStatus;

    /** 删除状态 */
    private String delFlag;

    /** 仓库 */
    @Excel(name = "仓库")
    private Long fLocation;

    /** 仓库/库区/库位 */
    @Excel(name = "仓库/库区/库位")
    private String fWarehouseInformation;

    /**
     * 子部门
     */
    private List<TWarehouse> children = new ArrayList<TWarehouse>();

    /**
     * 是否有子孙节点
     */
    @TableField(exist = false)
    private Boolean hasChildren;

    public Boolean getHasChildren() {
        return hasChildren;
    }

    public void setHasChildren(Boolean hasChildren) {
        this.hasChildren = hasChildren;
    }

    public void setfId(Long fId)
    {
        this.fId = fId;
    }

    public Long getParentId() {
        return parentId;
    }

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

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }


    @NotBlank(message = "显示顺序不能为空")
    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getfIsBonded() {
        return fIsBonded;
    }

    public void setfIsBonded(String fIsBonded) {
        this.fIsBonded = fIsBonded;
    }

    public Long getfId()
    {
        return fId;
    }
    public void setfNo(String fNo)
    {
        this.fNo = fNo;
    }

    public String getfNo()
    {
        return fNo;
    }
    public void setfName(String fName)
    {
        this.fName = fName;
    }

    public String getfName()
    {
        return fName;
    }
    public void setfAddr(String fAddr)
    {
        this.fAddr = fAddr;
    }

    public String getfAddr()
    {
        return fAddr;
    }

    public BigDecimal getfTotalgross() {
        return fTotalgross;
    }

    public void setfTotalgross(BigDecimal fTotalgross) {
        this.fTotalgross = fTotalgross;
    }

    public void setfStatus(String fStatus)
    {
        this.fStatus = fStatus;
    }

    public String getfStatus()
    {
        return fStatus;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    public String getfContacts() {
        return fContacts;
    }

    public void setfContacts(String fContacts) {
        this.fContacts = fContacts;
    }

    public String getfTel() {
        return fTel;
    }

    public void setfTel(String fTel) {
        this.fTel = fTel;
    }

    public Long getfCharg() {
        return fCharg;
    }

    public void setfCharg(Long fCharg) {
        this.fCharg = fCharg;
    }

    public Long getfLocation() {
        return fLocation;
    }

    public void setfLocation(Long fLocation) {
        this.fLocation = fLocation;
    }

    public String getfWarehouseInformation() {
        return fWarehouseInformation;
    }

    public void setfWarehouseInformation(String fWarehouseInformation) {
        this.fWarehouseInformation = fWarehouseInformation;
    }

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

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

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("fId", getfId())
                .append("fNo", getfNo())
                .append("fName", getfName())
                .append("fAddr", getfAddr())
                .append("fTotalgross", getfTotalgross())
                .append("fContacts", getfContacts())
                .append("fTel", getfTel())
                .append("fCharg", getfCharg())
                .append("fStatus", getfStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}