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 wzq
 * @since 2025-11-26 15:57
 */
@Getter
@Setter
@Schema(description = "广告管理表单对象")
public class AdvertisingForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    @Schema(description = "标题")
    @NotBlank(message = "标题不能为空")
    @Size(max=50, message="标题长度不能超过50个字符")
    private String name;

    @Schema(description = "状态 (0-禁用 1-启用)")
    @NotNull(message = "状态 (0-禁用 1-启用)不能为空")
    private Integer status;

    @Schema(description = "排序")
    @NotNull(message = "排序不能为空")
    private Integer sort;

    @Schema(description = "广告位置  1.首页弹框")
    private Integer position;

    @Schema(description = "图片")
    @Size(max=255, message="图片长度不能超过255个字符")
    private String picture;

    @Schema(description = "跳转路径")
    @Size(max=255, message="跳转路径长度不能超过255个字符")
    private String skipUrl;

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

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

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

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

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


}
