feat: add event entities
This commit is contained in:
33
src/main/java/icu/sunway/ai_spring_example/Entity/Event.java
Normal file
33
src/main/java/icu/sunway/ai_spring_example/Entity/Event.java
Normal file
@@ -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;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
}
|
||||||
@@ -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<EventGameDiscount> {
|
||||||
|
}
|
||||||
@@ -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<EventGameRelation> {
|
||||||
|
}
|
||||||
@@ -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<Event> {
|
||||||
|
}
|
||||||
@@ -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<EventType> {
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user