package com.gxwebsoft.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 应用操作动态
 *
 * @author 科技小王子
 * @since 2026-03-28 21:29:44
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "AppEvent对象", description = "应用操作动态")
public class AppEvent implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "自增ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "关联应用ID")
    private Long websiteId;

    @Schema(description = "事件类型: created/published/updated/domain_bound/member_added/status_changed")
    private String eventType;

    @Schema(description = "事件标题，如已发布")
    private String title;

    @Schema(description = "详细描述")
    private String content;

    @Schema(description = "操作人用户ID")
    private Long operatorId;

    @Schema(description = "操作人名称（冗余）")
    private String operator;

    @Schema(description = "关联ID，如版本ID")
    private Long refId;

    @Schema(description = "关联类型")
    private String refType;

    @Schema(description = "扩展数据")
    private String extra;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "用户ID")
    private Integer userId;

    @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;

}
