Merge pull request #20 from SlimusMinus/add-rules_accepted

added field rules_accepted in posts
This commit is contained in:
SlimusMinus
2026-07-29 01:23:32 +03:00
committed by GitHub
5 changed files with 19 additions and 1 deletions

View File

@@ -18,4 +18,5 @@ public class PostRequest {
private Double latitude;
private Double longitude;
private String address;
private String rulesAccepted;
}

View File

@@ -26,4 +26,5 @@ import lombok.Data;
private Long userId;
private Long likeCount;
private Role userRole;
private String rulesAccepted;
}

View File

@@ -41,6 +41,7 @@ public class Post {
private Double longitude;
private LocalDateTime createdAt;
private String phone;
private String rulesAccepted;
@Enumerated(EnumType.STRING)
private PostType type;

View File

@@ -0,0 +1,14 @@
databaseChangeLog:
- changeSet:
id: 013-add-rules_accepted-posts
author: alexandr krylov
changes:
- addColumn:
tableName: posts
columns:
- column:
name: rules_accepted
type: boolean
defaultValueBoolean: false
constraints:
nullable: false

View File

@@ -14,4 +14,5 @@ databaseChangeLog:
- include: { file: db/changelog/add/003-add-phone-posts.yaml }
- include: { file: db/changelog/add/004-add-fields-user.yaml }
- include: { file: db/changelog/add/005-add-user-avatarUrl.yaml }
- include: { file: db/changelog/create/008-create-reviews.yaml }
- include: { file: db/changelog/create/008-create-reviews.yaml }
- include: { file: db/changelog/add/013-add-rules_accepted-posts.yaml}