Files
taimed-international-app/types/user.ts

119 lines
1.8 KiB
TypeScript

// types/user.ts
/**
* 用户信息接口
*/
export interface IUserInfo {
id: number
name: string
avatar: string
email: string
phone?: string
token?: string
[key: string]: any
}
/**
* 登录响应接口
*/
export interface ILoginResponse {
userInfo: IUserInfo
token: {
token: string
[key: string]: any
}
}
/**
* 协议内容接口
*/
export interface IAgreement {
id: number
title: string
content: string
[key: string]: any
}
/**
* 登录表单接口
*/
export interface ILoginForm {
// 验证码登录
email?: string
code?: string
// 密码登录
phoneEmail?: string
password?: string
// 通用
agree: boolean
}
/**
* 忘记密码表单接口
*/
export interface IForgetPasswordForm {
email: string
code: string
password: string
confirmPassword: string
}
/**
* VIP信息接口
*/
export interface IVipInfo {
id: number
endTime: string
vipType: number
[key: string]: any
}
/**
* VIP套餐接口
*/
export interface IVipPackage {
id: number
dictType: string // 价格
dictValue: string // 产品ID
money: number
priceTypeId: number
remark: string // 时长(天数)
[key: string]: any
}
/**
* 交易记录接口
*/
export interface ITransaction {
id: number
orderType: string // '充值' | '消费'
changeAmount: number
remark: string
createTime: string
[key: string]: any
}
/**
* 反馈表单接口
*/
export interface IFeedbackForm {
type: string // 问题类型
account: string // 账号
relation?: string // 订单编号(可选)
content: string // 问题描述
contactInformation: string // 联系电话
image?: string // 截图(多张用逗号分隔)
}
/**
* 分页数据接口
*/
export interface IPageData<T> {
records: T[]
total: number
size: number
current: number
pages: number
[key: string]: any
}