package com.zsElectric.boot.business.model.form;

import java.io.Serial;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;

import jakarta.validation.constraints.*;

/**
 * 优惠活动表单对象
 *
 * @author zsElectric
 * @since 2025-12-20 16:16
 */
@Getter
@Setter
@Schema(description = "优惠活动表单对象")
public class DiscountsActivityForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    private Long id;

    @Schema(description = "活动名称")
    @Size(max = 64, message = "活动名称长度不能超过64个字符")
    private String name;

    @Schema(description = "优惠类型 1-新用户首单立减 2-活动折扣")
    private Integer type;

    @Schema(description = "优惠金额/折扣")
    private BigDecimal discount;

    @Schema(description = "活动描述")
    @Size(max = 255, message = "活动描述长度不能超过255个字符")
    private String activityDesc;

    @Schema(description = "状态 0-未启用 1-启用")
    private Integer status;

    @Schema(description = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "创建人")
    private Long createBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "更新人")
    private Long updateBy;

    @Schema(description = "逻辑删除（0-未删除 1-已删除）")
    private Integer isDeleted;


}
