aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow/Values/Database.hpp
diff options
context:
space:
mode:
authorrtk0c <[email protected]>2021-06-03 10:06:55 -0700
committerrtk0c <[email protected]>2021-06-03 10:06:55 -0700
commit7a325e1b3be04bc54941431458903022da1643ac (patch)
treeaa76ab5b243fb351693645bfe2d2841019a45c5a /core/src/Model/Workflow/Values/Database.hpp
parent016d58996db755630f8b41ddbef67516fe0c13b2 (diff)
Create template inheritance hierarchy, object value RTTI system
Diffstat (limited to 'core/src/Model/Workflow/Values/Database.hpp')
-rw-r--r--core/src/Model/Workflow/Values/Database.hpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/core/src/Model/Workflow/Values/Database.hpp b/core/src/Model/Workflow/Values/Database.hpp
new file mode 100644
index 0000000..e8a4f83
--- /dev/null
+++ b/core/src/Model/Workflow/Values/Database.hpp
@@ -0,0 +1,51 @@
+#pragma once
+
+#include "Model/Workflow/Value.hpp"
+#include "Model/Workflow/Values/Basic.hpp"
+#include "cplt_fwd.hpp"
+
+class DatabaseRowIdValue : public BaseValue
+{
+private:
+ TableKind mTable;
+ int64_t mRowId;
+
+public:
+ static bool IsInstance(const BaseValue* value);
+ DatabaseRowIdValue();
+
+ TableKind GetTable() const;
+ int64_t GetRowId() const;
+};
+
+class SaleDatabaseRowValue : public BaseObjectValue
+{
+private:
+ int mCustomerId;
+ TextValue mCustomerName;
+ DateTimeValue mDeadline;
+ DateTimeValue mDeliveryTime;
+
+public:
+ static bool IsInstance(const BaseValue* value);
+ SaleDatabaseRowValue();
+
+ virtual const BaseValue* GetProperty(int idx) const;
+ virtual bool SetProperty(int idx, std::unique_ptr<BaseValue> value);
+};
+
+class PurchaseDatabaseRowValue : public BaseObjectValue
+{
+private:
+ int mFactoryId;
+ TextValue mFactoryName;
+ DateTimeValue mOrderTime;
+ DateTimeValue mDeliveryTime;
+
+public:
+ static bool IsInstance(const BaseValue* value);
+ PurchaseDatabaseRowValue();
+
+ virtual const BaseValue* GetProperty(int idx) const;
+ virtual bool SetProperty(int idx, std::unique_ptr<BaseValue> value);
+};