Appearance
dx-func-entity
uniCloud 获取不到DB Schema ,先配置简单实体模块,在service
里面使用,参考service
里面的示例
实体定义示例
javaScript
module.exports = {
table: 'dx-test',
fields: [
{
type: 'string',
key: 'title',
comment: '标题',
},
{
type: 'string',
key: 'image',
comment: '单图',
},
{
type: 'array',
key: 'images',
comment: '多图',
},
{
type: 'string',
key: 'content',
comment: '内容',
},
{
type: 'number',
key: 'create_date',
comment: '创建时间',
},
],
};
module.exports = {
table: 'dx-test',
fields: [
{
type: 'string',
key: 'title',
comment: '标题',
},
{
type: 'string',
key: 'image',
comment: '单图',
},
{
type: 'array',
key: 'images',
comment: '多图',
},
{
type: 'string',
key: 'content',
comment: '内容',
},
{
type: 'number',
key: 'create_date',
comment: '创建时间',
},
],
};
type为:string,number,object,array,boolean
内置实体
- 1、UniIdUsers
- 2、UniIdRoles
- 3、UniIdPermissions
- 4、UniIdLog
- 5、OpendbVerifyCodes
- 6、OpendbMenu
- 7、OpendbCityChina
- 8、OpendbAdminLog
- 9、OpendbAppList
- 10、OpendbAppVersions
- 11、DxResource
- 12、DxResourceGroup
- 13、DxConfig
- 14、DxTest