package com.seer.teach.teacher.module.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.seer.teach.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 修改日志表
 * 记录知识点、单元、教材的修改操作
 * </p>
 *
 * @author Lingma
 * @since 2025-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("teacher_modification_log")
public class ModificationLogEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 操作类型：知识点 */
    public static final Integer TARGET_TYPE_KNOWLEDGE_POINT = 1;
    /** 操作类型：单元 */
    public static final Integer TARGET_TYPE_UNIT = 2;
    /** 操作类型：教材 */
    public static final Integer TARGET_TYPE_TEACHING_MATERIAL = 3;

    public static final Integer TARGET_TYPE_KNOWLEDGE_POINT_MAPPING = 4;

    public static final Integer TARGET_TYPE_KNOWLEDGE_POINT_SUMMARY = 5;

    public static final Integer TARGET_TYPE_QUESTION = 6;

    public static final Integer TARGET_TYPE_TEACH_GOAL = 7;

    public static final Integer TARGET_TYPE_TEACH_TEXT = 8;

    public static final Integer TARGET_TYPE_TEACH_TEXT_AUDIOS = 9;

    /** 操作类型：新增 */
    public static final Integer OPERATION_TYPE_ADD = 1;
    /** 操作类型：修改 */
    public static final Integer OPERATION_TYPE_UPDATE = 2;
    /** 操作类型：删除 */
    public static final Integer OPERATION_TYPE_DELETE = 3;
    /** 操作类型：查看 */
    public static final Integer OPERATION_TYPE_VIEW = 4;

    /**
     * 操作类型 1-知识点 2-单元 3-教材
     */
    private Integer targetType;

    /**
     * 目标ID（知识点ID、单元ID或教材ID）
     */
    private Integer targetId;

    /**
     * 目标名称（知识点名称、单元名称或教材名称）
     */
    private String targetName;

    /**
     * 操作类型：1-新增 2-修改 3-删除,4-查看
     */
    private Integer operationType;

    /**
     * 修改前的数据（JSON格式）
     */
    private String beforeData;

    /**
     * 修改后的数据（JSON格式）
     */
    private String afterData;

    /**
     * 操作人ID
     */
    private Integer operatorId;

    /**
     * 备注
     */
    private String remark;
}