From eeb9dd71edf6913579879f3ac80aff2f06ce8fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=AE=87=E8=B1=AA?= Date: Sat, 27 Jul 2024 21:35:29 +0800 Subject: [PATCH] feat: add entity --- .../lark/api/v1/client/SlideController.java | 1 + .../fun/sast/evento/lark/api/v1/value/V1.java | 6 ++---- .../lark/domain/event/entity/Event.java | 20 +++++++++++++++---- .../lark/domain/event/entity/EventDetail.java | 5 ----- .../lark/domain/event/entity/Feedback.java | 8 ++++++++ .../lark/domain/event/entity/Location.java | 4 ---- .../domain/event/entity/Participation.java | 9 +++++++++ .../lark/domain/event/entity/Slide.java | 8 ++++++++ .../lark/domain/lark/entity/Department.java | 4 ---- .../lark/domain/lark/entity/LarkEvent.java | 4 ---- 10 files changed, 44 insertions(+), 25 deletions(-) delete mode 100644 src/main/java/fun/sast/evento/lark/domain/event/entity/EventDetail.java create mode 100644 src/main/java/fun/sast/evento/lark/domain/event/entity/Feedback.java delete mode 100644 src/main/java/fun/sast/evento/lark/domain/event/entity/Location.java create mode 100644 src/main/java/fun/sast/evento/lark/domain/event/entity/Participation.java create mode 100644 src/main/java/fun/sast/evento/lark/domain/event/entity/Slide.java delete mode 100644 src/main/java/fun/sast/evento/lark/domain/lark/entity/Department.java delete mode 100644 src/main/java/fun/sast/evento/lark/domain/lark/entity/LarkEvent.java diff --git a/src/main/java/fun/sast/evento/lark/api/v1/client/SlideController.java b/src/main/java/fun/sast/evento/lark/api/v1/client/SlideController.java index afc0b6b..d9298fe 100644 --- a/src/main/java/fun/sast/evento/lark/api/v1/client/SlideController.java +++ b/src/main/java/fun/sast/evento/lark/api/v1/client/SlideController.java @@ -15,6 +15,7 @@ class SlideController { @GetMapping("/event/list") public List event(@RequestParam Integer eventId) { + return List.of(); } diff --git a/src/main/java/fun/sast/evento/lark/api/v1/value/V1.java b/src/main/java/fun/sast/evento/lark/api/v1/value/V1.java index efbd1f4..be37d79 100644 --- a/src/main/java/fun/sast/evento/lark/api/v1/value/V1.java +++ b/src/main/java/fun/sast/evento/lark/api/v1/value/V1.java @@ -10,12 +10,10 @@ record Event( String description, Date gmtEventStart, Date gmtEventEnd, - Date gmtRegistrationStart, - Date gmtRegistrationEnd, + Date gmtRegistrationStart,//报名 + Date gmtRegistrationEnd,// EventType eventType, - Integer typeId, String location, - Integer locationId, String tag, Integer state,//1:未开始,2:报名中,3:进行中,4:已取消,5:已结束 List departments diff --git a/src/main/java/fun/sast/evento/lark/domain/event/entity/Event.java b/src/main/java/fun/sast/evento/lark/domain/event/entity/Event.java index 4028364..59fbe40 100644 --- a/src/main/java/fun/sast/evento/lark/domain/event/entity/Event.java +++ b/src/main/java/fun/sast/evento/lark/domain/event/entity/Event.java @@ -1,21 +1,33 @@ package fun.sast.evento.lark.domain.event.entity; +import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import java.time.LocalDateTime; +/** + * + */ @Data @TableName("event") public class Event { - @TableId(value = "id") - private String id; + @TableId(value = "id",type = IdType.ASSIGN_ID) + private Long id; private String summary; private String description; + private LocalDateTime start; private LocalDateTime end; - private Location location; - private EventDetail detail; + private String location; + private String tag; + private String attachmentUrl; + private Long like; + private Long disLike; + private String larkEventUid; + private String larkMeetingRoomId; + private String larkMeetingRoomName; + private String larkDepartment; } //实体类,和其他模块有关联,有影响的部分 \ No newline at end of file diff --git a/src/main/java/fun/sast/evento/lark/domain/event/entity/EventDetail.java b/src/main/java/fun/sast/evento/lark/domain/event/entity/EventDetail.java deleted file mode 100644 index caaeb6b..0000000 --- a/src/main/java/fun/sast/evento/lark/domain/event/entity/EventDetail.java +++ /dev/null @@ -1,5 +0,0 @@ -package fun.sast.evento.lark.domain.event.entity; - -public class EventDetail { -} -//详细的数据,和其他模块无关联,无影响的部分 \ No newline at end of file diff --git a/src/main/java/fun/sast/evento/lark/domain/event/entity/Feedback.java b/src/main/java/fun/sast/evento/lark/domain/event/entity/Feedback.java new file mode 100644 index 0000000..1bfcc69 --- /dev/null +++ b/src/main/java/fun/sast/evento/lark/domain/event/entity/Feedback.java @@ -0,0 +1,8 @@ +package fun.sast.evento.lark.domain.event.entity; + +public class Feedback { + private Long id; + private Long linkId; + private Long eventId; + private String feedback; +} diff --git a/src/main/java/fun/sast/evento/lark/domain/event/entity/Location.java b/src/main/java/fun/sast/evento/lark/domain/event/entity/Location.java deleted file mode 100644 index 9a449db..0000000 --- a/src/main/java/fun/sast/evento/lark/domain/event/entity/Location.java +++ /dev/null @@ -1,4 +0,0 @@ -package fun.sast.evento.lark.domain.event.entity; - -public class Location { -} diff --git a/src/main/java/fun/sast/evento/lark/domain/event/entity/Participation.java b/src/main/java/fun/sast/evento/lark/domain/event/entity/Participation.java new file mode 100644 index 0000000..185e50b --- /dev/null +++ b/src/main/java/fun/sast/evento/lark/domain/event/entity/Participation.java @@ -0,0 +1,9 @@ +package fun.sast.evento.lark.domain.event.entity; + +public class Participation { + private Long id; + private Long linkId; + private Long eventId; + private Boolean isSubscribed; + private Boolean isCheckIn; +} diff --git a/src/main/java/fun/sast/evento/lark/domain/event/entity/Slide.java b/src/main/java/fun/sast/evento/lark/domain/event/entity/Slide.java new file mode 100644 index 0000000..0e0acc7 --- /dev/null +++ b/src/main/java/fun/sast/evento/lark/domain/event/entity/Slide.java @@ -0,0 +1,8 @@ +package fun.sast.evento.lark.domain.event.entity; + +public class Slide { + private Long id; + private String eventId; + private String url; + private String link; +} diff --git a/src/main/java/fun/sast/evento/lark/domain/lark/entity/Department.java b/src/main/java/fun/sast/evento/lark/domain/lark/entity/Department.java deleted file mode 100644 index 8de272e..0000000 --- a/src/main/java/fun/sast/evento/lark/domain/lark/entity/Department.java +++ /dev/null @@ -1,4 +0,0 @@ -package fun.sast.evento.lark.domain.lark.entity; - -public class Department { -} diff --git a/src/main/java/fun/sast/evento/lark/domain/lark/entity/LarkEvent.java b/src/main/java/fun/sast/evento/lark/domain/lark/entity/LarkEvent.java deleted file mode 100644 index 5f4a2d1..0000000 --- a/src/main/java/fun/sast/evento/lark/domain/lark/entity/LarkEvent.java +++ /dev/null @@ -1,4 +0,0 @@ -package fun.sast.evento.lark.domain.lark.entity; - -public class LarkEvent { -}