73 lines
1.6 KiB
C
73 lines
1.6 KiB
C
#ifndef META_MODEL_H
|
|
#define META_MODEL_H
|
|
/*********元模型********/
|
|
#include <QString>
|
|
#include <QJsonObject>
|
|
|
|
struct attributeGroup {
|
|
int id = 0;
|
|
QString groupType;
|
|
QString groupName;
|
|
int isPublic = -1;
|
|
QString remark;
|
|
};
|
|
|
|
struct dataType //数据类型(元模)
|
|
{
|
|
int id = 0;
|
|
QString dataType;
|
|
QString databaseType;
|
|
};
|
|
|
|
struct modelType {
|
|
int id = 0;
|
|
QString modelType;
|
|
QString modelName;
|
|
int graphicElement; // 图形元素类型
|
|
QByteArray icon; //图片
|
|
QString remark;
|
|
};
|
|
|
|
struct modelGroup
|
|
{
|
|
int id = 0;
|
|
qint64 modelTypeId = 0;
|
|
qint64 attributeGroupId = 0;
|
|
};
|
|
|
|
struct attribute {
|
|
int id = 0;
|
|
QString attribute; // 属性名
|
|
QString attributeName; // 别名
|
|
qint64 dataTypeId = 0; //数据类型id
|
|
int lengthPrecision = 0; //长度限制(varchar)
|
|
int scale = 0; //小数点位数
|
|
int isNotNull = 0; //是否非空
|
|
QString defaultValue; //默认值
|
|
QString valueRange; //数值范围
|
|
int isVisible = 1;
|
|
};
|
|
|
|
struct modelAttribute //模型属性表(所有模型属性的索引)
|
|
{
|
|
int id = 0;
|
|
qint64 modelTypeId = 0;
|
|
qint64 attributeGroupId = 0;
|
|
qint64 attributeId = 0;
|
|
};
|
|
|
|
struct modelAttributePublic //公共属性表
|
|
{
|
|
int id = 0;
|
|
qint64 attributeGroupId = 0;
|
|
qint64 attributeId = 0;
|
|
};
|
|
|
|
struct modelConnectivity { //模型连接性表(元模是否可以连接)
|
|
int id = 0;
|
|
QString fromModel; //属性名
|
|
QString toModel;
|
|
int connectivity = 0; //是否可连
|
|
};
|
|
#endif
|