aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authormrfoxygmfr <mrfoxygmfr@sch9.ru>2025-03-24 01:31:05 +0300
committermrfoxygmfr <mrfoxygmfr@sch9.ru>2025-03-24 01:31:05 +0300
commite40750eb6ff6d8f78a092257669fd5dddc106df3 (patch)
treeeea94769942ffc130446120d41ef2a17c996a1dc /src
parent1b5a2c176c679af8eb8019d076de746917a75776 (diff)
fix(db/models): fix INTERVAL type handling
Diffstat (limited to 'src')
-rw-r--r--src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java
index 5211eaf..420a615 100644
--- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java
+++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java
@@ -1,5 +1,7 @@
package ru.mrfoxygmfr.warehouse_accounting.db.models;
+import io.hypersistence.utils.hibernate.type.interval.PostgreSQLIntervalType;
+import org.hibernate.annotations.Type;
import jakarta.persistence.*;
import lombok.*;
@@ -42,7 +44,7 @@ public class Product {
private long depth;
@Column(nullable = true, name = "max_storage_duration", columnDefinition = "interval")
- @NonNull
+ @Type(PostgreSQLIntervalType.class)
private Duration maxStorageDuration;
}