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

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@TableName("t_notification")
@Data
public class Notification extends BaseEntity{
    /**
     * 操作类型 system/like/comment/follow
     */
    private String type;
    /**
     * 发起操作者用户id
     */
    private Long senderId;
    /**
     * 被操作对象用户id
     */
    private Long receiverId;
    /**
     * 点赞评论时的作品id
     */
    private Long portfolioId;
    /**
     * 消息内容
     */
    private String content;
    /**
     * 评论id
     */
    private Long commentId;
    /**
     * 个人消息已读状态
     */
    private Integer isRead;
    /**
     * 系统消息发布状态
     */
    private Integer publishFlag;

    /**
     * 是否被删除
     */
    private Integer isDeleted;

    public Notification() {
    }

    public Notification(String type, Long senderId, Long receiverId) {
        this.type = type;
        this.senderId = senderId;
        this.receiverId = receiverId;
    }

    public Notification(String type, Long senderId, Long receiverId, Long portfolioId) {
        this.type = type;
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.portfolioId = portfolioId;
    }

    public Notification(String type, Long senderId, Long receiverId, Long portfolioId, String content, Long commentId) {
        this.type = type;
        this.senderId = senderId;
        this.receiverId = receiverId;
        this.portfolioId = portfolioId;
        this.content = content;
        this.commentId = commentId;
    }
}
