package cn.wisenergy.chnmuseum.party.model; import cn.wisenergy.chnmuseum.party.common.validator.groups.Add; import cn.wisenergy.chnmuseum.party.common.validator.groups.Update; import com.baomidou.mybatisplus.annotation.*; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.*; import lombok.experimental.Accessors; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.time.LocalDateTime; /** * <p> * 视频 * </p> * * @author Danny Lee * @since 2021-03-16 */ @Data @Builder @AllArgsConstructor @NoArgsConstructor @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) @TableName("asset") @ApiModel(value = "视频", description = "视频") public class Asset implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty("视频ID") @TableId(value = "id", type = IdType.ASSIGN_ID) @NotNull(message = "视频ID不能为空", groups = {Update.class}) private String id; @ApiModelProperty("视频名称") @TableField("name") @NotBlank(message = "视频名称不能为空", groups = {Add.class, Update.class}) private String name; @ApiModelProperty("视频缩略图") @TableField("thumbnail") @NotBlank(message = "视频缩略图不能为空", groups = {Add.class, Update.class}) private String thumbnail; @ApiModelProperty("视频类别ID") @TableField("asset_type_id") private String assetTypeId; @ApiModelProperty("视频版权方ID") @TableField("asset_copyright_owner_id") private String assetCopyrightOwnerId; @ApiModelProperty("下载链接") @TableField("video_url") @NotBlank(message = "下载链接不能为空", groups = {Add.class, Update.class}) private String videoUrl; @ApiModelProperty("新增审核状态") @TableField("audit_status_add") @NotBlank(message = "新增审核状态不能为空", groups = {Add.class, Update.class}) private String auditStatusAdd; @ApiModelProperty("修改审核状态") @TableField("audit_status_edit") private String auditStatusEdit; @ApiModelProperty("删除审核状态") @TableField("audit_status_delete") private String auditStatusDelete; @ApiModelProperty("创建日期") @TableField(value = "create_time", fill = FieldFill.INSERT) @NotNull(message = "创建日期不能为空", groups = {Add.class, Update.class}) private LocalDateTime createTime; @ApiModelProperty("修改日期") @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE) @NotNull(message = "修改日期不能为空", groups = {Add.class, Update.class}) private LocalDateTime updateTime; @ApiModelProperty("视频分类") @TableField(exist = false) private String assetTypeName; @ApiModelProperty("视频版权方名称") @TableField(exist = false) private String assetCopyrightOwnerName; }