Skip to main content
Version: 3.0

Entity 实体

结构声明

interface Entity {
"concept": "Entity", // 产品概念
"name": string, // 实体名称
"uuid": string, // 唯一标识
"tableName": string, // 数据库表名
"description": string, // 实体描述
"origin": "ide" | "sql" | "table" | "excel", // 实体来源
"properties": Array<EntityProperty>, // 实体属性列表
"indexes": Array<EntityIndex>, // 实体索引列表
}

示例

简单示例

{
"concept": "Entity",
"name": "Student",
"tableName": "Student",
"description": "学生信息表",
"origin": "ide",
"properties": [],
"indexes": []
}

带普通字段

{
"concept": "Entity",
"name": "School",
"origin": "ide",
"properties": [
{
"concept": "EntityProperty",
"name": "id",
"label": "主键",
"description": "主键",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long"
},
"required": true,
"primaryKey": true,
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "name",
"label": "学校名称",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "createdTime",
"label": "创建时间",
"description": "创建时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime"
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "updatedTime",
"label": "更新时间",
"description": "更新时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime"
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "createdBy",
"label": "创建者",
"description": "创建者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "updatedBy",
"label": "更新者",
"description": "更新者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}
],
"indexes": []
}

带关联关系

{
"concept": "Entity",
"name": "Student",
"origin": "ide",
"properties": [{
"concept": "EntityProperty",
"name": "id",
"label": "主键",
"description": "主键",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long"
},
"required": true,
"primaryKey": true,
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "schoolId",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long"
},
"relationNamespace": "app.dataSources.defaultDS.entities",
"relationEntity": "School",
"relationProperty": "id",
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "name",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "age",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Integer"
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "createdTime",
"label": "创建时间",
"description": "创建时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime"
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "updatedTime",
"label": "更新时间",
"description": "更新时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime"
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "createdBy",
"label": "创建者",
"description": "创建者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "updatedBy",
"label": "更新者",
"description": "更新者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}],
"indexes": []
}

带索引

{
"concept": "Entity",
"name": "Student",
"origin": "ide",
"properties": [{
"concept": "EntityProperty",
"name": "id",
"label": "主键",
"description": "主键",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Long"
},
"required": true,
"primaryKey": true,
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "name",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "age",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "Integer"
},
"display": {
"inDetail": true,
"inFilter": true,
"inForm": true,
"inTable": true
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "createdTime",
"label": "创建时间",
"description": "创建时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime"
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "updatedTime",
"label": "更新时间",
"description": "更新时间",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "DateTime"
},
"display": {
"inTable": true,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "createdBy",
"label": "创建者",
"description": "创建者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}, {
"concept": "EntityProperty",
"name": "updatedBy",
"label": "更新者",
"description": "更新者",
"typeAnnotation": {
"concept": "TypeAnnotation",
"typeKind": "primitive",
"typeNamespace": "nasl.core",
"typeName": "String"
},
"display": {
"inTable": false,
"inFilter": false,
"inForm": false,
"inDetail": false
},
"rules": [],
"generationRule": "platform"
}],
"indexes": [{
"concept": "EntityIndex",
"name": "idIndex",
"propertyNames": [
"id"
],
"unique": true
}, {
"concept": "EntityIndex",
"name": "timeNameIndex",
"propertyNames": [
"createdTime",
"name"
]
}]
}