package com.ai.da.mapper.primary.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * Attendance
 *
 * @author easy-generator
 * @since 2022-06-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_collection_element")
public class CollectionElement implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long accountId;
    /**
     * collectionId
     */
    private Long collectionId;

    private String type;

    /**
     * 一级类型
     */
    private String level1Type;

    /**
     * 二级类型
     */
    private String level2Type;

    /**
     * 三级类型 目前为线稿和模特标注性别
     */
    @TableField("level3_type")
    private String level3Type;

    /**
     * 元素名(如果是颜色board 存潘通id+潘通名字 形式 ""11_mds")
     */
    private String name;

    /**
     * 元素存放地址
     */
    private String url;
    /**
     * 是否pin 1pin 0 不pin
     */
    @TableField("is_pin")
    private Byte hasPin;
    /**
     * 颜色的rgb值 空格分割
     */
    private String colorRgb;
    /**
     * md5值
     */
    private String md5;

    private String gradientString;

    /**
     * 创建时间
     */
    private Date createDate;

    /**
     * 更新时间
     */
    private Date updateDate;

    private Long projectId;

    private Integer isCompositeImage;

    public CollectionElement() {
    }

    public CollectionElement(Long accountId, String level1Type, String level2Type, String name, String url, Byte hasPin, String md5, Date createDate, Long projectId) {
        this.accountId = accountId;
        this.level1Type = level1Type;
        this.level2Type = level2Type;
        this.name = name;
        this.url = url;
        this.hasPin = hasPin;
        this.md5 = md5;
        this.createDate = createDate;
        this.projectId = projectId;
    }
    public CollectionElement(Long accountId, String level1Type, String level2Type, String level3Type,String name, String url, Byte hasPin, String md5, Date createDate, Long projectId) {
        this.accountId = accountId;
        this.level1Type = level1Type;
        this.level2Type = level2Type;
        this.level3Type = level3Type;
        this.name = name;
        this.url = url;
        this.hasPin = hasPin;
        this.md5 = md5;
        this.createDate = createDate;
        this.projectId = projectId;
    }
}
