mcwl-ai/mcwl-pay/src/main/java/com/mcwl/pay/domain/OrderTrade.java

95 lines
2.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.mcwl.pay.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mcwl.common.core.domain.BaseEntity;
import com.mcwl.common.interfaces.MaxMoney;
import com.mcwl.common.interfaces.MinMoney;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @AuthorChenYan
* @ProjectMcWl
* @Packagecom.mcwl.pay.domain
* @FilenameOrderTrade
* @Description TODO
* @Date2025/1/3 14:15
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName("order_trade")
public class OrderTrade extends BaseEntity {
/**
* ID
*/
@TableId
private Long id;
/**
* 订单编码
*/
private String code;
/**
* 用户ID
*/
private Long userId;
/**
* 商品ID
*/
private Integer productId;
/**
* 商品名称
*/
private String productName;
/**
* 用户名称
*/
private String userName;
/**
* 支付方式第三方支付平台返回的交易流水号
*/
private String paymentMethod;
/**
* 支付方式
*/
private Integer transactionId;
/**
* 下单时间
*/
@JsonFormat(pattern = "yyyy-mm-dd")
@DateTimeFormat(pattern = "yyyy-mm-dd")
private Date orderTime;
/**
* 订单状态 1:下单 2:支付 3完成 4取消
*/
@NotNull(message = "状态不能为空")
private Integer orderStatus;
/**
* 支付状态 1:待支付 2:已支付 3退款
*/
@NotNull(message = "状态不能为空")
private Integer payStatus;
/**
* 总金额
*/
@NotNull(message = "总金额不能为空")
@MinMoney(value = 0, message = "总金额不能小于0")
@MaxMoney(value = 100000, message = "总金额必须小于100000")
private Integer totalAmount;
/**
* 付款金额
*/
@NotNull(message = "付款金额不能为空")
@MinMoney(value = 0, message = "付款金额不能小于0")
@MaxMoney(value = 100000, message = "付款金额必须小于100000")
private Integer paymentAmount;
}