Files
property-manager-side/wuye-manager-uniapp/jsdoc.types.js

44 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 全局 JSDoc 类型定义 全项目所有文件通用
/**
* 【全局】通用分页接口返回结构
* @template T - 列表项类型
* @typedef RowsResult 分页结构
* @property {number} code 响应码,200=成功
* @property {string} msg 响应消息
* @property {number} total 总条数
* @property {T[]} rows 数据列表
*/
/**
* 返回结果
* @template T
* @typedef {Object} DataResult
* @property {T} data 列表数据
* @property {number} code 响应码,200=成功
* @property {string} msg 响应消息
*/
/**
* 分页参数
* @typedef {Object} PageType
* @property {number} pageSize 每页条数
* @property {number} pageNum 当前页码
*/
/**
* 通用请求参数(T 不传时 = PageType)
* @template [T=undefined]
* @typedef {T extends undefined ? PageType : PageType & T} RequestParams
*/
/**
* 【全局】角色标识枚举
* @typedef {'manage'|'repair'|'inspection'|'EquipmentMaintenance'|'complainUser'} RoleKeyEnum
* @enum {RoleKeyEnum}
* @property {'manage'} manage - 物业管理员
* @property {'repair'} repair - 小区维修人员
* @property {'inspection'} inspection - 巡检人员
* @property {'EquipmentMaintenance'} EquipmentMaintenance - 设备维护人员
* @property {'complainUser'} complainUser - 投诉处理人员
*/