diff --git a/src/main/java/com/krylov/refound/dto/PostRequest.java b/src/main/java/com/krylov/refound/dto/PostRequest.java index 3fadf4a..da254a1 100644 --- a/src/main/java/com/krylov/refound/dto/PostRequest.java +++ b/src/main/java/com/krylov/refound/dto/PostRequest.java @@ -18,4 +18,5 @@ public class PostRequest { private Double latitude; private Double longitude; private String address; + private String rulesAccepted; } diff --git a/src/main/java/com/krylov/refound/dto/PostResponse.java b/src/main/java/com/krylov/refound/dto/PostResponse.java index 532abd9..cb9cc12 100644 --- a/src/main/java/com/krylov/refound/dto/PostResponse.java +++ b/src/main/java/com/krylov/refound/dto/PostResponse.java @@ -26,4 +26,5 @@ import lombok.Data; private Long userId; private Long likeCount; private Role userRole; + private String rulesAccepted; } diff --git a/src/main/java/com/krylov/refound/entity/Post.java b/src/main/java/com/krylov/refound/entity/Post.java index d930167..a4ad732 100644 --- a/src/main/java/com/krylov/refound/entity/Post.java +++ b/src/main/java/com/krylov/refound/entity/Post.java @@ -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; diff --git a/src/main/resources/db/changelog/add/013-add-rules_accepted-posts.yaml b/src/main/resources/db/changelog/add/013-add-rules_accepted-posts.yaml new file mode 100644 index 0000000..38724c8 --- /dev/null +++ b/src/main/resources/db/changelog/add/013-add-rules_accepted-posts.yaml @@ -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 \ No newline at end of file diff --git a/src/main/resources/db/changelog/db.changelog-master.yaml b/src/main/resources/db/changelog/db.changelog-master.yaml index 99ab00f..f330c5f 100644 --- a/src/main/resources/db/changelog/db.changelog-master.yaml +++ b/src/main/resources/db/changelog/db.changelog-master.yaml @@ -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 } \ No newline at end of file + - include: { file: db/changelog/create/008-create-reviews.yaml } + - include: { file: db/changelog/add/013-add-rules_accepted-posts.yaml} \ No newline at end of file