library-picturebook-activity/backend-java/src/main/java/com/competition/common/entity/BaseEntity.java
En f03991819d feat: 管理端全功能 E2E 测试——40 用例覆盖登录、仪表盘、活动、报名、作品、评审、用户、导航
新增 10 个管理端 E2E 测试文件和 1 个 Mock fixture:
- admin.fixture.ts: Mock 数据 + 登录注入 + 组件预热 + 兜底 API 拦截
- login/contests/dashboard/navigation/registrations/works/reviews/users 等 9 个 spec

关键修复:route.fallback() 替代 route.continue() 修正 Mock 链式传递;
review-rules/select Mock + 兜底拦截器防止未 mock 请求到达真实后端。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 12:52:39 +08:00

70 lines
2.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.competition.common.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 基础实体类,所有实体继承此类
* 包含新审计字段Java规范和旧审计字段过渡期兼容
*/
@Data
@Schema(description = "基础实体")
public abstract class BaseEntity implements Serializable {
/** 主键 ID自增 */
@Schema(description = "主键ID")
@TableId(type = IdType.AUTO)
private Long id;
// ====== 新审计字段Java 规范) ======
/** 创建人账号 */
@Schema(description = "创建人账号")
@TableField(value = "create_by", fill = FieldFill.INSERT)
private String createBy;
/** 更新人账号 */
@Schema(description = "更新人账号")
@TableField(value = "update_by", fill = FieldFill.INSERT_UPDATE)
private String updateBy;
/** 逻辑删除标识0-未删除1-已删除) */
@Schema(description = "逻辑删除标识0-未删除1-已删除")
@TableLogic
@TableField(value = "deleted", fill = FieldFill.INSERT)
private Integer deleted;
// ====== 旧审计字段(过渡期保留,请使用 createBy/updateBy ======
/** 创建人 ID已弃用请使用 createBy */
@Deprecated
@Schema(description = "创建人ID已弃用请使用 createBy")
@TableField(value = "creator", fill = FieldFill.INSERT)
private Integer creator;
/** 修改人 ID已弃用请使用 updateBy */
@Deprecated
@Schema(description = "修改人ID已弃用请使用 updateBy")
@TableField(value = "modifier", fill = FieldFill.INSERT_UPDATE)
private Integer modifier;
/** 创建时间 */
@Schema(description = "创建时间")
@TableField(value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime;
/** 修改时间 */
@Schema(description = "修改时间")
@TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
private LocalDateTime modifyTime;
/** 有效状态1-有效2-失效 */
@Schema(description = "有效状态1-有效2-失效")
@TableField(value = "valid_state", fill = FieldFill.INSERT)
private Integer validState;
}