Skip to content

Commit

Permalink
Merge pull request #241 from IoTeaTime/develop
Browse files Browse the repository at this point in the history
release: 서버 배포
  • Loading branch information
OziinG authored Dec 4, 2024
2 parents 3c1c925 + 67948d5 commit 5a53814
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package org.ioteatime.meonghanyangserver.image.domain;

import jakarta.persistence.*;
import java.time.LocalDateTime;
import lombok.Getter;
import org.ioteatime.meonghanyangserver.group.domain.GroupEntity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@Getter
@Entity
@Table(name = "image")
@EntityListeners(AuditingEntityListener.class)
public class ImageEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(nullable = false, length = 50)
private String imageName;

@JoinColumn(nullable = false)
@ManyToOne(fetch = FetchType.LAZY)
private GroupEntity group;

@Column(nullable = false, length = 100)
private String imagePath;

@CreatedDate
@Column(nullable = false)
private LocalDateTime createdAt;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
import java.time.LocalDateTime;
import lombok.Data;
import org.ioteatime.meonghanyangserver.group.domain.GroupEntity;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@Data
@Entity
@Table(name = "video")
@EntityListeners(AuditingEntityListener.class)
public class VideoEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Expand All @@ -26,6 +29,7 @@ public class VideoEntity {
@Column(nullable = false, length = 100)
private String thumbnailPath;

@CreatedDate
@Column(nullable = false)
private LocalDateTime createdAt;
}
2 changes: 1 addition & 1 deletion src/main/resources/application-db.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spring:
job:
enabled: false # 배치 작업이 서버 실행과 함께 실행되지 않도록 설정
jdbc:
initialize-schema: always # 운영 서버에서는 항상 never
initialize-schema: never # 운영 서버에서는 항상 never
# flyway:
# enabled: true
# baseline-on-migrate: true
Expand Down

0 comments on commit 5a53814

Please sign in to comment.