package com.jsowell.pile.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jsowell.common.annotation.Excel;
import com.jsowell.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

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

/**
 * 计费模板对象 pile_billing_template
 *
 * @author jsowell
 * @date 2022-09-20
 */
@Data
public class PileBillingTemplate extends BaseEntity {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	private Long id;

	/**
	 * 计费模板编号
	 */
	private String templateCode;

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

	/**
	 * 车辆类型（1-电动汽车；2-电动自行车）
	 */
	@Excel(name = "车辆类型", readConverterExp = "1=-电动汽车；2-电动自行车")
	private String type;

	/**
	 * 充电站id
	 */
	@Excel(name = "充电站id")
	private Long stationId;

	/**
	 * 删除标识（0-正常；1-删除）
	 */
	private String delFlag;

	/**
	 * 计费模板详情信息
	 */
	private List<PileBillingDetail> pileBillingDetailList;

	/**
	 * 公共模板标识（0-私有；1-公共）
	 */
	private String publicFlag;

	/**
	 * 发布时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date publishTime;

	public String getPublicFlag() {
		return publicFlag;
	}

	public void setPublicFlag(String publicFlag) {
		this.publicFlag = publicFlag;
	}

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

	public Long getId() {
		return id;
	}

	public void setTemplateCode(String templateCode) {
		this.templateCode = templateCode;
	}

	public String getTemplateCode() {
		return templateCode;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getType() {
		return type;
	}

	public void setStationId(Long stationId) {
		this.stationId = stationId;
	}

	public Long getStationId() {
		return stationId;
	}

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

	public String getDelFlag() {
		return delFlag;
	}

	public List<PileBillingDetail> getPileBillingDetailList() {
		return pileBillingDetailList;
	}

	public void setPileBillingDetailList(List<PileBillingDetail> pileBillingDetailList) {
		this.pileBillingDetailList = pileBillingDetailList;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.JSON_STYLE)
				.append("id", getId())
				.append("templateCode", getTemplateCode())
				.append("name", getName())
				.append("remark", getRemark())
				.append("type", getType())
				.append("stationId", getStationId())
				.append("createBy", getCreateBy())
				.append("createTime", getCreateTime())
				.append("updateBy", getUpdateBy())
				.append("updateTime", getUpdateTime())
				.append("delFlag", getDelFlag())
				.append("pileBillingDetailList", getPileBillingDetailList())
				.append("publicFlag", getPublicFlag())
				.toString();
	}
}
