""" Options: Date: 2025-01-08 03:12:00 Version: 8.53 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://blazordiffusion.com #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: QueryArtifactStats.* #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 StatBase: ref_id: Optional[str] = None app_user_id: Optional[int] = None raw_url: Optional[str] = None remote_ip: Optional[str] = None created_date: datetime.datetime = datetime.datetime(1, 1, 1) class StatType(str, Enum): DOWNLOAD = 'Download' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class ArtifactStat(StatBase): id: int = 0 type: Optional[StatType] = None artifact_id: int = 0 source: Optional[str] = None version: Optional[str] = None # @ValidateRequest(Validator="HasRole(`Moderator`)") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class QueryArtifactStats(QueryDb[ArtifactStat], IReturn[QueryResponse[ArtifactStat]]): pass