package com.dcsoft.system.vehicle.domain;

import com.dcsoft.common.core.annotation.Excel;
import com.dcsoft.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

/**
 * 车场信息对象 car_park
 *
 * @author nichun
 * @date 2023-12-27
 */
public class CarPark extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

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

    /** 所属空间 */
    @Excel(name = "所属空间")
    private Long spaceId;

    private String spaceName;

    /** 上级车场（一并下发车场）*/
    private Long parentId;

    /** 上级车场（一并下发车场）*/
    private String parentIdName;

    /** 满车位自动锁杆：0：不锁，1：锁 */
    private Integer autoLock;

    /** 车位总数 */
    @Excel(name = "车位总数")
    private Long carsNum;

    /** 余位数 */
    @Excel(name = "余位数")
    private Long surplusNum;

    private List<CarParkItem> itemList = new ArrayList<CarParkItem>();

    public String getParentIdName() {
        return parentIdName;
    }

    public void setParentIdName(String parentIdName) {
        this.parentIdName = parentIdName;
    }

    public Long getParentId() {
        return parentId;
    }

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

    public Integer getAutoLock() {
        return autoLock;
    }

    public void setAutoLock(Integer autoLock) {
        this.autoLock = autoLock;
    }

    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 setSpaceId(Long spaceId)
    {
        this.spaceId = spaceId;
    }

    public Long getSpaceId()
    {
        return spaceId;
    }
    public void setCarsNum(Long carsNum)
    {
        this.carsNum = carsNum;
    }

    public Long getCarsNum()
    {
        return carsNum;
    }
    public void setSurplusNum(Long surplusNum)
    {
        this.surplusNum = surplusNum;
    }

    public Long getSurplusNum()
    {
        return surplusNum;
    }

    public List<CarParkItem> getItemList() {
        return itemList;
    }

    public void setItemList(List<CarParkItem> itemList) {
        this.itemList = itemList;
    }

    public String getSpaceName() {
        return spaceName;
    }

    public void setSpaceName(String spaceName) {
        this.spaceName = spaceName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("spaceId", getSpaceId())
            .append("carsNum", getCarsNum())
            .append("surplusNum", getSurplusNum())
            .append("remark", getRemark())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
