From 29fc6f5b1981775be5d2f0f9f8e61fec2f550252 Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期一, 29 九月 2025 19:29:11 +0800
Subject: [PATCH] 删除所有test开头的测试文件
---
backend/src/main/java/com/rongyichuang/activity/entity/Activity.java | 97 ++++++++----------------------------------------
1 files changed, 16 insertions(+), 81 deletions(-)
diff --git a/backend/src/main/java/com/rongyichuang/activity/entity/Activity.java b/backend/src/main/java/com/rongyichuang/activity/entity/Activity.java
index 7bf7ccc..8a77723 100644
--- a/backend/src/main/java/com/rongyichuang/activity/entity/Activity.java
+++ b/backend/src/main/java/com/rongyichuang/activity/entity/Activity.java
@@ -1,9 +1,9 @@
package com.rongyichuang.activity.entity;
+import com.rongyichuang.common.entity.BaseEntity;
import com.rongyichuang.rating.entity.RatingScheme;
import jakarta.persistence.*;
-import org.hibernate.annotations.CreationTimestamp;
-import org.hibernate.annotations.UpdateTimestamp;
+import org.hibernate.annotations.Where;
import java.time.LocalDateTime;
import java.util.ArrayList;
@@ -11,11 +11,8 @@
@Entity
@Table(name = "t_activity")
-public class Activity {
-
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- private Long id;
+@Where(clause = "state = 1")
+public class Activity extends BaseEntity {
@Column(name = "pid", nullable = false)
private Long pid = 0L;
@@ -44,26 +41,11 @@
@Column(name = "player_max")
private Integer playerMax;
+ /**
+ * 鐘舵�侊細1-姝e父锛�0-鍒犻櫎
+ */
@Column(name = "state", nullable = false)
private Integer state = 1;
-
- @Column(name = "create_time", nullable = false, updatable = false)
- @CreationTimestamp
- private LocalDateTime createTime;
-
- @Column(name = "create_user_id")
- private Long createUserId;
-
- @Column(name = "update_time", nullable = false)
- @UpdateTimestamp
- private LocalDateTime updateTime;
-
- @Column(name = "update_user_id")
- private Long updateUserId;
-
- @Version
- @Column(name = "version", nullable = false)
- private Long version = 0L;
// 鍏宠仈璇勫垎妯℃澘
@ManyToOne(fetch = FetchType.LAZY)
@@ -96,13 +78,6 @@
}
// Getters and Setters
- public Long getId() {
- return id;
- }
-
- public void setId(Long id) {
- this.id = id;
- }
public Long getPid() {
return pid;
@@ -176,54 +151,6 @@
this.playerMax = playerMax;
}
- public Integer getState() {
- return state;
- }
-
- public void setState(Integer state) {
- this.state = state;
- }
-
- public LocalDateTime getCreateTime() {
- return createTime;
- }
-
- public void setCreateTime(LocalDateTime createTime) {
- this.createTime = createTime;
- }
-
- public Long getCreateUserId() {
- return createUserId;
- }
-
- public void setCreateUserId(Long createUserId) {
- this.createUserId = createUserId;
- }
-
- public LocalDateTime getUpdateTime() {
- return updateTime;
- }
-
- public void setUpdateTime(LocalDateTime updateTime) {
- this.updateTime = updateTime;
- }
-
- public Long getUpdateUserId() {
- return updateUserId;
- }
-
- public void setUpdateUserId(Long updateUserId) {
- this.updateUserId = updateUserId;
- }
-
- public Long getVersion() {
- return version;
- }
-
- public void setVersion(Long version) {
- this.version = version;
- }
-
public RatingScheme getRatingScheme() {
return ratingScheme;
}
@@ -248,8 +175,16 @@
this.parent = parent;
}
+ public Integer getState() {
+ return state;
+ }
+
+ public void setState(Integer state) {
+ this.state = state;
+ }
+
// 涓氬姟鏂规硶
- public boolean isCompetition() {
+ public boolean isMainActivity() {
return pid == 0;
}
--
Gitblit v1.8.0