import { AppVersion } from '../entities/app-version.entity';
import { Platform } from '../enums/platform.enum';
import { AppType } from '../enums/app-type.enum';

export const APP_VERSION_REPOSITORY = Symbol('APP_VERSION_REPOSITORY');

export interface IAppVersionRepository {
  findById(id: string): Promise<AppVersion | null>;
  findLatestEnabled(appType: AppType, platform: Platform): Promise<AppVersion | null>;
  findByPlatformAndCode(appType: AppType, platform: Platform, versionCode: number): Promise<AppVersion | null>;
  findByFilters(appType?: AppType, platform?: Platform, includeDisabled?: boolean): Promise<AppVersion[]>;
  create(data: Partial<AppVersion>): AppVersion;
  save(entity: AppVersion): Promise<AppVersion>;
  updatePartial(id: string, data: Partial<AppVersion>): Promise<void>;
  deleteById(id: string): Promise<void>;
}
