From 20ad99a6f954f28aa24f40ede5cc8a6e3031643c Mon Sep 17 00:00:00 2001 From: gushen610140 Date: Sun, 21 Dec 2025 02:51:41 +0800 Subject: [PATCH] feat: add event entities --- .../ai_spring_example/Entity/Event.java | 33 +++++++++++++++++++ .../Entity/EventGameDiscount.java | 25 ++++++++++++++ .../Entity/EventGameRelation.java | 20 +++++++++++ .../ai_spring_example/Entity/EventType.java | 21 ++++++++++++ .../Mapper/EventGameDiscountMapper.java | 10 ++++++ .../Mapper/EventGameRelationMapper.java | 10 ++++++ .../ai_spring_example/Mapper/EventMapper.java | 10 ++++++ .../Mapper/EventTypeMapper.java | 10 ++++++ 8 files changed, 139 insertions(+) create mode 100644 src/main/java/icu/sunway/ai_spring_example/Entity/Event.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Entity/EventGameDiscount.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Entity/EventGameRelation.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Entity/EventType.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameDiscountMapper.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameRelationMapper.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Mapper/EventMapper.java create mode 100644 src/main/java/icu/sunway/ai_spring_example/Mapper/EventTypeMapper.java diff --git a/src/main/java/icu/sunway/ai_spring_example/Entity/Event.java b/src/main/java/icu/sunway/ai_spring_example/Entity/Event.java new file mode 100644 index 0000000..64f77e1 --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Entity/Event.java @@ -0,0 +1,33 @@ +package icu.sunway.ai_spring_example.Entity; + +import java.time.LocalDateTime; + +import com.baomidou.mybatisplus.annotation.TableName; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@TableName("events") +public class Event { + private Integer id; + private Integer eventTypeId; + private String name; + private String slug; + private String shortDescription; + private String detailedDescription; + private LocalDateTime startTime; + private LocalDateTime endTime; + private Integer status; + private Integer priority; + private String bannerImage; + private String backgroundImage; + private String relatedGenreIds; + private String relatedPublisherIds; + private Boolean isVisible; + private LocalDateTime createdAt; + private LocalDateTime updatedAt; +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Entity/EventGameDiscount.java b/src/main/java/icu/sunway/ai_spring_example/Entity/EventGameDiscount.java new file mode 100644 index 0000000..ea4b6ab --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Entity/EventGameDiscount.java @@ -0,0 +1,25 @@ +package icu.sunway.ai_spring_example.Entity; + +import java.time.LocalDateTime; + +import com.baomidou.mybatisplus.annotation.TableName; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@TableName("event_game_discounts") +public class EventGameDiscount { + private Integer id; + private Integer eventId; + private Integer gameId; + private Integer discountPercentage; + private LocalDateTime startTime; + private LocalDateTime endTime; + private Boolean isActive; + private LocalDateTime createdAt; + private LocalDateTime updatedAt; +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Entity/EventGameRelation.java b/src/main/java/icu/sunway/ai_spring_example/Entity/EventGameRelation.java new file mode 100644 index 0000000..129da99 --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Entity/EventGameRelation.java @@ -0,0 +1,20 @@ +package icu.sunway.ai_spring_example.Entity; + +import java.time.LocalDateTime; + +import com.baomidou.mybatisplus.annotation.TableName; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@TableName("event_game_relations") +public class EventGameRelation { + private Integer id; + private Integer eventId; + private Integer gameId; + private LocalDateTime createdAt; +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Entity/EventType.java b/src/main/java/icu/sunway/ai_spring_example/Entity/EventType.java new file mode 100644 index 0000000..d0fd9d0 --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Entity/EventType.java @@ -0,0 +1,21 @@ +package icu.sunway.ai_spring_example.Entity; + +import java.time.LocalDateTime; + +import com.baomidou.mybatisplus.annotation.TableName; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@TableName("event_types") +public class EventType { + private Integer id; + private String name; + private String description; + private LocalDateTime createdAt; + private LocalDateTime updatedAt; +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameDiscountMapper.java b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameDiscountMapper.java new file mode 100644 index 0000000..29c7436 --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameDiscountMapper.java @@ -0,0 +1,10 @@ +package icu.sunway.ai_spring_example.Mapper; + +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import icu.sunway.ai_spring_example.Entity.EventGameDiscount; + +@Mapper +public interface EventGameDiscountMapper extends BaseMapper { +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameRelationMapper.java b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameRelationMapper.java new file mode 100644 index 0000000..f790a07 --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventGameRelationMapper.java @@ -0,0 +1,10 @@ +package icu.sunway.ai_spring_example.Mapper; + +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import icu.sunway.ai_spring_example.Entity.EventGameRelation; + +@Mapper +public interface EventGameRelationMapper extends BaseMapper { +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Mapper/EventMapper.java b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventMapper.java new file mode 100644 index 0000000..64a1459 --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventMapper.java @@ -0,0 +1,10 @@ +package icu.sunway.ai_spring_example.Mapper; + +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import icu.sunway.ai_spring_example.Entity.Event; + +@Mapper +public interface EventMapper extends BaseMapper { +} \ No newline at end of file diff --git a/src/main/java/icu/sunway/ai_spring_example/Mapper/EventTypeMapper.java b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventTypeMapper.java new file mode 100644 index 0000000..76e995f --- /dev/null +++ b/src/main/java/icu/sunway/ai_spring_example/Mapper/EventTypeMapper.java @@ -0,0 +1,10 @@ +package icu.sunway.ai_spring_example.Mapper; + +import org.apache.ibatis.annotations.Mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +import icu.sunway.ai_spring_example.Entity.EventType; + +@Mapper +public interface EventTypeMapper extends BaseMapper { +} \ No newline at end of file