/**
 * Mobile Session DTOs
 *
 * @module Mobile
 */

import { MobileSessionStatus } from '../entities/mobile-session.entity';

export class CreateMobileSessionDto {
  userId: string;
  deviceId: string;
  tenantId: string;
  branchId?: string;
  activeProfileId?: string;
  activeProfileCode?: string;
  appVersion?: string;
  platform?: string;
  osVersion?: string;
}

export class UpdateMobileSessionDto {
  status?: MobileSessionStatus;
  branchId?: string;
  activeProfileId?: string;
  activeProfileCode?: string;
  isOfflineMode?: boolean;
  lastLatitude?: number;
  lastLongitude?: number;
  appVersion?: string;
}

export class UpdateLocationDto {
  latitude: number;
  longitude: number;
}

export class MobileSessionResponseDto {
  id: string;
  userId: string;
  deviceId: string;
  tenantId: string;
  branchId?: string;
  status: MobileSessionStatus;
  activeProfileId?: string;
  activeProfileCode?: string;
  isOfflineMode: boolean;
  offlineSince?: Date;
  lastSyncAt?: Date;
  pendingSyncCount: number;
  lastLatitude?: number;
  lastLongitude?: number;
  lastLocationAt?: Date;
  appVersion?: string;
  platform?: string;
  osVersion?: string;
  startedAt: Date;
  lastActivityAt: Date;
  expiresAt?: Date;
}

export class MobileSessionFilterDto {
  userId?: string;
  deviceId?: string;
  branchId?: string;
  status?: MobileSessionStatus;
  isOfflineMode?: boolean;
  limit?: number;
  offset?: number;
}
