""" Options: Date: 2024-12-23 11:59:46 Version: 8.0 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://consumer-api.brovs.com #GlobalNamespace: ConsumerApi #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: LotteryGetRequest.* #ExcludeTypes: #DefaultImports: datetime,decimal,marshmallow.fields:*,servicestack:*,typing:*,dataclasses:dataclass/field,dataclasses_json:dataclass_json/LetterCase/Undefined/config,enum:Enum/IntEnum #DataClass: #DataClassJson: """ import datetime import decimal from marshmallow.fields import * from servicestack import * from typing import * from dataclasses import dataclass, field from dataclasses_json import dataclass_json, LetterCase, Undefined, config from enum import Enum, IntEnum # module ConsumerApi @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ActiveLotteryDto: id: int = 0 image_urls: Optional[List[str]] = None start_at: datetime.datetime = datetime.datetime(1, 1, 1) stop_at: datetime.datetime = datetime.datetime(1, 1, 1) title: Optional[str] = None description: Optional[str] = None your_ticket_count: int = 0 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class PreviousLotteryDto: id: int = 0 start_at: datetime.datetime = datetime.datetime(1, 1, 1) stop_at: datetime.datetime = datetime.datetime(1, 1, 1) title: Optional[str] = None your_ticket_count: int = 0 winner: Optional[str] = None you_are_the_winner: bool = False @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class LotteryGetResponse: active_lottery: Optional[ActiveLotteryDto] = None relevant_previous_lottery: Optional[PreviousLotteryDto] = None # @Route("/lottery", "GET") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class LotteryGetRequest(IReturn[LotteryGetResponse], IGet): pass