Skip to content

Commit

Permalink
新增应用管理
Browse files Browse the repository at this point in the history
  • Loading branch information
arterli committed Feb 13, 2023
1 parent 2e68755 commit e2d8798
Show file tree
Hide file tree
Showing 20 changed files with 1,156 additions and 319 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
schedule:
- cron: '0 2 * * *'

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
node-version: [16]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- name: Checkout Git Source
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm i

- name: Continuous Integration
run: npm run ci

- name: Code Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
114 changes: 57 additions & 57 deletions app/contract/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {

},
sys_models_add: {
app: { type: 'string', description: '所属应用', required: true },
app: { type: 'string', description: '所属应用', required: false },
desc: { type: 'string', description: '模型说明', required: true },
name: { type: 'string', description: '模型名称', required: true },
oldName: { type: 'string', description: '改变后的模型名称', required: false },
Expand Down Expand Up @@ -78,8 +78,8 @@ module.exports = {
booleantype: { type: 'string', description: 'BOOLEAN类型' },
comment: { type: 'string', description: '字段说明' },
createdAt: { type: 'string', description: '创建时间' },
defaultValue: { type: 'string', description: '默认值' },
defaulttonow: { type: 'boolean', description: '默认当前时间' },
defaultValue: { type: 'string', description: '默认值' },
edit: { type: 'boolean', description: '编辑' },
enumValue: { type: 'string', description: '枚举值' },
id: { type: 'string', description: '主键' },
Expand All @@ -104,8 +104,8 @@ module.exports = {
autoIncrement: { type: 'boolean', description: '自动递增', required: false },
booleantype: { type: 'string', description: 'BOOLEAN类型', required: false },
comment: { type: 'string', description: '字段说明', required: true },
defaultValue: { type: 'string', description: '默认值', required: false },
defaulttonow: { type: 'boolean', description: '默认当前时间', required: false },
defaultValue: { type: 'string', description: '默认值', required: false },
edit: { type: 'boolean', description: '编辑', required: false },
enumValue: { type: 'string', description: '枚举值', required: false },
lengths: { type: 'string', description: '长度', required: false },
Expand All @@ -127,8 +127,8 @@ module.exports = {
autoIncrement: { type: 'boolean', description: '自动递增' },
booleantype: { type: 'string', description: 'BOOLEAN类型' },
comment: { type: 'string', description: '字段说明' },
defaultValue: { type: 'string', description: '默认值' },
defaulttonow: { type: 'boolean', description: '默认当前时间' },
defaultValue: { type: 'string', description: '默认值' },
edit: { type: 'boolean', description: '编辑' },
enumValue: { type: 'string', description: '枚举值' },
lengths: { type: 'string', description: '长度' },
Expand Down Expand Up @@ -183,8 +183,8 @@ module.exports = {
parent_uuid: { type: 'string', description: '父表' },
sort: { type: 'string', description: '排序' },
targetKey: { type: 'string', description: '父键' },
throughKey: { type: 'string', description: '中间键' },
through_uuid: { type: 'string', description: '中间表' },
throughKey: { type: 'string', description: '中间键' },
type: { type: 'string', description: '关联类型' },
updatedAt: { type: 'string', description: '更新时间' },
uuid: { type: 'string', description: 'uuid' },
Expand All @@ -198,8 +198,8 @@ module.exports = {
parent_uuid: { type: 'string', description: '父表', required: true },
sort: { type: 'string', description: '排序', required: true },
targetKey: { type: 'string', description: '父键', required: true },
throughKey: { type: 'string', description: '中间键', required: false },
through_uuid: { type: 'string', description: '中间表', required: false },
throughKey: { type: 'string', description: '中间键', required: false },
type: { type: 'string', description: '关联类型', required: true },

},
Expand All @@ -211,8 +211,8 @@ module.exports = {
parent_uuid: { type: 'string', description: '父表' },
sort: { type: 'string', description: '排序' },
targetKey: { type: 'string', description: '父键' },
throughKey: { type: 'string', description: '中间键' },
through_uuid: { type: 'string', description: '中间表' },
throughKey: { type: 'string', description: '中间键' },
type: { type: 'string', description: '关联类型' },

},
Expand Down Expand Up @@ -432,7 +432,7 @@ module.exports = {
sort: { type: 'string', description: '排序同级有效越小越靠前' },
status: { type: 'string', description: '数据状态(0-禁用,1-正常,2-待审核,3-草稿)' },
tags: { type: 'string', description: '标签' },
template: { type: 'string', description: '模版详情' },
template: { type: 'string', description: '模板详情' },
title: { type: 'string', description: '内容标题' },
type: { type: 'string', description: '内容类型(1-目录,2-主题,3-段落)' },
updatedAt: { type: 'string', description: '更新时间' },
Expand All @@ -456,7 +456,7 @@ module.exports = {
sort: { type: 'string', description: '排序同级有效越小越靠前', required: false },
status: { type: 'string', description: '数据状态(0-禁用,1-正常,2-待审核,3-草稿)', required: false },
tags: { type: 'string', description: '标签', required: false },
template: { type: 'string', description: '模版详情', required: false },
template: { type: 'string', description: '模板详情', required: false },
title: { type: 'string', description: '内容标题', required: false },
type: { type: 'string', description: '内容类型(1-目录,2-主题,3-段落)', required: true },
user_uuid: { type: 'string', description: '作者uuid', required: false },
Expand All @@ -479,7 +479,7 @@ module.exports = {
sort: { type: 'string', description: '排序同级有效越小越靠前' },
status: { type: 'string', description: '数据状态(0-禁用,1-正常,2-待审核,3-草稿)' },
tags: { type: 'string', description: '标签' },
template: { type: 'string', description: '模版详情' },
template: { type: 'string', description: '模板详情' },
title: { type: 'string', description: '内容标题' },
type: { type: 'string', description: '内容类型(1-目录,2-主题,3-段落)' },
user_uuid: { type: 'string', description: '作者uuid' },
Expand Down Expand Up @@ -735,15 +735,15 @@ module.exports = {

},

// cms模版管理
// cms模板管理
cms_template_item: {
author: { type: 'string', description: '作者' },
createdAt: { type: 'string', description: '创建时间' },
id: { type: 'string', description: '主键' },
isu: { type: 'boolean', description: '正在使用' },
name: { type: 'string', description: '模版名称' },
path: { type: 'string', description: '模版目录' },
sys: { type: 'boolean', description: '系统模版' },
name: { type: 'string', description: '模板名称' },
path: { type: 'string', description: '模板目录' },
sys: { type: 'boolean', description: '系统模板' },
updatedAt: { type: 'string', description: '更新时间' },
uuid: { type: 'string', description: 'uuid' },
version: { type: 'string', description: '版本号' },
Expand All @@ -752,34 +752,34 @@ module.exports = {
cms_template_add: {
author: { type: 'string', description: '作者', required: true },
isu: { type: 'boolean', description: '正在使用', required: false },
name: { type: 'string', description: '模版名称', required: true },
path: { type: 'string', description: '模版目录', required: true },
sys: { type: 'boolean', description: '系统模版', required: false },
name: { type: 'string', description: '模板名称', required: true },
path: { type: 'string', description: '模板目录', required: true },
sys: { type: 'boolean', description: '系统模板', required: false },
uuid: { type: 'string', description: 'uuid', required: true },
version: { type: 'string', description: '版本号', required: true },

},
cms_template_edit: {
author: { type: 'string', description: '作者' },
isu: { type: 'boolean', description: '正在使用' },
name: { type: 'string', description: '模版名称' },
path: { type: 'string', description: '模版目录' },
sys: { type: 'boolean', description: '系统模版' },
name: { type: 'string', description: '模板名称' },
path: { type: 'string', description: '模板目录' },
sys: { type: 'boolean', description: '系统模板' },
uuid: { type: 'string', description: 'uuid' },
version: { type: 'string', description: '版本号' },

},

// 模版文件
// 模板文件
cms_template_list_item: {
createdAt: { type: 'string', description: '创建时间' },
html: { type: 'string', description: '文件内容' },
id: { type: 'string', description: '主键' },
isd: { type: 'boolean', description: '是否默认' },
isu: { type: 'boolean', description: '使用中' },
name: { type: 'string', description: '文件名称' },
template_uuid: { type: 'string', description: '模版UUID' },
title: { type: 'string', description: '模版名称' },
template_uuid: { type: 'string', description: '模板UUID' },
title: { type: 'string', description: '模板名称' },
type: { type: 'string', description: '类型' },
updatedAt: { type: 'string', description: '更新时间' },
uuid: { type: 'string', description: 'UUID' },
Expand All @@ -790,8 +790,8 @@ module.exports = {
isd: { type: 'boolean', description: '是否默认', required: false },
isu: { type: 'boolean', description: '使用中', required: false },
name: { type: 'string', description: '文件名称', required: true },
template_uuid: { type: 'string', description: '模版UUID', required: true },
title: { type: 'string', description: '模版名称', required: true },
template_uuid: { type: 'string', description: '模板UUID', required: true },
title: { type: 'string', description: '模板名称', required: true },
type: { type: 'string', description: '类型', required: true },
uuid: { type: 'string', description: 'UUID', required: true },

Expand All @@ -801,43 +801,20 @@ module.exports = {
isd: { type: 'boolean', description: '是否默认' },
isu: { type: 'boolean', description: '使用中' },
name: { type: 'string', description: '文件名称' },
template_uuid: { type: 'string', description: '模版UUID' },
title: { type: 'string', description: '模版名称' },
template_uuid: { type: 'string', description: '模板UUID' },
title: { type: 'string', description: '模板名称' },
type: { type: 'string', description: '类型' },
uuid: { type: 'string', description: 'UUID' },

},

// 系统配置
sys_config_item: {
createdAt: { type: 'string', description: '创建时间' },
id: { type: 'string', description: '主键' },
label: { type: 'string', description: '配置名称' },
name: { type: 'string', description: '配置key' },
updatedAt: { type: 'string', description: '更新时间' },
value: { type: 'string', description: '配置value' },

},
sys_config_add: {
label: { type: 'string', description: '配置名称', required: true },
name: { type: 'string', description: '配置key', required: true },
value: { type: 'string', description: '配置value', required: true },

},
sys_config_edit: {
label: { type: 'string', description: '配置名称' },
name: { type: 'string', description: '配置key' },
value: { type: 'string', description: '配置value' },

},

// 应用管理
// 应用表
sys_application_item: {
author: { type: 'string', description: '作者' },
createdAt: { type: 'string', description: '创建时间' },
explain: { type: 'string', description: '说明' },
id: { type: 'string', description: '主键' },
intro: { type: 'string', description: '简介' },
intro: { type: 'string', description: 'intro' },
name: { type: 'string', description: '应用标识' },
sys: { type: 'boolean', description: '是否系统' },
title: { type: 'string', description: '应用名称' },
Expand All @@ -846,24 +823,47 @@ module.exports = {

},
sys_application_add: {
author: { type: 'string', description: '作者', required: true },
author: { type: 'string', description: '作者', required: false },
explain: { type: 'string', description: '说明', required: false },
intro: { type: 'string', description: '简介', required: false },
intro: { type: 'string', description: 'intro', required: false },
name: { type: 'string', description: '应用标识', required: true },
sys: { type: 'boolean', description: '是否系统', required: true },
sys: { type: 'boolean', description: '是否系统', required: false },
title: { type: 'string', description: '应用名称', required: true },
version: { type: 'string', description: '版本', required: true },
version: { type: 'string', description: '版本', required: false },

},
sys_application_edit: {
author: { type: 'string', description: '作者' },
explain: { type: 'string', description: '说明' },
intro: { type: 'string', description: '简介' },
intro: { type: 'string', description: 'intro' },
name: { type: 'string', description: '应用标识' },
sys: { type: 'boolean', description: '是否系统' },
title: { type: 'string', description: '应用名称' },
version: { type: 'string', description: '版本' },

},

// 系统配置
sys_config_item: {
createdAt: { type: 'string', description: '创建时间' },
id: { type: 'string', description: '主键' },
label: { type: 'string', description: '配置名称' },
name: { type: 'string', description: '配置key' },
updatedAt: { type: 'string', description: '更新时间' },
value: { type: 'string', description: '配置value' },

},
sys_config_add: {
label: { type: 'string', description: '配置名称', required: true },
name: { type: 'string', description: '配置key', required: true },
value: { type: 'string', description: '配置value', required: true },

},
sys_config_edit: {
label: { type: 'string', description: '配置名称' },
name: { type: 'string', description: '配置key' },
value: { type: 'string', description: '配置value' },

},

};
31 changes: 31 additions & 0 deletions app/core/initData/sys_application.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"RECORDS": [
{
"name": "sys",
"title": "系统应用",
"intro": "系统应用",
"explain": "系统应用",
"author": "arterli",
"version": "1.0",
"sys": 1
},
{
"name": "mc",
"title": "用户中心",
"intro": "用户中心",
"explain": "用户中心",
"author": "arterli",
"version": "1.0",
"sys": 0
},
{
"name": "cms",
"title": "内容管理系统",
"intro": "内容管理系统",
"explain": "内容管理系统",
"author": "arterli",
"version": "1.0",
"sys": 0
}
]
}
Loading

0 comments on commit e2d8798

Please sign in to comment.