This commit is contained in:
potato 2024-10-30 16:30:30 +08:00
parent 79dd78795a
commit ba0ae9b9ef
4 changed files with 56 additions and 14 deletions

View File

@ -328,7 +328,8 @@ const i18ns: I18n[] = [
"userManage": "用户管理",
"relationManage": "关系管理",
"consoleHome": "控制台首页",
"labelManage": "标签管理"
"labelManage": "标签管理",
"conmmentManage": "评论管理"
}
},
{
@ -549,6 +550,21 @@ const i18ns: I18n[] = [
}
}
},
{
id: "f70261a2fc23af2a9f459353e5ac1ea3",
namespace: "comment",
language: "zh-CN",
module: "",
position: "oak-app-domain/Comment",
data: {
"name": "评论",
"attr": {
"creator": "创建者",
"content": "内容",
"essay": "文章"
}
}
},
{
id: "b06ea1d96db9f0a2d2f3ff3ad966c9c5",
namespace: "domain",

22
src/entities/Comment.ts Normal file
View File

@ -0,0 +1,22 @@
import { Schema as Essay } from './Essay';
import { EntityDesc, EntityShape } from 'oak-domain/lib/types';
import { String } from 'oak-domain/lib/types/DataType';
import { Schema as User } from 'oak-general-business/lib/entities/User';
//Comment.ToDoIdSubQuery
export interface Schema extends EntityShape {
creator: User;
content: String<1024>;
essay: Essay;
}
export const entityDesc: EntityDesc<Schema> = {
locales: {
zh_CN: {
name: '评论',
attr: {
creator: '创建者',
content: '内容',
essay: '文章',
},
},
},
};

View File

@ -1,3 +1,4 @@
import { message } from 'antd';
import BaseConsole, { Menu } from 'oak-frontend-base/es/features/console';
import { EntityDict } from '@project/oak-app-domain';
import { groupBy } from 'oak-domain/lib/utils/lodash';
@ -38,25 +39,22 @@ const menus: IMenu[] = [
name: 'consoleHome',
icon: 'workbench',
url: '/home',
destEntity: 'userRelation',
destEntity: '',
order: 0,
actions: ['select'],
},
{
name: 'userManage',
icon: 'addpeople',
url: '/userRelation/manage',
parent: 'System',
destEntity: 'userRelation',
actions: ['select'],
destEntity: '',
},
{
name: 'relationManage',
icon: 'share',
url: '/relation/entityList',
parent: 'System',
destEntity: 'userRelation',
actions: ['select'],
destEntity: '',
},
// category
{
@ -64,16 +62,14 @@ const menus: IMenu[] = [
icon: 'stealth',
url: '/category/list',
order: 2,
destEntity: 'userRelation',
actions: ['select'],
destEntity: '',
},
{
name: 'essayManage',
icon: 'barrage',
url: '/essay/list',
order: 3,
destEntity: 'userRelation',
actions: ['select'],
destEntity: '',
},
// 标签关联
{
@ -81,9 +77,16 @@ const menus: IMenu[] = [
icon: 'accessory',
url: '/label/list',
order: 4,
destEntity: 'userRelation',
actions: ['select'],
destEntity: '',
},
//评论管理
{
name: 'commentManage',
icon: 'message',
url:'/comment/list',
destEntity: '',
order:5,
}
];
export default class Console extends BaseConsole<EntityDict, IMenu> {

View File

@ -5,5 +5,6 @@
"userManage": "用户管理",
"relationManage": "关系管理",
"consoleHome" : "控制台首页",
"labelManage": "标签管理"
"labelManage": "标签管理",
"conmmentManage":"评论管理"
}