/**
 * User Entity Types
 * API 스펙 기반 타입 정의
 */

// 로그인 요청/응답
export interface LoginRequest {
  email: string;
  password: string;
}

export interface LoginResponse {
  token: string;
  userId: string; // UUID format
  userName: string;
  role: string;
  email: string;
}

// 회원가입 요청/응답
export interface RegisterRequest {
  name: string;
  phoneNumber: string;
  email: string;
  password: string;
  storeName: string;
  industry?: string;
  address: string;
  businessHours?: string;
}

export interface RegisterResponse {
  token: string;
  userId: string; // UUID format
  userName: string;
  storeId: string; // UUID format
  storeName: string;
}

// 로그아웃 응답
export interface LogoutResponse {
  success: boolean;
  message: string;
}

// 프로필 조회/수정
export interface ProfileResponse {
  userId: string; // UUID format
  userName: string;
  phoneNumber: string;
  email: string;
  role: string;
  storeId: string; // UUID format
  storeName: string;
  industry: string;
  address: string;
  businessHours: string;
  createdAt: string;
  lastLoginAt: string;
}

export interface UpdateProfileRequest {
  name?: string;
  phoneNumber?: string;
  email?: string;
  storeName?: string;
  industry?: string;
  address?: string;
  businessHours?: string;
}

// 비밀번호 변경
export interface ChangePasswordRequest {
  currentPassword: string;
  newPassword: string;
}

// User 상태
export interface User {
  userId: string; // UUID format
  userName: string;
  email: string;
  role: string;
  phoneNumber?: string;
  storeId?: string; // UUID format
  storeName?: string;
  industry?: string;
  address?: string;
  businessHours?: string;
}

// 인증 상태
export interface AuthState {
  user: User | null;
  token: string | null;
  isAuthenticated: boolean;
  isLoading: boolean;
}
