New file |
| | |
| | | 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.Min; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | | * @date 2024-01-30 15:44 |
| | | * @LastEditTime 2024-01-30 15:44 |
| | | * @Description 电子钱包消费实体 |
| | | */ |
| | | |
| | | @TableName(value="se_consume", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "电子钱包消费实体") |
| | | public class SeConsume implements BaseEntity { |
| | | public static final long serialVersionUID = 202401301552003L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @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) |
| | | //@NotNull(message = "钱包ID不能为空") |
| | | 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 consumption; |
| | | |
| | | /** |
| | | * 消费后余额 |
| | | */ |
| | | @Schema(description = "消费后余额", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message = "消费后余额不能小于0") |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double afterConsume; |
| | | |
| | | /** |
| | | * 用水时长 |
| | | */ |
| | | @Schema(description = "用水时长", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Min(value = 0, message = "用水时长不能小于0") |
| | | @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT, pattern="0.00" ) |
| | | private Double duration; |
| | | |
| | | /** |
| | | * 开阀时间 |
| | | */ |
| | | @Schema(description = "开阀时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "开阀时间不能为空") |
| | | private Date vot; |
| | | |
| | | /** |
| | | * 关阀时间 |
| | | */ |
| | | @Schema(description = "关阀时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @NotNull(message = "关阀时间不能为空") |
| | | private Date vct; |
| | | } |