package com.ruoyi.info.service.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 服务分类业务对象 tb_service_categorize
 *
 * @author ruoyi
 * @date 2025-09-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("服务分类业务对象")
public class ServiceCategorizeBo extends BaseEntity {

    /**
     * ID
     */
    @ApiModelProperty(value = "ID", required = true)
    private Long id;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称", required = true)
    @NotBlank(message = "分类名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 排序号
     */
    @ApiModelProperty(value = "排序号", required = true)
    @NotNull(message = "排序号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer sort;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态", required = true)
    @NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Boolean status;

    /**
     * 开始日期(查询用)
     */
    @ApiModelProperty(value = "开始日期(查询用)", required = true)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束日期(查询用)
     */
    @ApiModelProperty(value = "结束日期(查询用)", required = true)
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;
}
