package com.dy.pipIrrGlobal.pojoSe; import com.alibaba.fastjson2.annotation.JSONField; import com.alibaba.fastjson2.writer.ObjectWriterImplToString; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.dy.common.po.BaseEntity; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.Max; import jakarta.validation.constraints.Min; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Positive; import lombok.*; import org.hibernate.validator.constraints.Length; import java.util.Date; /** * @author ZhuBaoMin * @date 2024-01-30 15:45 * @LastEditTime 2024-01-30 15:45 * @Description 电子钱包退款实体 */ @TableName(value="se_refund", autoResultMap = true) @Data @Builder @ToString @NoArgsConstructor @AllArgsConstructor @Schema(name = "电子钱包退款实体") public class SeRefund implements BaseEntity { public static final long serialVersionUID = 202401301552004L; /** * 主键 */ @JSONField(serializeUsing= ObjectWriterImplToString.class) @TableId(type = IdType.INPUT) @Schema(description = "实体id", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long id; /** * 钱包ID */ @Schema(description = "钱包ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Long walletId; /** * 农户ID */ @Schema(description = "农户ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @NotNull(message = "农户ID不能为空") private Long clientId; /** * 钱包余额 */ @Schema(description = "钱包余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @Min(value = 0, message = "钱包余额不能小于0") @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) private Double money; /** * 退款金额 */ @Schema(description = "退款金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @Min(value = 0, message = "消退款金额不能小于0") //@NotNull(message = "退款金额不能为空") @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) private Double refundAmount; /** * 退款后余额 */ @Schema(description = "退款后余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @Min(value = 0, message = "退款后余额不能小于0") @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) private Double afterRefund; /** * 申请时间 */ @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Date applicationTime; /** * 退款状态;1-未退款,2-已退款 */ @Schema(description = "退款状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @Min(value = 1, message = "退款状态不能小于1") @Max(value = 2, message = "退款状态不能大于2") private Byte refundStatus; /** * 审核人 */ @Schema(description = "操作人ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @Positive(message = "操作人ID必须为大于0的整数") private Long auditor; /** * 审核时间 */ @Schema(description = "审核时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) private Date auditTime; /** * 审核备注 */ @Schema(description = "备注", requiredMode = Schema.RequiredMode.NOT_REQUIRED) @Length(message = "备注长度小于{max}字", min = 0, max = 200) private String remarks; }