Skip to content

Commit

Permalink
Sprint0/#219 (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
ozzing authored Apr 8, 2024
2 parents 2c24aa9 + 779382d commit e7b681b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
4 changes: 3 additions & 1 deletion src/main/java/org/sopt/app/application/stamp/StampInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
import lombok.ToString;

public class StampInfo {

@Getter
@Builder
@ToString
public static class Stamp {

private Long id;
private String contents;
private List<String> images;
private Long userId;
private Long missionId;
private LocalDateTime activityDate;
private String activityDate;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
}
Expand Down
17 changes: 10 additions & 7 deletions src/main/java/org/sopt/app/domain/entity/Stamp.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@


import com.vladmihalcea.hibernate.type.array.ListArrayType;
import java.time.LocalDateTime;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;

import javax.persistence.*;
import java.util.List;

@Entity
@Table(name = "stamp", schema = "app_dev")
@TypeDef(
Expand Down Expand Up @@ -44,8 +47,8 @@ public class Stamp extends BaseEntity {
@Column
private Long missionId;

@Column
private LocalDateTime activityDate;
@Column(length = 10)
private String activityDate;

public void changeContents(String contents) {
this.contents = contents;
Expand All @@ -55,7 +58,7 @@ public void changeImages(List<String> images) {
this.images = images;
}

public void changeActivityDate(LocalDateTime activityDate) {
public void changeActivityDate(String activityDate) {
this.activityDate = activityDate;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.sopt.app.presentation.stamp;

import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -36,9 +35,9 @@ public static class RegisterStampRequest {
@Schema(description = "μŠ€νƒ¬ν”„ λ‚΄μš©", example = "μŠ€νƒ¬ν”„ μ°μ—ˆλ‹€!")
@NotNull(message = "contents may not be null")
private String contents;
@Schema(description = "ν™œλ™ λ‚ μ§œ", example = "2023-03-29T18:39:42.106369")
@Schema(description = "ν™œλ™ λ‚ μ§œ", example = "2024.04.08")
@NotNull(message = "activity date may not be null")
private LocalDateTime activityDate;
private String activityDate;
}

@Getter
Expand All @@ -55,8 +54,8 @@ public static class EditStampRequest {
@Schema(description = "μŠ€νƒ¬ν”„ λ‚΄μš©", example = "μŠ€νƒ¬ν”„ μ°μ—ˆλ‹€!")
@NotNull(message = "contents may not be null")
private String contents;
@Schema(description = "ν™œλ™ λ‚ μ§œ", example = "2023-03-29T18:39:42.106369")
@Schema(description = "ν™œλ™ λ‚ μ§œ", example = "2024.04.08")
@NotNull(message = "activity date may not be null")
private LocalDateTime activityDate;
private String activityDate;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public static class StampMain {
private String contents;
@Schema(description = "μŠ€νƒ¬ν”„ 이미지", example = "[https://s3.ap-northeast-2.amazonaws.com/example/283aab53-22e3-46da-85ec-146c99f82ed4.jpeg]")
private List<String> images;
@Schema(description = "ν™œλ™ λ‚ μ§œ", example = "2023-03-29T18:39:42.106369")
private LocalDateTime activityDate;
@Schema(description = "ν™œλ™ λ‚ μ§œ", example = "2024.04.08")
private String activityDate;
@Schema(description = "μŠ€νƒ¬ν”„ 생성 μΌμ‹œ", example = "2023-03-29T18:39:42.106369")
private LocalDateTime createdAt;
@Schema(description = "μŠ€νƒ¬ν”„ μˆ˜μ • μΌμ‹œ", example = "2023-03-29T18:39:42.106369")
Expand Down

0 comments on commit e7b681b

Please sign in to comment.