/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.ldt.bills.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springblade.common.enums.CsFlag;
import org.springblade.core.mp.base.BaseEntity;
import java.time.LocalDateTime;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.core.tenant.mp.TenantEntity;

/**
 * 实体类
 *
 * @author BladeX
 * @since 2021-09-23
 */
@Data
@TableName("ldt_bills")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Bills对象", description = "Bills对象")
public class Bills extends TenantEntity {

	private static final long serialVersionUID = 1L;

	/**
	* 付款方
	*/
		@ApiModelProperty(value = "付款方")
		private Long payId;
	/**
	* 收款方
	*/
		@ApiModelProperty(value = "收款方")
		private Long receiveId;
	/**
	* 商场id
	*/
		@ApiModelProperty(value = "商场id")
		private Long mallId;
	/**
	* 金额原价
	*/
		@ApiModelProperty(value = "金额原价")
		private BigDecimal cost;
	/**
	* 折扣
	*/
		@ApiModelProperty(value = "折扣")
		private BigDecimal discount;
	/**
	* 实付金额
	*/
		@ApiModelProperty(value = "实付金额")
		private BigDecimal price;
	/**
	* 交易类型（用户付款，代理充值，商场充值）
	*/
		@ApiModelProperty(value = "交易类型（用户付款，代理充值，商场充值）")
		private String type;
	/**
	* 付款方式
	*/
		@ApiModelProperty(value = "付款场景")
		private String payScene;
	/**
	* 付款插件
	*/
		@ApiModelProperty(value = "付款插件")
		private String payPlugin;
	/**
	* 渠道积分id
	*/
		@ApiModelProperty(value = "渠道积分id")
		private String channelId;
	/**
	* 待付款，付款成功，取消付款
	*/
		@ApiModelProperty(value = "待付款，付款成功，取消付款")
		private String payStatus;
	/**
	* 订单标题
	*/
		@ApiModelProperty(value = "订单标题")
		private String title;
	/**
	* 订单描述
	*/
		@ApiModelProperty(value = "订单描述")
		private String billDesc;
	/**
	* 订单超时时间
	*/
		@ApiModelProperty(value = "订单超时时间")
		private LocalDateTime exTime;
	/**
	* appid
	*/
		@ApiModelProperty(value = "appid")
		private String appid;
	/**
	* openid
	*/
		@ApiModelProperty(value = "openid")
		private String openid;
	/**
	* 消耗积分
	*/
		@ApiModelProperty(value = "消耗积分")
		private BigDecimal pointNum;
	/**
	* 消耗余额
	*/
		@ApiModelProperty(value = "消耗余额")
		private BigDecimal balanceNum;
	/**
	* 第三方平台订单号
	*/
		@ApiModelProperty(value = "第三方平台订单号")
		private String thirdOrderId;
	/**
	* 收取的服务费
	*/
		@ApiModelProperty(value = "收取的服务费")
		private BigDecimal fee;
	/**
	* 积分交易费
	*/
		@ApiModelProperty(value = "积分交易费")
		private BigDecimal pointFee;
	/**
	* 交易总价格（交易金额+交易手续费+积分交易费）
	*/
		@ApiModelProperty(value = "交易总价格（交易金额+交易手续费+积分交易费）")
		private BigDecimal totalPrice;
	/**
	 * 商户手续费
	 */
	@ApiModelProperty(value = "商户手续费")
		private BigDecimal merchantFee;
	/**
	 * 实际到账金额
	 */
	@ApiModelProperty(value = "实际到账金额(易宝)")
	private BigDecimal receiveNumYp;

	/**
	 * 实际到账金额
	 */
	@ApiModelProperty(value = "总实际到账金额")
	private BigDecimal receiveNumTotal;

	/**
	 * 支付方式
	 */
	@ApiModelProperty(value = "支付方式")
	private String payWay;


	/**
	 * 实际到账
	 * 涉及现金支付就取receiveNumTotald的值，
	 * 不涉及到现金支付就取cost的值
	 */
	@ApiModelProperty(value = "实际到账")
	private BigDecimal actualIncome;


	private CsFlag csFlag;
}
