完成pojo数据库映射层(Entity)
增加lombok依赖
This commit is contained in:
7
pom.xml
7
pom.xml
@@ -25,6 +25,13 @@
|
|||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.30</version>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Added MyBatis Spring Boot Starter dependency -->
|
<!-- Added MyBatis Spring Boot Starter dependency -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mybatis.spring.boot</groupId>
|
<groupId>org.mybatis.spring.boot</groupId>
|
||||||
|
|||||||
33
src/main/java/com/bao/dating/pojo/entity/Post.java
Normal file
33
src/main/java/com/bao/dating/pojo/entity/Post.java
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
package com.bao.dating.pojo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态表
|
||||||
|
* @author KilLze
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class Post {
|
||||||
|
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
private String mediaOssKeys;
|
||||||
|
|
||||||
|
private String location;
|
||||||
|
|
||||||
|
private Integer isPublic;
|
||||||
|
|
||||||
|
private Integer likeCount;
|
||||||
|
|
||||||
|
private Integer favoriteCount;
|
||||||
|
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
}
|
||||||
21
src/main/java/com/bao/dating/pojo/entity/PostFavorite.java
Normal file
21
src/main/java/com/bao/dating/pojo/entity/PostFavorite.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package com.bao.dating.pojo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态收藏表
|
||||||
|
* @author KilLze
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PostFavorite {
|
||||||
|
|
||||||
|
private Long favoriteId;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
}
|
||||||
20
src/main/java/com/bao/dating/pojo/entity/PostLike.java
Normal file
20
src/main/java/com/bao/dating/pojo/entity/PostLike.java
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
package com.bao.dating.pojo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动态点赞表
|
||||||
|
* @author KilLze
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PostLike {
|
||||||
|
private Long likeId;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private Long postId;
|
||||||
|
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
}
|
||||||
40
src/main/java/com/bao/dating/pojo/entity/User.java
Normal file
40
src/main/java/com/bao/dating/pojo/entity/User.java
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
package com.bao.dating.pojo.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户表
|
||||||
|
* @author KilLze
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class User {
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String passwordHash;
|
||||||
|
|
||||||
|
private String salt;
|
||||||
|
|
||||||
|
private String nickname;
|
||||||
|
|
||||||
|
private String avatarUrl;
|
||||||
|
|
||||||
|
private String backgroundUrl;
|
||||||
|
|
||||||
|
private Integer gender;
|
||||||
|
|
||||||
|
private LocalDate birthday;
|
||||||
|
|
||||||
|
private String hobbies;
|
||||||
|
|
||||||
|
private String signature;
|
||||||
|
|
||||||
|
private LocalDateTime createdAt;
|
||||||
|
|
||||||
|
private LocalDateTime updatedAt;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user