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;
import lombok.experimental.Accessors;

/**
 *  实体类。
 *
 * @author gyj
 * @since 2025-12-09
 */
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Table("ac_user_msg")
public class AcUserMsg implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 用户 Id
     */
    private Long userId;

    /**
     * 店铺 Id
     */
    private Long shopId;

    /**
     * 来源 Id；如订单 Id
     */
    private Long sourceId;

    /**
     * 来源类型：order 订单
     */
    private String sourceType;

    /**
     * 消息类型：cash 现金，points 积分
     */
    private String type;

    /**
     * 消息读取状态：0 未读，1 已读
     */
    private Integer readStatus;

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

    /**
     * 消息内容
     */
    private String content;

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

}
