package com.cyksj.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Data;

import java.io.Serializable;

/**
 * @author chan
 * @date 2024/6/21 14:57
 */
@Data
@SearchBean(tables = "mirror_notice mn")
public class MirrorNotice extends BaseEntity implements Serializable {

    /**
     * 平台 MJ GPT
     */
    private String platform;

    /**
     * 标题
     */
    private String title;

    /**
     * 富文本
     */
    private String text;

    /**
     * 状态
     */
    private Boolean status;

    @TableField(exist = false)
    @DbField("select count(1) from mirror_notice_user_review_record myr where myr.notice_id = mn.id :ruid:")
    private Boolean isRead;

    @TableField(exist = false)
    @DbField("select count(1) from mirror_notice_user myr where myr.notice_id = mn.id :ruid:")
    private Boolean sync;
}
