Defines standard TypeScript interfaces for Appwrite Collections. Use when creating new models for Tours, Users, or Bookings to ensure full type safety.
```typescript
import { Models } from 'appwrite';
export interface Tour extends Models.Document {
title: string;
description: string;
price: number;
location: string;
images: string[];
rating: number;
availableDates: string[]; // ISO Strings
}
export type BookingStatus = 'pending' | 'confirmed' | 'cancelled';
export interface Booking extends Models.Document {
userId: string;
tourId: string;
status: BookingStatus;
totalPrice: number;
}
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/defining-typescript-models/raw