import { post, get } from '@/utils/request';

export function createReview(orderNo: string, data: { rating: number; content?: string; images?: string[]; isAnonymous?: boolean }) {
  return post('/api/app/reviews/order', { orderNo, ...data });
}

export function getReviewList(params: { merchantId?: number; roomId?: number; page?: number; pageSize?: number }) {
  return get('/api/app/reviews', params);
}

export function checkOrderReviewed(orderNo: string) {
  return get(`/api/app/reviews/check/${orderNo}`);
}
