""" Options: Date: 2025-04-05 03:08:05 Version: 8.23 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://testapi.bokamera.se #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: AdminIncentivesQuery.* #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 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class BaseModel: pass class IncentiveRecurrenceFrequency(IntEnum): ONE_TIME = 1 WEEKLY = 2 MONTHLY = 3 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class IncentiveCompanyRelation(BaseModel): id: int = 0 company_id: Optional[str] = None incentive_id: int = 0 created_date: datetime.datetime = datetime.datetime(1, 1, 1) class CriteriaType(str, Enum): LICENSE_AVAILABILITY = 'LicenseAvailability' SMS_ACTIVATION = 'SmsActivation' E_ACCOUNTING_ACTIVATION = 'eAccountingActivation' CODE_LOCK_ACTIVATION = 'CodeLockActivation' SOCIAL_ACTIVATION = 'SocialActivation' ONLINE_PAYMENT_ACTIVATION = 'OnlinePaymentActivation' FOLLOW_UP_MESSAGE_ACTIVATION = 'FollowUpMessageActivation' RATING_ACTIVATION = 'RatingActivation' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class IncentiveCriteria(BaseModel): id: int = 0 incentive_id: int = 0 criteria_type: Optional[CriteriaType] = None value: Optional[str] = None invert_condition: bool = False created_date: datetime.datetime = datetime.datetime(1, 1, 1) class IncentiveActionType(IntEnum): UPGRADE = 1 ADD_ON = 2 INFORMATION = 3 @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class IncentiveAction(BaseModel): id: int = 0 action_type: Optional[IncentiveActionType] = None page: Optional[str] = None segment: Optional[str] = None element: Optional[str] = None license_type_id: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class Incentive(BaseModel): id: int = 0 heading: Optional[str] = None storage_url: Optional[str] = None success_button_text: Optional[str] = None active: bool = False action_id: int = 0 frequency: Optional[IncentiveRecurrenceFrequency] = None recurrence_interval: int = 0 initial_delay_in_seconds: int = 0 max_display_count: Optional[int] = None valid_from: datetime.datetime = datetime.datetime(1, 1, 1) valid_to: datetime.datetime = datetime.datetime(1, 1, 1) created_date: datetime.datetime = datetime.datetime(1, 1, 1) modified_date: Optional[datetime.datetime] = None applies_to_all_companies: bool = False payload: Optional[str] = None companies: Optional[List[IncentiveCompanyRelation]] = None criteria: Optional[List[IncentiveCriteria]] = None # @Ignore() action: Optional[IncentiveAction] = None # @Route("/superadmin/incentives/", "GET") # @ValidateRequest(Validator="IsAuthenticated") # @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401) @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class AdminIncentivesQuery(QueryDb2[Incentive, QueryResponse[AdminIncentiveQueryResponse]], IReturn[QueryResponse[QueryResponse[AdminIncentiveQueryResponse]]]): id: Optional[int] = None company_id: Optional[str] = None valid_from: Optional[Date] = None valid_to: Optional[Date] = None action_id: Optional[int] = None active: Optional[bool] = None include_criteria: bool = False include_companies: bool = False include_action: bool = False