package org.springblade.material.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 素材表
 * </p>
 *
 * @author zbc
 * @since 2022-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class BladeMaterial implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
	@ApiModelProperty(value = "主键ID")
    private Long id;

	@ApiModelProperty(value = "素材名称")
	@NotBlank(message = "素材名称不能为空")
    private String materialName;

	@ApiModelProperty(value = "原素材名称")
    private String originalName;

	@ApiModelProperty(value = "分类ID")
	@NotNull(message = "分类ID不能为空")
    private Long categoryId;

	@ApiModelProperty(value = "素材路径")
	@NotBlank(message = "素材路径不能为空")
    private String path;

	@ApiModelProperty(value = "创建人")
    private Long createUser;

	@ApiModelProperty(value = "创建时间")
    private Date createTime;

	@ApiModelProperty(value = "Base64")
	@TableField(exist = false)
	private String Base64Str;

	@ApiModelProperty(value = "租户ID")
	private String tenantId;
}
