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 jakarta.validation.constraints.*;

/**
 * 优惠劵表单对象
 *
 * @author zsElectric
 * @since 2025-12-19 09:58
 */
@Getter
@Setter
@Schema(description = "优惠劵表单对象")
public class CouponForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "优惠劵模板编号")
    private Long templateId;

    @Schema(description = "优惠劵名")
    @Size(max=50, message="优惠劵名长度不能超过50个字符")
    private String name;

    @Schema(description = "优惠券编码")
    @Size(max=64, message="优惠券编码长度不能超过64个字符")
    private String couponCode;

    @Schema(description = "优惠码状态1-未使用 2-已使用 3-已过期")
    private Integer status;

    @Schema(description = "优惠劵描述")
    @Size(max=512, message="优惠劵描述长度不能超过512个字符")
    private String description;

    @Schema(description = "用户编号")
    private Long userId;

    @Schema(description = "领取类型(1-用户领取 2-后台发放)")
    private Integer takeType;

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

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

    @Schema(description = "使用订单号")
    private Long useOrderId;

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

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

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

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

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

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


}
