package org.dromara.domain.bo;

import org.dromara.domain.SenEventsMedia;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;

/**
 * 事件媒介
业务对象 sen_events_media
 *
 * @author luogang
 * @date 2024-09-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SenEventsMedia.class, reverseConvertGenerate = false)
public class SenEventsMediaBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 事件id
     */
    @NotNull(message = "事件id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long eventId;

    /**
     * 媒介文件类型（1-图片、2-视频）
     */
    @NotBlank(message = "媒介文件类型（1-图片、2-视频）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String mediaType;

    /**
     * 文件名称
     */
    @NotBlank(message = "文件名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fileName;

    /**
     * 文件存储路径
     */
    @NotBlank(message = "文件存储路径不能为空", groups = { AddGroup.class, EditGroup.class })
    private String filePath;

    /**
     * 如果是视频，记录视频的时长
     */
    @NotNull(message = "如果是视频，记录视频的时长不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date duration;


}
