/* Options: Date: 2025-12-06 08:27:25 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://backoffice-api.brovs.com //GlobalNamespace: BackofficeApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: LotteryGetRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library BackofficeApi; import 'package:servicestack/servicestack.dart'; class ImageUrls implements IConvertible { String? preview; String? small; String? medium; String? large; ImageUrls({this.preview,this.small,this.medium,this.large}); ImageUrls.fromJson(Map json) { fromMap(json); } fromMap(Map json) { preview = json['preview']; small = json['small']; medium = json['medium']; large = json['large']; return this; } Map toJson() => { 'preview': preview, 'small': small, 'medium': medium, 'large': large }; getTypeName() => "ImageUrls"; TypeContext? context = _ctx; } class LotteryImageDto implements IConvertible { int? id; ImageUrls? imageUrl; int? position; LotteryImageDto({this.id,this.imageUrl,this.position}); LotteryImageDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; imageUrl = JsonConverters.fromJson(json['imageUrl'],'ImageUrls',context!); position = json['position']; return this; } Map toJson() => { 'id': id, 'imageUrl': JsonConverters.toJson(imageUrl,'ImageUrls',context!), 'position': position }; getTypeName() => "LotteryImageDto"; TypeContext? context = _ctx; } class UserAddress implements IConvertible { String? streetName; String? streetNumber; String? postalCode; String? region; String? countryCode; UserAddress({this.streetName,this.streetNumber,this.postalCode,this.region,this.countryCode}); UserAddress.fromJson(Map json) { fromMap(json); } fromMap(Map json) { streetName = json['streetName']; streetNumber = json['streetNumber']; postalCode = json['postalCode']; region = json['region']; countryCode = json['countryCode']; return this; } Map toJson() => { 'streetName': streetName, 'streetNumber': streetNumber, 'postalCode': postalCode, 'region': region, 'countryCode': countryCode }; getTypeName() => "UserAddress"; TypeContext? context = _ctx; } class LotteryWinnerDto implements IConvertible { int? userId; String? firstName; String? lastName; UserAddress? homeAddress; String? mobilePhone; DateTime? mobilePhoneConfirmedAt; String? email; DateTime? emailConfirmedAt; LotteryWinnerDto({this.userId,this.firstName,this.lastName,this.homeAddress,this.mobilePhone,this.mobilePhoneConfirmedAt,this.email,this.emailConfirmedAt}); LotteryWinnerDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { userId = json['userId']; firstName = json['firstName']; lastName = json['lastName']; homeAddress = JsonConverters.fromJson(json['homeAddress'],'UserAddress',context!); mobilePhone = json['mobilePhone']; mobilePhoneConfirmedAt = JsonConverters.fromJson(json['mobilePhoneConfirmedAt'],'DateTime',context!); email = json['email']; emailConfirmedAt = JsonConverters.fromJson(json['emailConfirmedAt'],'DateTime',context!); return this; } Map toJson() => { 'userId': userId, 'firstName': firstName, 'lastName': lastName, 'homeAddress': JsonConverters.toJson(homeAddress,'UserAddress',context!), 'mobilePhone': mobilePhone, 'mobilePhoneConfirmedAt': JsonConverters.toJson(mobilePhoneConfirmedAt,'DateTime',context!), 'email': email, 'emailConfirmedAt': JsonConverters.toJson(emailConfirmedAt,'DateTime',context!) }; getTypeName() => "LotteryWinnerDto"; TypeContext? context = _ctx; } enum TimeRelativeLotteryState { Draft, PublishedUpcoming, PublishedActive, PublishedEndedDrawWinner, PublishedEndedContactWinner, Archived, } class LotteryDetailsDto implements IConvertible { int? id; DateTime? startAt; DateTime? stopAt; List? images = []; String? title; String? description; String? winnerToDisplay; LotteryWinnerDto? winner; String? countryCode; TimeRelativeLotteryState? state; DateTime? updatedAt; LotteryDetailsDto({this.id,this.startAt,this.stopAt,this.images,this.title,this.description,this.winnerToDisplay,this.winner,this.countryCode,this.state,this.updatedAt}); LotteryDetailsDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; startAt = JsonConverters.fromJson(json['startAt'],'DateTime',context!); stopAt = JsonConverters.fromJson(json['stopAt'],'DateTime',context!); images = JsonConverters.fromJson(json['images'],'List',context!); title = json['title']; description = json['description']; winnerToDisplay = json['winnerToDisplay']; winner = JsonConverters.fromJson(json['winner'],'LotteryWinnerDto',context!); countryCode = json['countryCode']; state = JsonConverters.fromJson(json['state'],'TimeRelativeLotteryState',context!); updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'startAt': JsonConverters.toJson(startAt,'DateTime',context!), 'stopAt': JsonConverters.toJson(stopAt,'DateTime',context!), 'images': JsonConverters.toJson(images,'List',context!), 'title': title, 'description': description, 'winnerToDisplay': winnerToDisplay, 'winner': JsonConverters.toJson(winner,'LotteryWinnerDto',context!), 'countryCode': countryCode, 'state': JsonConverters.toJson(state,'TimeRelativeLotteryState',context!), 'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!) }; getTypeName() => "LotteryDetailsDto"; TypeContext? context = _ctx; } class LotteryGetResponse implements IConvertible { LotteryDetailsDto? lottery; LotteryGetResponse({this.lottery}); LotteryGetResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { lottery = JsonConverters.fromJson(json['lottery'],'LotteryDetailsDto',context!); return this; } Map toJson() => { 'lottery': JsonConverters.toJson(lottery,'LotteryDetailsDto',context!) }; getTypeName() => "LotteryGetResponse"; TypeContext? context = _ctx; } // @Route("/lottery/get", "GET") class LotteryGetRequest implements IReturn, IGet, IConvertible { int? lotteryId; LotteryGetRequest({this.lotteryId}); LotteryGetRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { lotteryId = json['lotteryId']; return this; } Map toJson() => { 'lotteryId': lotteryId }; createResponse() => LotteryGetResponse(); getResponseTypeName() => "LotteryGetResponse"; getTypeName() => "LotteryGetRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'BackofficeApi', types: { 'ImageUrls': TypeInfo(TypeOf.Class, create:() => ImageUrls()), 'LotteryImageDto': TypeInfo(TypeOf.Class, create:() => LotteryImageDto()), 'UserAddress': TypeInfo(TypeOf.Class, create:() => UserAddress()), 'LotteryWinnerDto': TypeInfo(TypeOf.Class, create:() => LotteryWinnerDto()), 'TimeRelativeLotteryState': TypeInfo(TypeOf.Enum, enumValues:TimeRelativeLotteryState.values), 'LotteryDetailsDto': TypeInfo(TypeOf.Class, create:() => LotteryDetailsDto()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'LotteryGetResponse': TypeInfo(TypeOf.Class, create:() => LotteryGetResponse()), 'LotteryGetRequest': TypeInfo(TypeOf.Class, create:() => LotteryGetRequest()), });