Consolidate models into a single file

This commit is contained in:
Maciej Pędzich 2023-06-08 18:56:29 +02:00
parent e2566c3d32
commit 8585153cc7
3 changed files with 17 additions and 11 deletions

17
src/models/index.ts Normal file
View File

@ -0,0 +1,17 @@
export interface Photo {
fileName: string;
altText: string;
rating: number;
rd: number;
vol: number;
}
export interface Vote {
photos: [string, string];
result: 0 | 0.5 | 1;
}
export interface Database {
photos: Photo[];
votes: Vote[];
}

View File

@ -1,7 +0,0 @@
export interface Photo {
url: string;
rating: number;
ratingDeviation: number;
volatility: number;
altText: string;
}

View File

@ -1,4 +0,0 @@
export interface Vote {
photos: [string, string];
result: 0 | 0.5 | 1;
}