essential forum code

This commit is contained in:
jackiettran
2025-11-11 16:55:00 -05:00
parent 4a4eee86a7
commit 825389228d
29 changed files with 2557 additions and 2861 deletions

View File

@@ -255,55 +255,42 @@ export interface ConditionCheckTimeline {
};
}
export interface ItemRequest {
export interface ForumPost {
id: string;
title: string;
description: string;
address1?: string;
address2?: string;
city?: string;
state?: string;
zipCode?: string;
country?: string;
latitude?: number;
longitude?: number;
maxPricePerHour?: number;
maxPricePerDay?: number;
maxPricePerWeek?: number;
maxPricePerMonth?: number;
preferredStartDate?: string;
preferredEndDate?: string;
isFlexibleDates: boolean;
status: "open" | "fulfilled" | "closed";
requesterId: string;
requester?: User;
responseCount: number;
responses?: ItemRequestResponse[];
content: string;
authorId: string;
category: "item_request" | "technical_support" | "community_resources" | "general_discussion";
status: "open" | "solved" | "closed";
viewCount: number;
commentCount: number;
isPinned: boolean;
author?: User;
tags?: PostTag[];
comments?: ForumComment[];
createdAt: string;
updatedAt: string;
}
export interface ItemRequestResponse {
export interface ForumComment {
id: string;
itemRequestId: string;
responderId: string;
message: string;
offerPricePerHour?: number;
offerPricePerDay?: number;
offerPricePerWeek?: number;
offerPricePerMonth?: number;
availableStartDate?: string;
availableEndDate?: string;
existingItemId?: string;
status: "pending" | "accepted" | "declined" | "expired";
contactInfo?: string;
responder?: User;
existingItem?: Item;
itemRequest?: ItemRequest;
postId: string;
authorId: string;
content: string;
parentCommentId?: string;
isDeleted: boolean;
author?: User;
replies?: ForumComment[];
createdAt: string;
updatedAt: string;
}
export interface PostTag {
id: string;
postId: string;
tagName: string;
}
export interface RefundPreview {
canCancel: boolean;
cancelledBy: "renter" | "owner";