补全类型结构
This commit is contained in:
parent
91b4979037
commit
ccad685a22
|
|
@ -74,9 +74,6 @@ public class NgbatisDemoApplication {
|
|||
// userFollowUsers.forEach(System.out::println);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
30
src/main/java/com/idata/tools/ngbatisdemo/pojo/Group.java
Normal file
30
src/main/java/com/idata/tools/ngbatisdemo/pojo/Group.java
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
package com.idata.tools.ngbatisdemo.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nebula.contrib.ngbatis.annotations.base.Tag;
|
||||
import org.nebula.contrib.ngbatis.base.GraphBaseVertex;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: ChenYawei
|
||||
* @date: 2025/3/19 10:42
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "group")
|
||||
public class Group extends GraphBaseVertex {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
private String name;
|
||||
private String platform;
|
||||
@Column(name = "member_count")
|
||||
private Integer memberCount;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.idata.tools.ngbatisdemo.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nebula.contrib.ngbatis.annotations.base.Tag;
|
||||
import org.nebula.contrib.ngbatis.base.GraphBaseVertex;
|
||||
|
||||
import javax.persistence.Column;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: ChenYawei
|
||||
* @date: 2025/3/19 10:46
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "organization")
|
||||
public class Organization extends GraphBaseVertex {
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
// 平台
|
||||
private String platform;
|
||||
|
||||
@Column(name = "member_count")
|
||||
// 成员数量
|
||||
private String memberCount;
|
||||
|
||||
// 行业
|
||||
private String industry;
|
||||
|
||||
}
|
||||
82
src/main/java/com/idata/tools/ngbatisdemo/pojo/Post.java
Normal file
82
src/main/java/com/idata/tools/ngbatisdemo/pojo/Post.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package com.idata.tools.ngbatisdemo.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nebula.contrib.ngbatis.annotations.base.Tag;
|
||||
import org.nebula.contrib.ngbatis.base.GraphBaseVertex;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Id;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: ChenYawei
|
||||
* @date: 2025/3/19 10:39
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "post")
|
||||
public class Post extends GraphBaseVertex {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
@Column(name = "root_mid")
|
||||
// root_mid
|
||||
private String rootMid;
|
||||
|
||||
@Column(name = "author_id")
|
||||
// 作者ID
|
||||
private String authorId;
|
||||
|
||||
@Column(name = "publish_time")
|
||||
// 发布时间
|
||||
private String publishTime;
|
||||
|
||||
// 平台(字段名与列名一致,无需注解)
|
||||
private String platform;
|
||||
|
||||
@Column(name = "gather_time")
|
||||
// 采集时间
|
||||
private String gatherTime;
|
||||
|
||||
@Column(name = "like_count")
|
||||
// 点赞数(允许空值用Integer)
|
||||
private Integer likeCount;
|
||||
|
||||
@Column(name = "comment_count")
|
||||
// 评论数
|
||||
private Integer commentCount;
|
||||
|
||||
@Column(name = "post_relationship")
|
||||
// 帖子关联关系
|
||||
private String postRelationship;
|
||||
|
||||
@Column(name = "view_count")
|
||||
// 浏览数
|
||||
private Integer viewCount;
|
||||
|
||||
// 链接(字段名与列名一致)
|
||||
private String url;
|
||||
|
||||
// 内容(字段名与列名一致)
|
||||
private String content;
|
||||
|
||||
@Column(name = "repost_count")
|
||||
// 转发数
|
||||
private Integer repostCount;
|
||||
|
||||
@Column(name = "author_name")
|
||||
// 作者名称
|
||||
private String authorName;
|
||||
|
||||
@Column(name = "source_task")
|
||||
// 数据来源事件
|
||||
private String sourceTask;
|
||||
|
||||
// 关键词(字段名与列名一致)
|
||||
private String keywords;
|
||||
|
||||
}
|
||||
26
src/main/java/com/idata/tools/ngbatisdemo/pojo/Task.java
Normal file
26
src/main/java/com/idata/tools/ngbatisdemo/pojo/Task.java
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package com.idata.tools.ngbatisdemo.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.nebula.contrib.ngbatis.annotations.base.Tag;
|
||||
import org.nebula.contrib.ngbatis.base.GraphBaseVertex;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: ChenYawei
|
||||
* @date: 2025/3/19 10:48
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Tag(name = "task")
|
||||
public class Task extends GraphBaseVertex {
|
||||
|
||||
// 关键词
|
||||
private String keywords;
|
||||
|
||||
// 名称
|
||||
private String name;
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.idata.tools.ngbatisdemo.pojo;
|
||||
|
||||
import com.idata.tools.ngbatisdemo.base.BaseVertex;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
|
@ -30,15 +29,15 @@ public class User extends GraphBaseVertex {
|
|||
private String screenName;
|
||||
private String platform;
|
||||
@Column(name = "favourites_count")
|
||||
private int favouritesCount;
|
||||
private Integer favouritesCount;
|
||||
@Column(name = "followers_count")
|
||||
private int followersCount;
|
||||
private Integer followersCount;
|
||||
@Column(name = "friends_count")
|
||||
private int friendsCount;
|
||||
private Integer friendsCount;
|
||||
@Column(name = "listed_count")
|
||||
private int listedCount;
|
||||
private Integer listedCount;
|
||||
@Column(name = "following_count")
|
||||
private int followingCount;
|
||||
private Integer followingCount;
|
||||
@Column(name = "gather_time")
|
||||
private String gatherTime;
|
||||
@Column(name = "register_location")
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user