/** * This file contains shared test fixtures that can be used across all test files. * It provides functions to create common test models and data. */ import { MongoModel } from '../src/model/base_model.js'; import { ObjectId } from 'mongodb'; export declare class User extends MongoModel { static collection: string; _id: ObjectId; name: string; email: string; age: number; active: boolean; role: string; posts: any; profile: any; static setBeforeSaveFlag(user: User): void; static setAfterSaveFlag(user: User): void; static setBeforeCreateFlag(user: User): void; static setAfterCreateFlag(user: User): void; static setBeforeUpdateFlag(user: User): void; static setAfterUpdateFlag(user: User): void; static setBeforeDeleteFlag(user: User): void; static setAfterDeleteFlag(user: User): void; static setBeforeFindFlag(query: any): void; static setAfterFindFlag(user: User): void; } export declare class Post extends MongoModel { static collection: string; _id: ObjectId; title: string; content: string; published: boolean; views: number; userId: ObjectId; categoryId: ObjectId; createdAt: Date; user: any; category: any; comments: any; tags: any; } export declare class Profile extends MongoModel { static collection: string; _id: ObjectId; bio: string; location: string; userId: ObjectId; user: any; } export declare class Comment extends MongoModel { static collection: string; _id: ObjectId; content: string; postId: ObjectId; userId: ObjectId; createdAt: Date; post: any; user: any; } export declare class Category extends MongoModel { static collection: string; _id: ObjectId; name: string; slug: string; posts: any; } export declare class Product extends MongoModel { static collection: string; _id: ObjectId; name: string; price: number; category: string; inStock: boolean; tags: string[]; description: string | null; rating: number; } export declare class Cocktail extends MongoModel { static collection: string; _id: ObjectId; name: string; description: string; instructions: string; glassType: string; imageUrl: string | null; ingredients: any; price: any; static createRelatedPrice(cocktail: Cocktail): Promise; static deleteRelatedPrice(cocktail: Cocktail): Promise; } export declare class Price extends MongoModel { static collection: string; _id: ObjectId; amount: number; currency: string; cocktailId: ObjectId; cocktail: any; } export declare class Ingredient extends MongoModel { static collection: string; _id: ObjectId; name: string; quantity: string; unit: string; cocktailId: ObjectId; cocktail: any; } export declare class Tag extends MongoModel { static collection: string; _id: ObjectId; name: string; slug: string; posts: any; } export declare class PostTag extends MongoModel { static collection: string; _id: ObjectId; post_id: ObjectId; tag_id: ObjectId; createdAt: Date; } /** * Boot all models to ensure they are registered */ export declare function bootModels(): void; /** * Create test users */ export declare function createTestUsers(): Promise; /** * Create test categories */ export declare function createTestCategories(): Promise; /** * Create test posts linked to users and categories */ export declare function createTestPosts(users: any[], categories: any[]): Promise; /** * Create test profiles linked to users */ export declare function createTestProfiles(users: any[]): Promise; /** * Create test comments linked to posts and users */ export declare function createTestComments(posts: any[], users: any[]): Promise; /** * Create test products */ export declare function createTestProducts(): Promise; /** * Create test cocktails and ingredients */ export declare function createTestCocktails(): Promise; /** * Create test tags */ export declare function createTestTags(): Promise; /** * Create test post-tag relationships */ export declare function createTestPostTags(posts: any[], tags: any[]): Promise; /** * Create all test data */ export declare function createAllTestData(): Promise<{ users: MongoModel[]; categories: MongoModel[]; posts: MongoModel[]; profiles: MongoModel[]; comments: MongoModel[]; products: MongoModel[]; cocktails: MongoModel[]; tags: MongoModel[]; postTags: MongoModel[]; }>;