From df6f0d97937272b4ae6f07eabba6262b4b0367b8 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Thu, 16 May 2024 19:13:35 -0500 Subject: [PATCH] Add enum for CORE (Office) DB types for use with typer commands --- corepos/enum.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/corepos/enum.py b/corepos/enum.py index 55619d8..28e33ea 100644 --- a/corepos/enum.py +++ b/corepos/enum.py @@ -2,7 +2,7 @@ ################################################################################ # # pyCOREPOS -- Python Interface to CORE POS -# Copyright © 2018-2019 Lance Edgar +# Copyright © 2018-2024 Lance Edgar # # This file is part of pyCOREPOS. # @@ -24,12 +24,14 @@ CORE POS enumeration constants """ -from __future__ import unicode_literals, absolute_import +from collections import OrderedDict +from enum import Enum -try: - from collections import OrderedDict -except ImportError: - from ordereddict import OrderedDict + +class CoreDbType(str, Enum): + office_op = 'office_op' + office_trans = 'office_trans' + office_arch = 'office_arch' BATCH_DISCOUNT_TYPE_PRICE_CHANGE = 0