import { Ref } from '@typegoose/typegoose'; import { Restaurant } from '~backend/business/business.model'; import { Reward } from '~backend/marketing/reward/reward.model'; export interface Rating { overall: number; } export interface Feedback { rating: Rating; reviews: string; photos: string[]; videos: string[]; /** * used to issue open reward */ user: string; /** * used to indicated feedback is submitted or created when POS syncing * if no submitted, delete photos and videos uploaded to storage */ submittedAt: Date; } export interface BillMeta { _id: Ref; restaurant: Ref; feedback: Feedback | null; sync: boolean; /** * open and closed reward ids for bill */ rewards: Ref[]; /** * computed by decode billMeta _id */ billId?: string; }