package com.zhentao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

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

/**
 * 举报记录（管理端）
 */
@Data
@TableName("dynamic_reports")
public class DynamicReport implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "report_id", type = IdType.AUTO)
    private Long reportId;

    private Long dynamicId;
    private Long reporterId;

    private String reportType;
    private String description;
    private String screenshots;
    private String contact;

    /** 状态：0-待处理 1-处理中 2-已处理 3-已驳回 */
    private Integer status;

    @TableField("handle_result")
    private String handleResult;

    @TableField("handler_id")
    private Long handlerId;

    @TableField("handle_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime handleTime;

    @TableField("created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedAt;

    private Integer deleted;

    // ======== 非表字段：用于列表展示 ========
    @TableField(exist = false)
    private String reporterName;   // 举报人昵称

    @TableField(exist = false)
    private String reportedName;   // 被举报人（动态作者）昵称
}


