From cad2254f0eaf770a169432296916a2acafe18b4a Mon Sep 17 00:00:00 2001 From: mrfoxygmfr Date: Mon, 17 Mar 2025 12:58:57 +0300 Subject: fix(db): remove enum dictionary tables --- .../java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java | 2 +- src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Product.java | 2 +- .../java/ru/mrfoxygmfr/warehouse_accounting/db/models/ProductSlots.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java index 6409b55..72c2353 100644 --- a/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java +++ b/src/main/java/ru/mrfoxygmfr/warehouse_accounting/db/models/Operation.java @@ -30,7 +30,7 @@ public class Operation { private OperationType type; @Column(nullable = false, name = "status") - @Enumerated(EnumType.ORDINAL) + @Enumerated(EnumType.STRING) @NonNull private OperationStatus status; 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 10da162..d2e31f0 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 @@ -21,7 +21,7 @@ public class Product { private int id; @Column(nullable = false, name = "type") - @Enumerated(EnumType.ORDINAL) + @Enumerated(EnumType.STRING) @NonNull private ProductType type; 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 58fe4d9..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 @@ -35,7 +35,7 @@ public class ProductSlots { private long amount; @Column(nullable = false, name = "status") - @Enumerated(EnumType.ORDINAL) + @Enumerated(EnumType.STRING) @NonNull private ProductStorageStatus status; -- cgit mrf-deployment