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.Data;
import lombok.NoArgsConstructor;

/**
 * 店铺消息推送设置 实体类。
 *
 * @author zs
 * @since 2025-03-07
 */
@Data

@NoArgsConstructor
@AllArgsConstructor
@Table("tb_shop_msg_state")
public class ShopMsgState implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

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

    /**
     * 类型 -1 所有消息 0库存预警 1 耗材预警 2 操作预警 
     */
    private Integer type;

    /**
     * 0关闭推送 1开启推送
     */
    private Integer state;

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

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

}
