package com.sptg.estate.api.vo;

import com.sptg.estate.api.entity.Bills;
import com.sptg.estate.api.entity.BillsItem;
import lombok.Data;

import java.util.List;
@Data
public class BillsVO extends Bills {

    /** ----------账单缴费项*/
    private List<BillsItem> itemList;

    public static final class BillsVOBuilder {
        private List<BillsItem> itemList;
        private Long id;
        private Long agencyId;
        private String agencyName;
        private Long residentialId;
        private String residentialName;
        private Long buildingId;
        private String buildingName;
        private Long unitId;
        private String unitName;
        private Long floorId;
        private String floorName;
        private Long roomId;
        private String roomName;
        private String billsDate;
        private Double totalFee;
        private Integer status;
        private Long payId;
        private String orgPosition;

        public BillsVOBuilder() {
        }

        public static BillsVOBuilder aBillsVO() {
            return new BillsVOBuilder();
        }

        public BillsVOBuilder withItemList(List<BillsItem> itemList) {
            this.itemList = itemList;
            return this;
        }

        public BillsVOBuilder withId(Long id) {
            this.id = id;
            return this;
        }

        public BillsVOBuilder withAgencyId(Long agencyId) {
            this.agencyId = agencyId;
            return this;
        }

        public BillsVOBuilder withAgencyName(String agencyName) {
            this.agencyName = agencyName;
            return this;
        }

        public BillsVOBuilder withResidentialId(Long residentialId) {
            this.residentialId = residentialId;
            return this;
        }

        public BillsVOBuilder withResidentialName(String residentialName) {
            this.residentialName = residentialName;
            return this;
        }

        public BillsVOBuilder withBuildingId(Long buildingId) {
            this.buildingId = buildingId;
            return this;
        }

        public BillsVOBuilder withBuildingName(String buildingName) {
            this.buildingName = buildingName;
            return this;
        }

        public BillsVOBuilder withUnitId(Long unitId) {
            this.unitId = unitId;
            return this;
        }

        public BillsVOBuilder withUnitName(String unitName) {
            this.unitName = unitName;
            return this;
        }

        public BillsVOBuilder withFloorId(Long floorId) {
            this.floorId = floorId;
            return this;
        }

        public BillsVOBuilder withFloorName(String floorName) {
            this.floorName = floorName;
            return this;
        }

        public BillsVOBuilder withRoomId(Long roomId) {
            this.roomId = roomId;
            return this;
        }

        public BillsVOBuilder withRoomName(String roomName) {
            this.roomName = roomName;
            return this;
        }

        public BillsVOBuilder withBillsDate(String billsDate) {
            this.billsDate = billsDate;
            return this;
        }

        public BillsVOBuilder withTotalFee(Double totalFee) {
            this.totalFee = totalFee;
            return this;
        }

        public BillsVOBuilder withStatus(Integer status) {
            this.status = status;
            return this;
        }

        public BillsVOBuilder withPayId(Long payId) {
            this.payId = payId;
            return this;
        }

//        public BillsVOBuilder withOrgPosition(String orgPosition) {
//            this.orgPosition = orgPosition;
//            return this;
//        }

        public BillsVO build() {
            BillsVO billsVO = new BillsVO();
            billsVO.setId(id);
            billsVO.setAgencyId(agencyId);
            billsVO.setAgencyName(agencyName);
            billsVO.setResidentialId(residentialId);
            billsVO.setResidentialName(residentialName);
            billsVO.setBuildingId(buildingId);
            billsVO.setBuildingName(buildingName);
            billsVO.setUnitId(unitId);
            billsVO.setUnitName(unitName);
            billsVO.setFloorId(floorId);
            billsVO.setFloorName(floorName);
            billsVO.setRoomId(roomId);
            billsVO.setRoomName(roomName);
            billsVO.setBillsDate(billsDate);
            billsVO.setTotalFee(totalFee);
            billsVO.setStatus(status);
            billsVO.setPayId(payId);
//            billsVO.setOrgPosition(orgPosition);
            billsVO.itemList = this.itemList;
            return billsVO;
        }
    }
}
