package org.jeecg.modules.system.app.dto.receiptPaymentDetails;

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.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 店铺资金明细
 * @Author: jeecg-boot
 * @Date:   2025-08-18
 * @Version: V1.0
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="店铺资金明细添加vo")
public class ReceiptPaymentDetailsInfoVo {

	/**机构编码*/
    @Schema(description = "机构编码")
    @NotBlank(message = "机构编码不能为空")
    @Size(min = 27, max = 27, message = "充电订单号长度必须为27字符")
    private String orgCode;
	/**部门id*/
    @Schema(description = "部门id")
    @Size( max = 32, message = "充电订单号长度最大值为32")
    private String deptId;
	/**收支类型 0-收入 1-支出*/
    @Schema(description = "收支类型 0-收入 1-支出")
    @NotNull(message = "收支类型不能为空")
    @Min(value = 0, message = "收支类型最小值为0")
    @Max(value = 1, message = "收支类型最大值为1")
    private Integer payType;

    /**部门类型 0-平台 1-商户 2-门店*/
    @Schema(description = "部门类型 0-平台 1-商户 2-门店")
    @NotNull(message = "部门类型不能为空")
    @Min(value = 0, message = "部门类型最小值为0")
    @Max(value = 2, message = "部门类型最大值为2")
    private Integer deptType;
	/**订单编号*/
    @Schema(description = "订单编号")
    @Size( max = 32, message = "充电订单号长度最大值为32")
    private String orderId;
    /**变化金额*/
    @Schema(description = "总金额")
    @NotNull(message = "总金额不能为空")
    @DecimalMin(value = "0.00", message = "总金额不能小于0")
    @Digits(integer = 10, fraction = 2, message = "总金额必须精确到小数点后2位")
    private BigDecimal money;
	/**变化金额*/
    @Schema(description = "变化金额")
    @NotNull(message = "变化金额不能为空")
    @DecimalMin(value = "0.00", message = "变化金额不能小于0")
    @Digits(integer = 10, fraction = 2, message = "变化金额必须精确到小数点后2位")
    private BigDecimal changeMoney;
	/**资金变化原因 0-用户支付，1-用户退款，2-分账，3-银行卡到账*/
    @Schema(description = "资金变化原因 0-用户支付，1-用户退款，2-分账，3-银行卡到账")
    @Min(value = 0, message = "资金变化原因最小值为0")
    @Max(value = 3, message = "资金变化原因最大值为3")
    private Integer purseChangeReason;
	/**创建时间;创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间;创建时间")
    private Date createTime=new Date();
	/**更新时间;更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新时间;更新时间")
    private Date updateTime =new Date();
}
