aboutsummaryrefslogtreecommitdiff
path: root/core/src/Model/Workflow/Values/Database.hpp
blob: e8a4f8393e5168b936fe5df0e0dcd7080f9b7e78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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);
};