Skip to content

Commit

Permalink
[Feat] #39 - Log prevNum Default 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
0lynny committed Jan 9, 2024
1 parent 71881c8 commit 4299cf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/moonshot/server/domain/log/model/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import jakarta.persistence.*;
import lombok.*;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicInsert;
import org.moonshot.server.domain.keyresult.model.KeyResult;
import org.moonshot.server.domain.user.model.SocialPlatform;
import org.moonshot.server.domain.user.model.User;
Expand All @@ -12,6 +13,7 @@
@Entity
@Getter
@Builder
@DynamicInsert
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PROTECTED)
public class Log {
Expand All @@ -28,8 +30,9 @@ public class Log {
@Column(nullable = false)
private LogState state;

@Builder.Default
@Column(columnDefinition = "bigint default -1")
private long prevNum;
private long prevNum = -1;

@Column(nullable = false)
private long currNum;
Expand Down

0 comments on commit 4299cf8

Please sign in to comment.