Added h2h communication.
This commit is contained in:
48
frontend/src/types/match.ts
Normal file
48
frontend/src/types/match.ts
Normal file
@ -0,0 +1,48 @@
|
||||
import { TeamSide, SpreadBetStatus } from './spread-bet'
|
||||
|
||||
export interface MatchUser {
|
||||
id: number
|
||||
username: string
|
||||
}
|
||||
|
||||
export interface MatchComment {
|
||||
id: number
|
||||
spread_bet_id: number
|
||||
user_id: number
|
||||
username: string
|
||||
content: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface MatchCommentCreate {
|
||||
content: string
|
||||
}
|
||||
|
||||
export interface MatchBetDetail {
|
||||
id: number
|
||||
event_id: number
|
||||
spread: number
|
||||
team: TeamSide
|
||||
stake_amount: number
|
||||
house_commission_percent: number
|
||||
status: SpreadBetStatus
|
||||
payout_amount: number | null
|
||||
winner_id: number | null
|
||||
created_at: string
|
||||
matched_at: string | null
|
||||
completed_at: string | null
|
||||
// Event info
|
||||
home_team: string
|
||||
away_team: string
|
||||
game_time: string
|
||||
official_spread: number
|
||||
// User info
|
||||
creator: MatchUser
|
||||
taker: MatchUser | null
|
||||
}
|
||||
|
||||
export interface MatchDetailResponse {
|
||||
bet: MatchBetDetail
|
||||
comments: MatchComment[]
|
||||
can_comment: boolean
|
||||
}
|
||||
Reference in New Issue
Block a user