""" Options: Date: 2024-12-22 11:59:39 Version: 8.51 Tip: To override a DTO option, remove "#" prefix before updating BaseUrl: https://techstacks.io #GlobalNamespace: #AddServiceStackTypes: True #AddResponseStatus: False #AddImplicitVersion: #AddDescriptionAsComments: True IncludeTypes: UpdatePost.* #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 class PostType(str, Enum): ANNOUNCEMENT = 'Announcement' POST = 'Post' SHOWCASE = 'Showcase' QUESTION = 'Question' REQUEST = 'Request' @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UpdatePostResponse: response_status: Optional[ResponseStatus] = None # @Route("/posts/{Id}", "PUT") @dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE) @dataclass class UpdatePost(IReturn[UpdatePostResponse], IPut): id: int = 0 organization_id: int = 0 type: Optional[PostType] = None category_id: int = 0 title: Optional[str] = None url: Optional[str] = None image_url: Optional[str] = None content: Optional[str] = None lock: Optional[bool] = None technology_ids: Optional[List[int]] = None labels: Optional[List[str]] = None from_date: Optional[datetime.datetime] = None to_date: Optional[datetime.datetime] = None meta_type: Optional[str] = None meta: Optional[str] = None