package com.ruoyi.frequency.collect.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.utils.SnowIdUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 收藏对象 t_collect
 *
 * @author zj
 * @date 2023-10-16
 */
@Data
@Accessors(chain = true)
@TableName("t_collect")
public class Collect extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("删除标志 1正常 2删除 3 禁用")
    private Integer delFlag;

    @ApiModelProperty("用户id")
    @Excel(name = "用户id")
    private Long userId;

    @ApiModelProperty("收藏类型 1作品 2 动态 ")
    @Excel(name = "收藏类型 1作品 2 动态 ")
    private Integer type;

    @ApiModelProperty("收藏品id（作品id,动态id）")
    @Excel(name = "收藏品id", readConverterExp = "作=品id,动态id")
    private Long objectId;

    @ApiModelProperty("用户角色 1 设计师 2 表现师")
    @Excel(name = "用户角色 1 设计师 2 表现师")
    private Integer userType;

    public Collect() {
    }

    public Collect(Integer type, Long objectId) {
        this.id = SnowIdUtils.uniqueLong();
        this.type = type;
        this.objectId = objectId;
    }
}
