diff --git a/client/mobile/api.ts b/client/mobile/api.ts index c6ff6d1..bc55bc6 100644 --- a/client/mobile/api.ts +++ b/client/mobile/api.ts @@ -2,9 +2,9 @@ import axios from 'axios'; import type { MinioUploadPolicy, OSSUploadPolicy } from '@d8d-appcontainer/types'; import 'dayjs/locale/zh-cn'; import type { - User, FileLibrary, FileCategory, KnowInfo, - AuthContextType, ThemeContextType, Attachment, ThemeSettings, - SystemSetting, SystemSettingGroupData + User, FileLibrary, FileCategory, ThemeSettings, + SystemSetting, SystemSettingGroupData, + LoginLocation, LoginLocationDetail } from '../share/types.ts'; diff --git a/client/share/types.ts b/client/share/types.ts index 9f42d02..d34f7c1 100644 --- a/client/share/types.ts +++ b/client/share/types.ts @@ -408,3 +408,43 @@ export interface KnowInfo { /** 更新时间 */ updated_at: Date; } + +// 登录位置详细信息 +export interface LoginLocationDetail { + /** 记录ID */ + id: number; + /** 用户ID */ + user_id: number; + /** 登录时间 */ + login_time: string; + /** IP地址 */ + ip_address: string; + /** 用户代理 */ + user_agent: string; + /** 纬度 */ + latitude: number | null; + /** 经度 */ + longitude: number | null; + /** 位置名称 */ + location_name?: string; + /** 关联用户信息 */ + user?: { + id: number; + username: string; + nickname?: string; + }; +} + +// 登录位置信息 +export interface LoginLocation { + /** 纬度 */ + latitude: number | null; + /** 经度 */ + longitude: number | null; + /** IP地址 */ + ip_address?: string; + /** 用户代理 */ + user_agent?: string; + /** 登录时间 */ + login_time?: string; +}