|
@@ -7,8 +7,11 @@ from src.validation.validator import validator
|
|
|
|
|
|
|
|
|
|
class transaction_model(abstract_reference):
|
|
class transaction_model(abstract_reference):
|
|
- def __init__(
|
|
|
|
- self,
|
|
|
|
|
|
+ def __init__(self, name=None):
|
|
|
|
+ super().__init__(name)
|
|
|
|
+
|
|
|
|
+ @staticmethod
|
|
|
|
+ def create(
|
|
name,
|
|
name,
|
|
warehouse,
|
|
warehouse,
|
|
nomenclature,
|
|
nomenclature,
|
|
@@ -17,14 +20,16 @@ class transaction_model(abstract_reference):
|
|
measurementUnit,
|
|
measurementUnit,
|
|
timeSpan,
|
|
timeSpan,
|
|
):
|
|
):
|
|
- self.__vtor = validator()
|
|
|
|
- self.warehouse = warehouse
|
|
|
|
- self.nomenclature = nomenclature
|
|
|
|
- self.amount = amount
|
|
|
|
- self.transaction_type = transactionType
|
|
|
|
- self.measurement_unit = measurementUnit
|
|
|
|
- self.time_span = timeSpan
|
|
|
|
- super().__init__(name)
|
|
|
|
|
|
+ obj = transaction_model(name)
|
|
|
|
+ obj.__vtor = validator()
|
|
|
|
+ obj.warehouse = warehouse
|
|
|
|
+ obj.nomenclature = nomenclature
|
|
|
|
+ obj.amount = amount
|
|
|
|
+ obj.transaction_type = transactionType
|
|
|
|
+ obj.measurement_unit = measurementUnit
|
|
|
|
+ obj.time_span = timeSpan
|
|
|
|
+
|
|
|
|
+ return obj
|
|
|
|
|
|
__warehouse = None
|
|
__warehouse = None
|
|
|
|
|