Compare commits
2 Commits
b9f88f9f5d
...
e1a4cb1d47
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1a4cb1d47 | ||
|
|
b28b0dcb5e |
14
pom.xml
14
pom.xml
@@ -26,12 +26,18 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.5.19</version>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.30</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Added MyBatis Spring Boot Starter dependency -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.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;
|
||||
}
|
||||
@@ -6,4 +6,11 @@ spring:
|
||||
url: jdbc:mysql://114.55.250.24:3306/dating?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
mybatis:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: com.bao.dating.pojo
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
Reference in New Issue
Block a user