import type { PageParam } from '@/api';
import type { Role } from '../../role/model';
import type { Menu } from '../../menu/model';
import { Company } from '@/api/system/company/model';
import { UserProfile } from '@/api/love/user-profile/model';

/**
 * 用户
 */
export interface User {
  // 账号类型
  type?: number;
  // 用户id
  userId?: number;
  // 账号
  username?: string;
  // 密码
  password?: string;
  // 昵称
  nickname?: string;
  // 别名
  alias?: string;
  // 头像
  avatar?: string;
  // 性别(字典)
  sex?: string;
  // 手机号
  phone?: string;
  // 邮箱
  email?: string;
  // 出生日期
  birthday?: string;
  age?: number;
  // 详细地址
  address?: string;
  longitude?: string;
  latitude?: string;
  // 会员等级ID
  gradeId?: number;
  // 个人简介
  introduction?: string;
  // 机构id
  organizationId?: number;
  // 状态, 0正常, 1冻结
  status?: number;
  // 性别名称
  sexName?: string;
  province?: string;
  city?: string;
  region?: string;
  // 机构名称
  organizationName?: string;
  // 角色列表
  roles?: Role[];
  // 权限列表
  authorities?: Menu[];
  payTime?: string;
  deliveryTime?: string;
  receiptTime?: string;
  // 创建时间
  createTime?: string;
  // 租户ID
  tenantId?: number;
  // 租户名称
  tenantName?: string;
  logo?: string;
  companyInfo?: Company;
  // 商户名称
  merchantName?: string;
  // 商户编号
  merchantCode?: string;
  code?: string;
  //
  remember?: boolean;
  balance?: number;
  points?: number;
  payMoney?: number;
  setting?: string;
  realName?: string;
  companyName?: string;
  gradeName?: string;
  idCard?: string;
  comments?: string;
  recommend?: number;
  userProfile?: UserProfile;
  system?: any;
}

/**
 * 用户搜索条件
 */
export interface UserParam extends PageParam {
  keywords?: string;
  type?: any;
  userId?: number;
  username?: string;
  nickname?: string;
  realName?: string;
  gradeId?: unknown;
  gradeName?: string;
  companyName?: string;
  city?: string;
  cityMate?: string;
  sex?: string;
  phone?: string;
  status?: number;
  organizationId?: number;
  parentId?: number;
  sexName?: string;
  merchantCode?: string;
  roleId?: string;
  showProfile?: boolean;
  isStaff?: boolean;
  fake?: number;
}
