content: package org.goormthon.seasonthon.nocheongmaru.domain.feed.entity;
  
  import jakarta.persistence.*;
  import lombok.AccessLevel;
  import lombok.Builder;
  import lombok.Getter;
  import lombok.NoArgsConstructor;
  import org.goormthon.seasonthon.nocheongmaru.domain.member.entity.Member;
  import org.goormthon.seasonthon.nocheongmaru.domain.mission.entity.Mission;
  import org.goormthon.seasonthon.nocheongmaru.global.common.BaseTimeEntity;
  
  @NoArgsConstructor(access = AccessLevel.PROTECTED)
  @Getter
  @Table(name = "feeds")
  @Entity
  public class Feed extends BaseTimeEntity {
      
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "feed_id")
      private Long id;
      
      @Lob
      @Column(nullable = false)
      private String description;
      
      @Lob
      @Column(name = "image_url", nullable = false)
      private String imageUrl;
      
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "member_id", nullable = false)
      private Member member;
      
      @ManyToOne(fetch = FetchType.LAZY)
      @JoinColumn(name = "mission_id", nullable = false)
      private Mission mission;
      
      @Builder
      private Feed(String description, String imageUrl, Member member, Mission mission) {
          this.description = description;
          this.imageUrl = imageUrl;
          this.member = member;
          this.mission = mission;
      }
  
      public void replace(String description, String imageUrl, Mission mission) {
          this.description = description;
          this.imageUrl = imageUrl;
          this.mission = mission;
      }
      
      
      public void modifyFeed(String description, String newImageUrl) {
          this.description = description;
          this.imageUrl = newImageUrl;
      }
      
  }
  