package org.jeecg.modules.system.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 店铺资金明细
 * @Author: jeecg-boot
 * @Date:   2025-08-18
 * @Version: V1.0
 */
@Data
@TableName("nm_receipt_payment_details_info")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="店铺资金明细")
public class ReceiptPaymentDetailsInfo implements Serializable {
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "id")
    private String id;
	/**机构编码*/
	@Excel(name = "机构编码", width = 15)
    @Schema(description = "机构编码")
    private String orgCode;
	/**部门id*/
	@Excel(name = "部门id", width = 15)
    @Schema(description = "部门id")
    private String deptId;
	/**收支类型 0-收入 1-支出*/
	@Excel(name = "收支类型 0-收入 1-支出", width = 15)
    @Schema(description = "收支类型 0-收入 1-支出")
    private Integer payType;
	/**订单编号*/
	@Excel(name = "订单编号", width = 15)
    @Schema(description = "订单编号")
    private String orderId;
	/**变更前金额*/
	@Excel(name = "变更前金额", width = 15)
    @Schema(description = "变更前金额")
    private BigDecimal beforeMoney;
	/**变更后金额*/
	@Excel(name = "变更后金额", width = 15)
    @Schema(description = "变更后金额")
    private BigDecimal afterMoney;
	/**变化金额*/
	@Excel(name = "变化金额", width = 15)
    @Schema(description = "变化金额")
    @NotNull(message = "总金额不能为空")
    @DecimalMin(value = "0.00", message = "总金额不能小于0")
    @Digits(integer = 10, fraction = 2, message = "总金额必须精确到小数点后2位")
    private BigDecimal changeMoney;
	/**资金变化原因 0-用户支付，1-用户退款，2-分账，3-银行卡到账*/
	@Excel(name = "资金变化原因 0-用户支付，1-用户退款，2-分账，3-银行卡到账", width = 15)
    @Schema(description = "资金变化原因 0-用户支付，1-用户退款，2-分账，3-银行卡到账")
    private Integer purseChangeReason;
    /**金额类型 0-待结算，1-可用余额，2-已到账*/
    @Excel(name = "金额类型 0-待结算，1-可用余额，2-已到账", width = 15)
    @Schema(description = "金额类型 0-待结算，1-可用余额，2-已到账")
    private Integer moneyType;
	/**创建时间;创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间;创建时间")
    private Date createTime;
	/**更新时间;更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间;更新时间")
    private Date updateTime;
}
