first commit

This commit is contained in:
liu
2026-07-13 15:23:29 +08:00
commit 50885a98c8
473 changed files with 33772 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
export interface IAgent {
id?: number;
namespace: string;
name: string;
icon: string;
description?: string | null;
tags?: string[];
enabled: boolean;
created_at?: string;
updated_at?: string;
}
export interface IAgentConversation {
id?: string;
user_id?: number | null;
username?: string;
title?: string;
message_count?: number;
created_at?: string;
updated_at?: string;
}
export interface IAgentMessage {
id?: string;
conversation_id?: string;
user_id?: number | null;
agent?: string;
role?: string;
content?: string;
attachments?: Record<string, any> | null;
tool_calls?: Record<string, any> | null;
tool_results?: Record<string, any> | null;
usage?: Record<string, any> | null;
meta?: Record<string, any> | null;
created_at?: string;
updated_at?: string;
}
+14
View File
@@ -0,0 +1,14 @@
/**
* AI Feature
*/
export type AiFeature = 'default';
/**
* AI lab
*/
export type AiLab = 'anthropic'| 'azure'| 'bedrock'| 'cohere'| 'deepseek'| 'eleven'| 'gemini'| 'groq'| 'jina'| 'mistral'| 'ollama'| 'openai'| 'openrouter'| 'voyageai'| 'xai';
/**
* Ai List
*/
export type AiList = Record<AiFeature, string[]>;
+18
View File
@@ -0,0 +1,18 @@
import type { ISysFileInfo } from '@/domain/iSysFile';
/** 首页轮播图 */
export interface ICarousel {
id?: number;
/** 轮播图标题 */
title: string;
/** 轮播图图片信息(ISysFileInfo 对象) */
image: ISysFileInfo | string;
/** 跳转链接 */
link?: string;
/** 状态:0=启用,1=禁用 */
status: number;
/** 排序 */
sort: number;
created_at?: string;
updated_at?: string;
}
+14
View File
@@ -0,0 +1,14 @@
export interface IConfigGroup {
/** ID */
id?: number;
/** 标题 */
title?: string;
/** 键 */
key?: string;
/** 描述 */
remark?: string;
/** 创建时间 */
created_at?: Date;
/** 更新时间 */
updated_at?: Date;
}
+32
View File
@@ -0,0 +1,32 @@
export type ConfigType = 'Input' | 'TextArea' | 'InputNumber' | 'Switch' | 'Radio' | 'Checkbox';
export interface IConfigItem {
/** ID */
id?: number;
/** 键 */
key?: string;
/** 标题 */
title?: string;
/** 描述 */
describe?: string;
/** 值 */
values?: string;
/** 类型 */
type?: ConfigType;
/** 选项 */
options?: string;
/** 选项JSON */
options_json?: string;
/** 属性 */
props?: string;
/** 属性JSON */
props_json?: string;
/** 组ID */
group_id?: number;
/** 排序 */
sort?: number;
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
}
+18
View File
@@ -0,0 +1,18 @@
export interface IDict {
/** ID */
id?: number;
/** 字典名称 */
name?: string;
/** 字典编码 */
code?: string;
/** 字典描述 */
describe?: string;
/** 状态:0正常 1停用 */
status?: number;
/** 排序 */
sort?: number;
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
}
+36
View File
@@ -0,0 +1,36 @@
export interface IDictItem {
/** ID */
id?: number;
/** 字典ID */
dict_id?: number;
/** 字典标签 */
label?: string;
/** 字典键值 */
value?: string;
/** 颜色 */
color?: string;
/** 状态:0正常 1停用 */
status?: number;
/** 排序 */
sort?: number;
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
}
/** Ant Design 颜色选项 */
export const COLORS = [
{ label: '默认', value: 'default' },
{ label: '蓝色', value: 'blue' },
{ label: '绿色', value: 'green' },
{ label: '红色', value: 'red' },
{ label: '橙色', value: 'orange' },
{ label: '紫色', value: 'purple' },
{ label: '青色', value: 'cyan' },
{ label: '金色', value: 'gold' },
{ label: '绿黄色', value: 'lime' },
{ label: '极客蓝', value: 'geekblue' },
{ label: '品红', value: 'magenta' },
{ label: '火山红', value: 'volcano' },
] as const;
+18
View File
@@ -0,0 +1,18 @@
import type { ISysFileInfo } from '@/domain/iSysFile';
/** 首页宫格导航 */
export interface IGridNav {
id?: number;
/** 导航标题 */
title: string;
/** 导航图标信息(ISysFileInfo 对象) */
image: ISysFileInfo | string;
/** 跳转链接 */
link?: string;
/** 状态:0=启用,1=禁用 */
status: number;
/** 排序 */
sort: number;
created_at?: string;
updated_at?: string;
}
+33
View File
@@ -0,0 +1,33 @@
/** 部门类型 */
export interface ISysDept {
/** 部门ID */
id?: number;
/** 部门编码 */
code?: string;
/** 部门名称 */
name?: string;
/** 部门负责人 */
leader?: string;
/** 部门类型 0:公司 1:部门 2:岗位 */
type?: number;
/** 父级ID */
parent_id?: number;
/** 部门邮箱 */
email?: string;
/** 部门地址 */
address?: string;
/** 部门电话 */
phone?: string;
/** 部门备注 */
remark?: string;
/** 部门排序 */
sort?: number;
/** 部门状态 0:正常 1:停用 */
status?: number;
/** 子部门 */
children?: ISysDept[];
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
}
+32
View File
@@ -0,0 +1,32 @@
export interface ISysFileInfo {
/** 文件ID */
id?: number;
/** 文件夹ID */
group_id?: number;
/** 上传渠道 10:系统用户,20:APP用户 */
channel?: number;
/** 存储磁盘 local/s3 */
disk?: string;
/** 文件类型 10:图片,20:音频,30:视频,40:压缩包,50:文档,99:其它 */
file_type?: number;
/** 文件名 */
file_name?: string;
/** 文件路径 */
file_path?: string;
/** 预览URL */
preview_url?: string;
/** 文件访问URL */
file_url?: string;
/** 文件大小 */
file_size?: number;
/** 文件扩展名 */
file_ext?: string;
/** 上传用户ID */
uploader_id?: number;
/** 软删除时间 */
deleted_at?: string;
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
}
+21
View File
@@ -0,0 +1,21 @@
// 文件夹相关类型定义
export interface ISysFileGroup {
/** 文件夹ID */
id: number;
/** 文件夹名称 */
name: string;
/** 排序 */
sort?: number;
/** 父文件夹ID */
parent_id?: string;
/** 描述 */
describe?: string;
/** 文件总数 */
countFiles?: number;
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
/** 子文件夹 */
children?: ISysFileGroup[];
}
+22
View File
@@ -0,0 +1,22 @@
export default interface ISysLoginRecord {
/** 记录ID */
id?: number;
/** 浏览器 */
browser?: string;
/** IP 地址 */
ipaddr?: string;
/** 登录地址 */
login_location?: string;
/** 登录时间 */
login_time?: string;
/** 登录提示 */
msg?: string;
/** 登录设备 */
os?: string;
/** 登陆状态 */
status?: string;
/** 用户ID */
user_id?: number;
/** 用户名 */
username?: string;
}
+20
View File
@@ -0,0 +1,20 @@
export interface ISysRole {
/** 角色ID */
id?: number;
/** 角色名称 */
name?: string;
/** 排序 */
sort?: number;
/** 拥有的权限ID */
ruleIds?: number[];
/** 角色描述 */
description?: string;
/** 角色用户数量 */
countUser?: number;
/** 启用状态 */
status?: number;
/** 创建时间 */
created_at?: string;
/** 更新时间 */
updated_at?: string;
}
+36
View File
@@ -0,0 +1,36 @@
/** 规则类型 */
export type IRuleType = 'menu' | 'route' | 'rule';
/** 菜单路由规则数据类型 */
export interface ISysRule {
/** 权限ID */
id?: number;
/** 上级ID,顶级菜单的 pid 为 0 */
pid?: number;
/** 权限类型,分为菜单、路由、权限 */
type?: IRuleType;
/** 权限的唯一标识 */
key?: string;
/** 排序 */
order?: number;
/** 名称 */
name?: string;
/** 菜单的路径,menu 的路径会被当作前缀路由 */
path?: string;
/** 路由的图标 */
icon?: string;
/** 多语言 */
local?: string;
/** 是否隐藏 */
hidden?: number;
/** 是否启用 */
status?: number;
/** 是否外链 */
link?: number;
}
/** 菜单类型 */
export interface IMenus extends ISysRule {
/** 子菜单 */
children?: IMenus[];
}
+46
View File
@@ -0,0 +1,46 @@
export default interface ISysUser {
/** 用户ID */
id?: number;
/** 用户名 */
username?: string;
/** 头像ID */
avatar_id?: number;
/** 创建时间 */
created_at?: string;
/** 部门ID */
dept_id?: number;
/** 邮箱 */
email?: string;
/** 邮箱验证时间 */
email_verified_at?: string;
/** 最后登录IP */
login_ip?: string;
/** 最后登录时间 */
login_time?: string;
/** 手机号 */
mobile?: string;
/** 昵称 */
nickname?: string;
/** 性别 */
sex?: number;
/** 个人简介 */
bio: string;
/** 用户状态 */
status?: number;
/** 创建时间 */
updated_at?: string;
// 下面是附加数据
/** 头像Url */
avatar_url?: string;
/** 角色 */
roles_field?: {
/** 角色ID */
role_id: number;
/** 角色名称 */
name: string;
}[];
/** 部门名称 */
dept_name?: string;
}