109 lines
1.8 KiB
TypeScript
109 lines
1.8 KiB
TypeScript
export interface Pet {
|
|
_id: string
|
|
ownerId: string
|
|
name: string
|
|
species: 'dog' | 'cat' | 'other'
|
|
breed: string
|
|
gender: 'male' | 'female'
|
|
birthday?: string
|
|
age: string
|
|
emoji: string
|
|
photos: string[]
|
|
tags: string[]
|
|
bio?: string
|
|
}
|
|
|
|
export interface UserProfile {
|
|
_id: string
|
|
openid: string
|
|
nickName: string
|
|
avatarUrl: string
|
|
handle: string
|
|
location: string
|
|
bio: string
|
|
stats: {
|
|
posts: number
|
|
friends: number
|
|
likes: number
|
|
}
|
|
lastLocation?: GeoPoint
|
|
isOnline: boolean
|
|
lastSeen: string
|
|
pets: Pet[]
|
|
}
|
|
|
|
export interface GeoPoint {
|
|
latitude: number
|
|
longitude: number
|
|
}
|
|
|
|
export interface LocationTag {
|
|
name: string
|
|
latitude: number
|
|
longitude: number
|
|
address?: string
|
|
}
|
|
|
|
export interface Post {
|
|
_id: string
|
|
authorId: string
|
|
author?: UserProfile
|
|
petId?: string
|
|
pet?: Pet
|
|
content: string
|
|
images: string[]
|
|
video?: string
|
|
location?: LocationTag
|
|
hashtags: string[]
|
|
mood?: string
|
|
likeCount: number
|
|
commentCount: number
|
|
isLiked?: boolean
|
|
createdAt: string
|
|
}
|
|
|
|
export interface Comment {
|
|
_id: string
|
|
postId: string
|
|
authorId: string
|
|
author?: UserProfile
|
|
content: string
|
|
createdAt: string
|
|
}
|
|
|
|
export interface Message {
|
|
_id: string
|
|
fromId: string
|
|
from?: UserProfile
|
|
toId: string
|
|
content: string
|
|
type: 'greeting' | 'text' | 'image'
|
|
isRead: boolean
|
|
createdAt: string
|
|
}
|
|
|
|
export interface NearbyUser {
|
|
userId: string
|
|
user: UserProfile
|
|
pet: Pet
|
|
distance: number
|
|
distanceText: string
|
|
isOnline: boolean
|
|
lastSeenText: string
|
|
location: GeoPoint
|
|
}
|
|
|
|
export interface TabBarItem {
|
|
pagePath: string
|
|
text: string
|
|
icon: string
|
|
activeIcon: string
|
|
selected: boolean
|
|
}
|
|
|
|
export interface AppGlobalData {
|
|
userInfo: UserProfile | null
|
|
isLoggedIn: boolean
|
|
currentLocation: GeoPoint | null
|
|
}
|