refactor(backend): 重构动物相关 API 接口

- 更新了动物数据结构和相关类型定义
- 优化了动物列表、详情、创建、更新和删除接口
- 新增了更新动物状态接口
- 移除了与认领记录相关的接口
-调整了 API 响应结构
This commit is contained in:
ylweng
2025-08-31 00:45:46 +08:00
parent 0cad74b06f
commit 8e5295b572
111 changed files with 15290 additions and 1972 deletions

View File

@@ -149,6 +149,60 @@ const options = {
updated_at: {
type: 'string',
format: 'date-time'
},
last_login_at: {
type: 'string',
format: 'date-time',
description: '最后登录时间'
}
}
},
// 管理员模型
Admin: {
type: 'object',
properties: {
id: {
type: 'integer',
description: '管理员ID'
},
username: {
type: 'string',
description: '用户名'
},
email: {
type: 'string',
description: '邮箱'
},
nickname: {
type: 'string',
description: '昵称'
},
avatar: {
type: 'string',
description: '头像URL'
},
role: {
type: 'string',
description: '角色'
},
status: {
type: 'integer',
description: '状态 (1:启用, 0:禁用)'
},
last_login: {
type: 'string',
format: 'date-time',
description: '最后登录时间'
},
created_at: {
type: 'string',
format: 'date-time',
description: '创建时间'
},
updated_at: {
type: 'string',
format: 'date-time',
description: '更新时间'
}
}
},