internal.queries.models

  1# Code generated by sqlc. DO NOT EDIT.
  2# versions:
  3#   sqlc v1.30.0
  4import datetime
  5import decimal
  6import enum
  7import pydantic
  8from typing import Any, Optional
  9
 10
 11class AdminIssueType(str, enum.Enum):
 12    LOGIN_FAILED = "LOGIN_FAILED"
 13    ACCOUNT_LOCKED = "ACCOUNT_LOCKED"
 14    PASSWORD_RESET_FAILED = "PASSWORD_RESET_FAILED"
 15    PAYMENT_FAILED = "PAYMENT_FAILED"
 16    QR_CODE_NOT_GENERATED = "QR_CODE_NOT_GENERATED"
 17    QR_CODE_SCAN_ERROR = "QR_CODE_SCAN_ERROR"
 18    APP_CRASH = "APP_CRASH"
 19    DATA_INCONSISTENCY = "DATA_INCONSISTENCY"
 20    PERMISSION_ERROR = "PERMISSION_ERROR"
 21    OTHER = "OTHER"
 22
 23
 24class ChartType(str, enum.Enum):
 25    LINE = "line"
 26    MULTI_LINE = "multi_line"
 27    BAR = "bar"
 28    STACKED_BAR = "stacked_bar"
 29    PIE = "pie"
 30    AREA = "area"
 31
 32
 33class DayOfWeek(str, enum.Enum):
 34    MONDAY = "Monday"
 35    TUESDAY = "Tuesday"
 36    WEDNESDAY = "Wednesday"
 37    THURSDAY = "Thursday"
 38    FRIDAY = "Friday"
 39    SATURDAY = "Saturday"
 40    SUNDAY = "Sunday"
 41
 42
 43class IssueStatus(str, enum.Enum):
 44    OPEN = "open"
 45    IN_PROGRESS = "in_progress"
 46    CLOSED = "closed"
 47
 48
 49class ReservationStatus(str, enum.Enum):
 50    RESERVED = "reserved"
 51    COLLECTED = "collected"
 52    NO_SHOW = "no_show"
 53
 54
 55class SellerIssueType(str, enum.Enum):
 56    ITEM_MISSING = "ITEM_MISSING"
 57    ITEM_INCORRECT = "ITEM_INCORRECT"
 58    ITEM_DAMAGED = "ITEM_DAMAGED"
 59    SELLER_CLOSED = "SELLER_CLOSED"
 60    SELLER_REFUSED_PICKUP = "SELLER_REFUSED_PICKUP"
 61    PICKUP_DELAYED = "PICKUP_DELAYED"
 62    BUNDLE_EXPIRED = "BUNDLE_EXPIRED"
 63    RESERVATION_CANCELLED_BY_SELLER = "RESERVATION_CANCELLED_BY_SELLER"
 64    RESERVATION_NOT_FOUND = "RESERVATION_NOT_FOUND"
 65    CLAIM_CODE_INVALID = "CLAIM_CODE_INVALID"
 66    CLAIM_CODE_ALREADY_USED = "CLAIM_CODE_ALREADY_USED"
 67    OTHER = "OTHER"
 68
 69
 70class UserRole(str, enum.Enum):
 71    SELLER = "seller"
 72    CONSUMER = "consumer"
 73    ADMIN = "admin"
 74
 75
 76class WeatherFlag(str, enum.Enum):
 77    SUNNY = "sunny"
 78    CLOUDY = "cloudy"
 79    RAINY = "rainy"
 80    SNOWY = "snowy"
 81    WINDY = "windy"
 82
 83
 84class ActivityLog(pydantic.BaseModel):
 85    activity_id: int
 86    user_id: Optional[int]
 87    action: str
 88    details: Optional[Any]
 89    ip_address: str
 90    created_at: datetime.datetime
 91
 92
 93class Admin(pydantic.BaseModel):
 94    user_id: int
 95    fname: str
 96    lname: str
 97    active: Optional[bool]
 98
 99
100class AdminIssueReport(pydantic.BaseModel):
101    report_id: int
102    user_id: int
103    issue_type: AdminIssueType
104    description: str
105    created_at: datetime.datetime
106    status: IssueStatus
107
108
109class Allergen(pydantic.BaseModel):
110    allergen_id: int
111    allergen_name: str
112
113
114class AnalyticsGraph(pydantic.BaseModel):
115    graph_id: int
116    seller_id: int
117    graph_type: int
118    created_at: datetime.datetime
119
120
121class AnalyticsGraphsType(pydantic.BaseModel):
122    graph_type_id: int
123    chart_type: ChartType
124    graph_summary: str
125    x_axis_label: Optional[str]
126    y_axis_label: Optional[str]
127
128
129class AnalyticsPoint(pydantic.BaseModel):
130    series_id: int
131    sort_index: int
132    x: str
133    y: decimal.Decimal
134
135
136class AnalyticsSeries(pydantic.BaseModel):
137    series_id: int
138    graph_id: int
139    series_name: str
140    sort_index: int
141
142
143class Badge(pydantic.BaseModel):
144    badge_id: int
145    name: str
146    description: str
147
148
149class BadgesAcquired(pydantic.BaseModel):
150    user_id: int
151    badge_id: int
152    level: int
153    acquired_at: datetime.datetime
154
155
156class Bundle(pydantic.BaseModel):
157    bundle_id: int
158    seller_id: int
159    bundle_name: str
160    description: str
161    carbon_dioxide: int
162    total_qty: int
163    price: decimal.Decimal
164    discount_percentage: int
165    window_start: datetime.datetime
166    window_end: datetime.datetime
167    created_at: datetime.datetime
168
169
170class BundleAllergen(pydantic.BaseModel):
171    bundle_id: int
172    allergen_id: int
173
174
175class BundleCategory(pydantic.BaseModel):
176    category_id: int
177    bundle_id: int
178
179
180class Category(pydantic.BaseModel):
181    category_id: int
182    category_name: str
183    category_coefficient: float
184
185
186class Consumer(pydantic.BaseModel):
187    user_id: int
188    fname: str
189    lname: str
190
191
192class ForecastInput(pydantic.BaseModel):
193    input_id: int
194    bundle_id: int
195    seller_id: int
196    category_id: int
197    day_of_week: DayOfWeek
198    window_start: datetime.datetime
199    window_end: datetime.datetime
200    is_holiday: bool
201    temperature: decimal.Decimal
202    weather_flag: WeatherFlag
203    observed_reservations: int
204    observed_no_shows: int
205
206
207class ForecastOutput(pydantic.BaseModel):
208    output_id: int
209    bundle_id: int
210    seller_id: int
211    window_start: datetime.datetime
212    predicted_sales: int
213    posted_qty: int
214    predicted_no_show_prob: decimal.Decimal
215    confidence: decimal.Decimal
216    rationale: Optional[str]
217    generated_at: datetime.datetime
218
219
220class Inbox(pydantic.BaseModel):
221    message_id: int
222    user_id: int
223    sender_id: int
224    message_subject: str
225    message_text: str
226    sent_at: datetime.datetime
227    read_status: bool
228
229
230class Reservation(pydantic.BaseModel):
231    reservation_id: int
232    bundle_id: int
233    consumer_id: int
234    reserved_at: datetime.datetime
235    claim_code: str
236    collected_at: Optional[datetime.datetime]
237
238
239class Seller(pydantic.BaseModel):
240    user_id: int
241    seller_name: str
242    verified_by: Optional[int]
243    verification_date: Optional[datetime.datetime]
244    address_line1: str
245    address_line2: Optional[str]
246    city: str
247    post_code: str
248    region: Optional[str]
249    country: str
250    latitude: Optional[float]
251    longitude: Optional[float]
252
253
254class SellerIssueReport(pydantic.BaseModel):
255    report_id: int
256    reservation_id: int
257    issue_type: SellerIssueType
258    description: str
259    created_at: datetime.datetime
260    status: IssueStatus
261
262
263class Token(pydantic.BaseModel):
264    token_id: int
265    user_id: int
266    token: str
267    created_at: datetime.datetime
268    expires_at: datetime.datetime
269
270
271class User(pydantic.BaseModel):
272    user_id: int
273    username: str
274    email: str
275    pw_hash: str
276    role: UserRole
277    created_at: datetime.datetime
278    last_login: datetime.datetime
class AdminIssueType(builtins.str, enum.Enum):
12class AdminIssueType(str, enum.Enum):
13    LOGIN_FAILED = "LOGIN_FAILED"
14    ACCOUNT_LOCKED = "ACCOUNT_LOCKED"
15    PASSWORD_RESET_FAILED = "PASSWORD_RESET_FAILED"
16    PAYMENT_FAILED = "PAYMENT_FAILED"
17    QR_CODE_NOT_GENERATED = "QR_CODE_NOT_GENERATED"
18    QR_CODE_SCAN_ERROR = "QR_CODE_SCAN_ERROR"
19    APP_CRASH = "APP_CRASH"
20    DATA_INCONSISTENCY = "DATA_INCONSISTENCY"
21    PERMISSION_ERROR = "PERMISSION_ERROR"
22    OTHER = "OTHER"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

LOGIN_FAILED = <AdminIssueType.LOGIN_FAILED: 'LOGIN_FAILED'>
ACCOUNT_LOCKED = <AdminIssueType.ACCOUNT_LOCKED: 'ACCOUNT_LOCKED'>
PASSWORD_RESET_FAILED = <AdminIssueType.PASSWORD_RESET_FAILED: 'PASSWORD_RESET_FAILED'>
PAYMENT_FAILED = <AdminIssueType.PAYMENT_FAILED: 'PAYMENT_FAILED'>
QR_CODE_NOT_GENERATED = <AdminIssueType.QR_CODE_NOT_GENERATED: 'QR_CODE_NOT_GENERATED'>
QR_CODE_SCAN_ERROR = <AdminIssueType.QR_CODE_SCAN_ERROR: 'QR_CODE_SCAN_ERROR'>
APP_CRASH = <AdminIssueType.APP_CRASH: 'APP_CRASH'>
DATA_INCONSISTENCY = <AdminIssueType.DATA_INCONSISTENCY: 'DATA_INCONSISTENCY'>
PERMISSION_ERROR = <AdminIssueType.PERMISSION_ERROR: 'PERMISSION_ERROR'>
OTHER = <AdminIssueType.OTHER: 'OTHER'>
class ChartType(builtins.str, enum.Enum):
25class ChartType(str, enum.Enum):
26    LINE = "line"
27    MULTI_LINE = "multi_line"
28    BAR = "bar"
29    STACKED_BAR = "stacked_bar"
30    PIE = "pie"
31    AREA = "area"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

LINE = <ChartType.LINE: 'line'>
MULTI_LINE = <ChartType.MULTI_LINE: 'multi_line'>
BAR = <ChartType.BAR: 'bar'>
STACKED_BAR = <ChartType.STACKED_BAR: 'stacked_bar'>
PIE = <ChartType.PIE: 'pie'>
AREA = <ChartType.AREA: 'area'>
class DayOfWeek(builtins.str, enum.Enum):
34class DayOfWeek(str, enum.Enum):
35    MONDAY = "Monday"
36    TUESDAY = "Tuesday"
37    WEDNESDAY = "Wednesday"
38    THURSDAY = "Thursday"
39    FRIDAY = "Friday"
40    SATURDAY = "Saturday"
41    SUNDAY = "Sunday"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

MONDAY = <DayOfWeek.MONDAY: 'Monday'>
TUESDAY = <DayOfWeek.TUESDAY: 'Tuesday'>
WEDNESDAY = <DayOfWeek.WEDNESDAY: 'Wednesday'>
THURSDAY = <DayOfWeek.THURSDAY: 'Thursday'>
FRIDAY = <DayOfWeek.FRIDAY: 'Friday'>
SATURDAY = <DayOfWeek.SATURDAY: 'Saturday'>
SUNDAY = <DayOfWeek.SUNDAY: 'Sunday'>
class IssueStatus(builtins.str, enum.Enum):
44class IssueStatus(str, enum.Enum):
45    OPEN = "open"
46    IN_PROGRESS = "in_progress"
47    CLOSED = "closed"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

OPEN = <IssueStatus.OPEN: 'open'>
IN_PROGRESS = <IssueStatus.IN_PROGRESS: 'in_progress'>
CLOSED = <IssueStatus.CLOSED: 'closed'>
class ReservationStatus(builtins.str, enum.Enum):
50class ReservationStatus(str, enum.Enum):
51    RESERVED = "reserved"
52    COLLECTED = "collected"
53    NO_SHOW = "no_show"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

RESERVED = <ReservationStatus.RESERVED: 'reserved'>
COLLECTED = <ReservationStatus.COLLECTED: 'collected'>
NO_SHOW = <ReservationStatus.NO_SHOW: 'no_show'>
class SellerIssueType(builtins.str, enum.Enum):
56class SellerIssueType(str, enum.Enum):
57    ITEM_MISSING = "ITEM_MISSING"
58    ITEM_INCORRECT = "ITEM_INCORRECT"
59    ITEM_DAMAGED = "ITEM_DAMAGED"
60    SELLER_CLOSED = "SELLER_CLOSED"
61    SELLER_REFUSED_PICKUP = "SELLER_REFUSED_PICKUP"
62    PICKUP_DELAYED = "PICKUP_DELAYED"
63    BUNDLE_EXPIRED = "BUNDLE_EXPIRED"
64    RESERVATION_CANCELLED_BY_SELLER = "RESERVATION_CANCELLED_BY_SELLER"
65    RESERVATION_NOT_FOUND = "RESERVATION_NOT_FOUND"
66    CLAIM_CODE_INVALID = "CLAIM_CODE_INVALID"
67    CLAIM_CODE_ALREADY_USED = "CLAIM_CODE_ALREADY_USED"
68    OTHER = "OTHER"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

ITEM_MISSING = <SellerIssueType.ITEM_MISSING: 'ITEM_MISSING'>
ITEM_INCORRECT = <SellerIssueType.ITEM_INCORRECT: 'ITEM_INCORRECT'>
ITEM_DAMAGED = <SellerIssueType.ITEM_DAMAGED: 'ITEM_DAMAGED'>
SELLER_CLOSED = <SellerIssueType.SELLER_CLOSED: 'SELLER_CLOSED'>
SELLER_REFUSED_PICKUP = <SellerIssueType.SELLER_REFUSED_PICKUP: 'SELLER_REFUSED_PICKUP'>
PICKUP_DELAYED = <SellerIssueType.PICKUP_DELAYED: 'PICKUP_DELAYED'>
BUNDLE_EXPIRED = <SellerIssueType.BUNDLE_EXPIRED: 'BUNDLE_EXPIRED'>
RESERVATION_CANCELLED_BY_SELLER = <SellerIssueType.RESERVATION_CANCELLED_BY_SELLER: 'RESERVATION_CANCELLED_BY_SELLER'>
RESERVATION_NOT_FOUND = <SellerIssueType.RESERVATION_NOT_FOUND: 'RESERVATION_NOT_FOUND'>
CLAIM_CODE_INVALID = <SellerIssueType.CLAIM_CODE_INVALID: 'CLAIM_CODE_INVALID'>
CLAIM_CODE_ALREADY_USED = <SellerIssueType.CLAIM_CODE_ALREADY_USED: 'CLAIM_CODE_ALREADY_USED'>
OTHER = <SellerIssueType.OTHER: 'OTHER'>
class UserRole(builtins.str, enum.Enum):
71class UserRole(str, enum.Enum):
72    SELLER = "seller"
73    CONSUMER = "consumer"
74    ADMIN = "admin"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

SELLER = <UserRole.SELLER: 'seller'>
CONSUMER = <UserRole.CONSUMER: 'consumer'>
ADMIN = <UserRole.ADMIN: 'admin'>
class WeatherFlag(builtins.str, enum.Enum):
77class WeatherFlag(str, enum.Enum):
78    SUNNY = "sunny"
79    CLOUDY = "cloudy"
80    RAINY = "rainy"
81    SNOWY = "snowy"
82    WINDY = "windy"

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to 'utf-8'. errors defaults to 'strict'.

SUNNY = <WeatherFlag.SUNNY: 'sunny'>
CLOUDY = <WeatherFlag.CLOUDY: 'cloudy'>
RAINY = <WeatherFlag.RAINY: 'rainy'>
SNOWY = <WeatherFlag.SNOWY: 'snowy'>
WINDY = <WeatherFlag.WINDY: 'windy'>
class ActivityLog(pydantic.main.BaseModel):
85class ActivityLog(pydantic.BaseModel):
86    activity_id: int
87    user_id: Optional[int]
88    action: str
89    details: Optional[Any]
90    ip_address: str
91    created_at: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
activity_id: int = PydanticUndefined
user_id: int | None = PydanticUndefined
action: str = PydanticUndefined
details: Any | None = PydanticUndefined
ip_address: str = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
class Admin(pydantic.main.BaseModel):
94class Admin(pydantic.BaseModel):
95    user_id: int
96    fname: str
97    lname: str
98    active: Optional[bool]

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
user_id: int = PydanticUndefined
fname: str = PydanticUndefined
lname: str = PydanticUndefined
active: bool | None = PydanticUndefined
class AdminIssueReport(pydantic.main.BaseModel):
101class AdminIssueReport(pydantic.BaseModel):
102    report_id: int
103    user_id: int
104    issue_type: AdminIssueType
105    description: str
106    created_at: datetime.datetime
107    status: IssueStatus

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
report_id: int = PydanticUndefined
user_id: int = PydanticUndefined
issue_type: AdminIssueType = PydanticUndefined
description: str = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
status: IssueStatus = PydanticUndefined
class Allergen(pydantic.main.BaseModel):
110class Allergen(pydantic.BaseModel):
111    allergen_id: int
112    allergen_name: str

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
allergen_id: int = PydanticUndefined
allergen_name: str = PydanticUndefined
class AnalyticsGraph(pydantic.main.BaseModel):
115class AnalyticsGraph(pydantic.BaseModel):
116    graph_id: int
117    seller_id: int
118    graph_type: int
119    created_at: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
graph_id: int = PydanticUndefined
seller_id: int = PydanticUndefined
graph_type: int = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
class AnalyticsGraphsType(pydantic.main.BaseModel):
122class AnalyticsGraphsType(pydantic.BaseModel):
123    graph_type_id: int
124    chart_type: ChartType
125    graph_summary: str
126    x_axis_label: Optional[str]
127    y_axis_label: Optional[str]

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
graph_type_id: int = PydanticUndefined
chart_type: ChartType = PydanticUndefined
graph_summary: str = PydanticUndefined
x_axis_label: str | None = PydanticUndefined
y_axis_label: str | None = PydanticUndefined
class AnalyticsPoint(pydantic.main.BaseModel):
130class AnalyticsPoint(pydantic.BaseModel):
131    series_id: int
132    sort_index: int
133    x: str
134    y: decimal.Decimal

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
series_id: int = PydanticUndefined
sort_index: int = PydanticUndefined
x: str = PydanticUndefined
y: decimal.Decimal = PydanticUndefined
class AnalyticsSeries(pydantic.main.BaseModel):
137class AnalyticsSeries(pydantic.BaseModel):
138    series_id: int
139    graph_id: int
140    series_name: str
141    sort_index: int

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
series_id: int = PydanticUndefined
graph_id: int = PydanticUndefined
series_name: str = PydanticUndefined
sort_index: int = PydanticUndefined
class Badge(pydantic.main.BaseModel):
144class Badge(pydantic.BaseModel):
145    badge_id: int
146    name: str
147    description: str

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
badge_id: int = PydanticUndefined
name: str = PydanticUndefined
description: str = PydanticUndefined
class BadgesAcquired(pydantic.main.BaseModel):
150class BadgesAcquired(pydantic.BaseModel):
151    user_id: int
152    badge_id: int
153    level: int
154    acquired_at: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
user_id: int = PydanticUndefined
badge_id: int = PydanticUndefined
level: int = PydanticUndefined
acquired_at: datetime.datetime = PydanticUndefined
class Bundle(pydantic.main.BaseModel):
157class Bundle(pydantic.BaseModel):
158    bundle_id: int
159    seller_id: int
160    bundle_name: str
161    description: str
162    carbon_dioxide: int
163    total_qty: int
164    price: decimal.Decimal
165    discount_percentage: int
166    window_start: datetime.datetime
167    window_end: datetime.datetime
168    created_at: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
bundle_id: int = PydanticUndefined
seller_id: int = PydanticUndefined
bundle_name: str = PydanticUndefined
description: str = PydanticUndefined
carbon_dioxide: int = PydanticUndefined
total_qty: int = PydanticUndefined
price: decimal.Decimal = PydanticUndefined
discount_percentage: int = PydanticUndefined
window_start: datetime.datetime = PydanticUndefined
window_end: datetime.datetime = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
class BundleAllergen(pydantic.main.BaseModel):
171class BundleAllergen(pydantic.BaseModel):
172    bundle_id: int
173    allergen_id: int

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
bundle_id: int = PydanticUndefined
allergen_id: int = PydanticUndefined
class BundleCategory(pydantic.main.BaseModel):
176class BundleCategory(pydantic.BaseModel):
177    category_id: int
178    bundle_id: int

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
category_id: int = PydanticUndefined
bundle_id: int = PydanticUndefined
class Category(pydantic.main.BaseModel):
181class Category(pydantic.BaseModel):
182    category_id: int
183    category_name: str
184    category_coefficient: float

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
category_id: int = PydanticUndefined
category_name: str = PydanticUndefined
category_coefficient: float = PydanticUndefined
class Consumer(pydantic.main.BaseModel):
187class Consumer(pydantic.BaseModel):
188    user_id: int
189    fname: str
190    lname: str

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
user_id: int = PydanticUndefined
fname: str = PydanticUndefined
lname: str = PydanticUndefined
class ForecastInput(pydantic.main.BaseModel):
193class ForecastInput(pydantic.BaseModel):
194    input_id: int
195    bundle_id: int
196    seller_id: int
197    category_id: int
198    day_of_week: DayOfWeek
199    window_start: datetime.datetime
200    window_end: datetime.datetime
201    is_holiday: bool
202    temperature: decimal.Decimal
203    weather_flag: WeatherFlag
204    observed_reservations: int
205    observed_no_shows: int

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
input_id: int = PydanticUndefined
bundle_id: int = PydanticUndefined
seller_id: int = PydanticUndefined
category_id: int = PydanticUndefined
day_of_week: DayOfWeek = PydanticUndefined
window_start: datetime.datetime = PydanticUndefined
window_end: datetime.datetime = PydanticUndefined
is_holiday: bool = PydanticUndefined
temperature: decimal.Decimal = PydanticUndefined
weather_flag: WeatherFlag = PydanticUndefined
observed_reservations: int = PydanticUndefined
observed_no_shows: int = PydanticUndefined
class ForecastOutput(pydantic.main.BaseModel):
208class ForecastOutput(pydantic.BaseModel):
209    output_id: int
210    bundle_id: int
211    seller_id: int
212    window_start: datetime.datetime
213    predicted_sales: int
214    posted_qty: int
215    predicted_no_show_prob: decimal.Decimal
216    confidence: decimal.Decimal
217    rationale: Optional[str]
218    generated_at: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
output_id: int = PydanticUndefined
bundle_id: int = PydanticUndefined
seller_id: int = PydanticUndefined
window_start: datetime.datetime = PydanticUndefined
predicted_sales: int = PydanticUndefined
posted_qty: int = PydanticUndefined
predicted_no_show_prob: decimal.Decimal = PydanticUndefined
confidence: decimal.Decimal = PydanticUndefined
rationale: str | None = PydanticUndefined
generated_at: datetime.datetime = PydanticUndefined
class Inbox(pydantic.main.BaseModel):
221class Inbox(pydantic.BaseModel):
222    message_id: int
223    user_id: int
224    sender_id: int
225    message_subject: str
226    message_text: str
227    sent_at: datetime.datetime
228    read_status: bool

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
message_id: int = PydanticUndefined
user_id: int = PydanticUndefined
sender_id: int = PydanticUndefined
message_subject: str = PydanticUndefined
message_text: str = PydanticUndefined
sent_at: datetime.datetime = PydanticUndefined
read_status: bool = PydanticUndefined
class Reservation(pydantic.main.BaseModel):
231class Reservation(pydantic.BaseModel):
232    reservation_id: int
233    bundle_id: int
234    consumer_id: int
235    reserved_at: datetime.datetime
236    claim_code: str
237    collected_at: Optional[datetime.datetime]

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
reservation_id: int = PydanticUndefined
bundle_id: int = PydanticUndefined
consumer_id: int = PydanticUndefined
reserved_at: datetime.datetime = PydanticUndefined
claim_code: str = PydanticUndefined
collected_at: datetime.datetime | None = PydanticUndefined
class Seller(pydantic.main.BaseModel):
240class Seller(pydantic.BaseModel):
241    user_id: int
242    seller_name: str
243    verified_by: Optional[int]
244    verification_date: Optional[datetime.datetime]
245    address_line1: str
246    address_line2: Optional[str]
247    city: str
248    post_code: str
249    region: Optional[str]
250    country: str
251    latitude: Optional[float]
252    longitude: Optional[float]

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
user_id: int = PydanticUndefined
seller_name: str = PydanticUndefined
verified_by: int | None = PydanticUndefined
verification_date: datetime.datetime | None = PydanticUndefined
address_line1: str = PydanticUndefined
address_line2: str | None = PydanticUndefined
city: str = PydanticUndefined
post_code: str = PydanticUndefined
region: str | None = PydanticUndefined
country: str = PydanticUndefined
latitude: float | None = PydanticUndefined
longitude: float | None = PydanticUndefined
class SellerIssueReport(pydantic.main.BaseModel):
255class SellerIssueReport(pydantic.BaseModel):
256    report_id: int
257    reservation_id: int
258    issue_type: SellerIssueType
259    description: str
260    created_at: datetime.datetime
261    status: IssueStatus

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
report_id: int = PydanticUndefined
reservation_id: int = PydanticUndefined
issue_type: SellerIssueType = PydanticUndefined
description: str = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
status: IssueStatus = PydanticUndefined
class Token(pydantic.main.BaseModel):
264class Token(pydantic.BaseModel):
265    token_id: int
266    user_id: int
267    token: str
268    created_at: datetime.datetime
269    expires_at: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
token_id: int = PydanticUndefined
user_id: int = PydanticUndefined
token: str = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
expires_at: datetime.datetime = PydanticUndefined
class User(pydantic.main.BaseModel):
272class User(pydantic.BaseModel):
273    user_id: int
274    username: str
275    email: str
276    pw_hash: str
277    role: UserRole
278    created_at: datetime.datetime
279    last_login: datetime.datetime

!!! abstract "Usage Documentation" Models

A base class for creating Pydantic models.

Attributes:
  • __class_vars__: The names of the class variables defined on the model.
  • __private_attributes__: Metadata about the private attributes of the model.
  • __signature__: The synthesized __init__ [Signature][inspect.Signature] of the model.
  • __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
  • __pydantic_core_schema__: The core schema of the model.
  • __pydantic_custom_init__: Whether the model has a custom __init__ function.
  • __pydantic_decorators__: Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
  • __pydantic_generic_metadata__: Metadata for generic models; contains data used for a similar purpose to __args__, __origin__, __parameters__ in typing-module generics. May eventually be replaced by these.
  • __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
  • __pydantic_post_init__: The name of the post-init method for the model, if defined.
  • __pydantic_root_model__: Whether the model is a [RootModel][pydantic.root_model.RootModel].
  • __pydantic_serializer__: The pydantic-core SchemaSerializer used to dump instances of the model.
  • __pydantic_validator__: The pydantic-core SchemaValidator used to validate instances of the model.
  • __pydantic_fields__: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
  • __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
  • __pydantic_extra__: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
  • __pydantic_fields_set__: The names of fields explicitly set during instantiation.
  • __pydantic_private__: Values of private attributes set on the model instance.
user_id: int = PydanticUndefined
username: str = PydanticUndefined
email: str = PydanticUndefined
pw_hash: str = PydanticUndefined
role: UserRole = PydanticUndefined
created_at: datetime.datetime = PydanticUndefined
last_login: datetime.datetime = PydanticUndefined