package com.github.wxiaoqi.security.admin.vo;

import com.github.wxiaoqi.security.admin.constant.enumerate.CompanyWalletITypeEnum;
import com.github.wxiaoqi.security.admin.entity.CompanyWalletDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class CompanyWalletDetailVo extends CompanyWalletDetail {

	@ApiModelProperty("门店名称")
	private String companyName;


	@ApiModelProperty("企业名称")
	private String branchName;


	@ApiModelProperty("类型说明")
	private String sourceName;


	@ApiModelProperty("类型")
	private String typeName;

	@ApiModelProperty("显示时间")
	private Long showTime;


	public  String getSourceName(){
		if (getItype() == null)
			return "";
		return CompanyWalletITypeEnum.get(getItype()).getDesc();
	}


	public  String getTypeName(){
		if (getItype() == null)
			return "";
		return getType() == 1 ? "收入":"支出";
	}


}
