aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrfoxygmfr <mrfoxygmfr@sch9.ru>2025-03-23 23:23:12 +0300
committermrfoxygmfr <mrfoxygmfr@sch9.ru>2025-03-23 23:23:12 +0300
commit1b5a2c176c679af8eb8019d076de746917a75776 (patch)
treed30901cd0d101bb890143778615cacff93150804
parentf91d1c94258e9c309b0324d47b7a7ad99eebe973 (diff)
fix(db/models): Revert "fix(db/models): change primary key strategy and remove extra NotNull annotations"
This reverts commit 20255f9fd6f126077d3cb51ac003c166221d4015.
-rw-r--r--src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java1
-rw-r--r--src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java3
-rw-r--r--src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java1
-rw-r--r--src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java3
4 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java
index 837e42e..9eaeab1 100644
--- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java
+++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/OperationProducts.java
@@ -28,5 +28,6 @@ public class OperationProducts {
private Product product;
@Column(nullable = false, name = "amount")
+ @NonNull
private long amount;
}
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 23c4c6a..5211eaf 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
@@ -30,12 +30,15 @@ public class Product {
private ProductType type;
@Column(nullable = false, name = "height")
+ @NonNull
private long height;
@Column(nullable = false, name = "width")
+ @NonNull
private long width;
@Column(nullable = false, name = "depth")
+ @NonNull
private long depth;
@Column(nullable = true, name = "max_storage_duration", columnDefinition = "interval")
diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java
index 6ed814f..7c24e5b 100644
--- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java
+++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java
@@ -31,6 +31,7 @@ public class ProductSlots {
private StorageSlot slot;
@Column(nullable = false, name = "amount")
+ @NonNull
private long amount;
@Column(nullable = false, name = "status")
diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java
index 74253c0..7486b21 100644
--- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java
+++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/StorageSlot.java
@@ -22,11 +22,14 @@ public class StorageSlot {
private String location;
@Column(nullable = false, name = "height")
+ @NonNull
private long height;
@Column(nullable = false, name = "width")
+ @NonNull
private long width;
@Column(nullable = false, name = "depth")
+ @NonNull
private long depth;
}