From 3cd16b764ba45dce321083f5aac3ce6e59c50f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Tue, 30 May 2023 17:55:16 +0200 Subject: [PATCH] Create provisional document models --- src/models/photo.ts | 9 +++++++++ src/models/photoAppearanceCount.ts | 7 +++++++ src/models/vote.ts | 8 ++++++++ 3 files changed, 24 insertions(+) create mode 100644 src/models/photo.ts create mode 100644 src/models/photoAppearanceCount.ts create mode 100644 src/models/vote.ts diff --git a/src/models/photo.ts b/src/models/photo.ts new file mode 100644 index 0000000..c8879f2 --- /dev/null +++ b/src/models/photo.ts @@ -0,0 +1,9 @@ +import { Models } from 'appwrite'; + +export interface Photo extends Models.Document { + url: string; + rating: number; + ratingDeviation: number; + volatility: number; + altText: string; +} diff --git a/src/models/photoAppearanceCount.ts b/src/models/photoAppearanceCount.ts new file mode 100644 index 0000000..595949c --- /dev/null +++ b/src/models/photoAppearanceCount.ts @@ -0,0 +1,7 @@ +import { Models } from 'appwrite'; + +export interface PhotoAppearanceCount extends Models.Document { + voterId: string; + photoId: string; + count: number; +} diff --git a/src/models/vote.ts b/src/models/vote.ts new file mode 100644 index 0000000..d9269f4 --- /dev/null +++ b/src/models/vote.ts @@ -0,0 +1,8 @@ +import { Models } from 'appwrite'; + +export interface Vote extends Models.Document { + voterId: string; + photo1Id: string; + photo2Id: string; + result: number; +}