added timezone for all create date
This commit is contained in:
@@ -2,6 +2,7 @@ package com.krylov.refound.entity.advertising;
|
||||
|
||||
import com.krylov.refound.enums.advertising.AdvertisingType;
|
||||
import com.krylov.refound.enums.advertising.TranscodingStatus;
|
||||
import com.krylov.refound.util.TimeZoneContext;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -60,7 +61,7 @@ public class Advertising {
|
||||
@PrePersist
|
||||
protected void onCreate() {
|
||||
if (createdAt == null) {
|
||||
createdAt = LocalDateTime.now();
|
||||
createdAt = TimeZoneContext.now();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.krylov.refound.entity.advertising;
|
||||
|
||||
import com.krylov.refound.enums.advertising.CampaignStatus;
|
||||
import com.krylov.refound.util.TimeZoneContext;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -48,7 +49,7 @@ public class Campaign {
|
||||
@PrePersist
|
||||
protected void onCreate() {
|
||||
if (createdAt == null) {
|
||||
createdAt = LocalDateTime.now();
|
||||
createdAt = TimeZoneContext.now();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.krylov.refound.entity.advertising;
|
||||
|
||||
import com.krylov.refound.util.TimeZoneContext;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -32,7 +33,7 @@ public class Click {
|
||||
@PrePersist
|
||||
protected void onCreate() {
|
||||
if (clickedAt == null) {
|
||||
clickedAt = LocalDateTime.now();
|
||||
clickedAt = TimeZoneContext.now();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.krylov.refound.entity.advertising;
|
||||
|
||||
import com.krylov.refound.enums.advertising.FullscreenAdStatus;
|
||||
import com.krylov.refound.enums.advertising.TranscodingStatus;
|
||||
import com.krylov.refound.util.TimeZoneContext;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -38,7 +39,7 @@ public class FullscreenAdvertising {
|
||||
@PrePersist
|
||||
protected void onCreate() {
|
||||
if (createdAt == null) {
|
||||
createdAt = LocalDateTime.now();
|
||||
createdAt = TimeZoneContext.now();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.krylov.refound.entity.advertising;
|
||||
|
||||
import com.krylov.refound.util.TimeZoneContext;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@@ -32,7 +33,7 @@ public class Impression {
|
||||
@PrePersist
|
||||
protected void onCreate() {
|
||||
if (shownAt == null) {
|
||||
shownAt = LocalDateTime.now();
|
||||
shownAt = TimeZoneContext.now();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user