引入基于 Basic Auth 的用户认证系统,包括用户管理、登录界面和 API 鉴权 - 新增用户实体和管理功能 - 实现前端登录界面和凭证管理 - 重构 API 鉴权为 Basic Auth 模式 - 添加用户管理脚本工具
73 lines
1.0 KiB
TypeScript
73 lines
1.0 KiB
TypeScript
/**
|
|
* 共享数据模型
|
|
* 用于HTTP和IPC框架的统一数据结构定义
|
|
*/
|
|
|
|
/**
|
|
* 投标项目数据模型
|
|
*/
|
|
export interface BidItem {
|
|
id: string
|
|
title: string
|
|
url: string
|
|
publishDate: string
|
|
source: string
|
|
pin: boolean
|
|
createdAt: string
|
|
updatedAt: string
|
|
}
|
|
|
|
/**
|
|
* AI推荐数据模型
|
|
*/
|
|
export interface AiRecommendation {
|
|
id: string
|
|
title: string
|
|
confidence: number
|
|
createdAt: string
|
|
}
|
|
|
|
/**
|
|
* 爬虫统计信息数据模型
|
|
*/
|
|
export interface CrawlInfoStat {
|
|
source: string
|
|
count: number
|
|
latestUpdate: string
|
|
latestPublishDate: string
|
|
error: string
|
|
}
|
|
|
|
/**
|
|
* 关键词数据模型
|
|
*/
|
|
export interface Keyword {
|
|
id: string
|
|
word: string
|
|
weight: number
|
|
createdAt: string
|
|
updatedAt: string
|
|
}
|
|
|
|
/**
|
|
* 投标查询参数
|
|
*/
|
|
export interface BidQueryParams {
|
|
limit?: number
|
|
offset?: number
|
|
startDate?: string
|
|
endDate?: string
|
|
source?: string
|
|
keyword?: string
|
|
}
|
|
|
|
/**
|
|
* 分页响应
|
|
*/
|
|
export interface PaginatedResponse<T> {
|
|
data: T[]
|
|
total: number
|
|
page: number
|
|
pageSize: number
|
|
}
|