New file |
| | |
| | | package cn.lili.modules.lmk.domain.form; |
| | | |
| | | import cn.lili.group.Update; |
| | | import cn.lili.group.Add; |
| | | import cn.lili.base.AbsForm; |
| | | import cn.lili.modules.lmk.domain.entity.StoreCoupon; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 店铺优惠卷对应关系表单 |
| | | * |
| | | * @author peng |
| | | * @since 2025-09-25 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "StoreCoupon表单", description = "店铺优惠卷对应关系表单") |
| | | public class StoreCouponForm extends AbsForm { |
| | | |
| | | @NotNull(message = "店铺id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("店铺id") |
| | | private Long storeId; |
| | | |
| | | @NotNull(message = "店铺名称不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("店铺名称") |
| | | private String storeName; |
| | | |
| | | @NotNull(message = "优惠卷id不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("优惠卷id") |
| | | private String couponId; |
| | | |
| | | @NotBlank(message = "优惠卷名称不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("优惠卷名称") |
| | | private String couponName; |
| | | |
| | | @NotBlank(message = "生成优惠卷数量不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("生成优惠卷数量") |
| | | private Integer couponNum; |
| | | |
| | | |
| | | |
| | | public static StoreCoupon getEntityByForm(@NonNull StoreCouponForm form, StoreCoupon entity) { |
| | | if(entity == null) { |
| | | entity = new StoreCoupon(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |