package com.gxwebsoft.cms.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 留言咨询
 *
 * @author WorkBuddy
 * @since 2026-07-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("cms_message")
@Schema(name = "CmsMessage对象", description = "留言咨询")
public class CmsMessage implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "留言ID")
    @TableId(value = "message_id", type = IdType.AUTO)
    private Integer messageId;

    @Schema(description = "联系人姓名")
    private String name;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "公司名称")
    private String company;

    @Schema(description = "类型: 1产品咨询 2意见反馈 3商务合作")
    private Integer type;

    @Schema(description = "留言内容")
    private String content;

    @Schema(description = "回复内容")
    private String reply;

    @Schema(description = "回复时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime replyTime;

    @Schema(description = "状态: 0待处理 1已回复 2已完成 3已归档")
    private Integer status;

    @Schema(description = "是否删除: 0否 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}
