HotTRDealsFrontend/src/models/Deal.ts
2026-01-20 12:19:02 +00:00

32 lines
719 B
TypeScript

import type { DealImage } from "./deal/DealImage.ts"
import type { DealVote } from "./deal/DealVote.ts"
import type { User } from "./User"
import type { Seller } from "./seller/Seller.ts"
export type Deal = {
id: number
title: string
description?: string
url?: string
price?: number
score: number
status: "PENDING" | "ACTIVE" | "EXPIRED" | "REJECTED"
saleType: "ONLINE" | "OFFLINE" | "CODE"
affiliateType: "AFFILIATE" | "NON_AFFILIATE" | "USER_AFFILIATE"
sellerName: string
createdAt: string
updatedAt: string
// ilişkiler
user?: Pick<User, "id" | "username" | "avatarUrl">
company?: Pick<Seller, "id" | "name">
images?: DealImage[]
votes?: DealVote[]
comments?: Comment[]
}