package com.czg.account.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author zs
 * @since 2025-04-07
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_sync_notice")
public class SyncNotice implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 操作用户id
     */
    private Long sysUserId;


    /**
     * 是否已读，1已读
     */
    private Integer isRead;

    /**
     * 店铺id
     */
    private Long shopId;
    /**
     * 标题  数据同步/数据变动/库存预警
     */
    private String title;
    /**
     * 消息内容
     * {
     * 	"title": "XX同步/变动",//商品 单位 规格 分组 耗材 耗材分组
     * 	"number": "XX个",
     * 	"map": [
     * 		        {
     * 			"id": 1,
     * 			"name": ""
     *        }
     * 	]
     * }
     * {
     * 	"title": "XX库存不足" //商品/耗材
     * }
     */
    private String content;

    private String extraJson;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
    private LocalDateTime readTime;

}
