feat: add community contribution ranks
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Literal, Optional
|
||||
|
||||
from ninja import Schema
|
||||
from datetime import datetime
|
||||
|
||||
@@ -64,6 +66,30 @@ class PaymentDetailOut(Schema):
|
||||
verified_at: str | None = None
|
||||
event: dict
|
||||
|
||||
|
||||
class UserPaymentEventSchema(Schema):
|
||||
title: str
|
||||
slug: str
|
||||
image_url: Optional[str] = None
|
||||
|
||||
|
||||
class UserPaymentSchema(Schema):
|
||||
event: UserPaymentEventSchema
|
||||
base_amount: int
|
||||
discount_amount: int
|
||||
amount: int
|
||||
status: Literal["initiated", "pending", "paid", "failed", "canceled"]
|
||||
created_at: datetime
|
||||
paid_at: Optional[datetime] = None
|
||||
|
||||
|
||||
class PaginatedUserPaymentsSchema(Schema):
|
||||
count: int
|
||||
page: int
|
||||
page_size: int
|
||||
total_pages: int
|
||||
results: list[UserPaymentSchema]
|
||||
|
||||
class CouponVerifyIn(Schema):
|
||||
event_id: int
|
||||
code: str
|
||||
|
||||
Reference in New Issue
Block a user