package cn.com.ctop.common.module.entity;

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

import java.util.Date;

/**
 * 素材标签信息
 * @author jeecg-boot
 * @date   2020-08-27
 * @version V1.0
 */
@Data
@TableName("ctop_material_tag_info")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ctop_material_tag_info对象", description="素材标签信息")
public class MaterialTagInfo {

	/**id*/
	@TableId(type = IdType.AUTO)
    private Long id;
	private String code;
	private Integer status;
	private String tagName;
	private String tagCode;
	private Long categoryId;
	private Long tagId;
	private String userId;
	private Date createTime;
	private Date updateTime;

	public MaterialTagInfo(String code, TagInfo tagInfo,String userId) {
		this.tagId = tagInfo.getId();
		this.code = code;
		this.status = 1;
		this.tagCode = tagInfo.getTagCode();
		this.tagName = tagInfo.getTagName();
		this.userId = userId;
		this.createTime = new Date();
		this.updateTime = new Date();
	}

	public MaterialTagInfo() {

	}
}
