/* Options: Date: 2024-12-23 11:21:16 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: package:servicestack/servicestack.dart */ library ConsumerApi; import 'package:servicestack/servicestack.dart'; class ActiveLotteryDto implements IConvertible { int? id; List? imageUrls; DateTime? startAt; DateTime? stopAt; String? title; String? description; int? yourTicketCount; ActiveLotteryDto({this.id,this.imageUrls,this.startAt,this.stopAt,this.title,this.description,this.yourTicketCount}); ActiveLotteryDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; imageUrls = JsonConverters.fromJson(json['imageUrls'],'List',context!); startAt = JsonConverters.fromJson(json['startAt'],'DateTime',context!); stopAt = JsonConverters.fromJson(json['stopAt'],'DateTime',context!); title = json['title']; description = json['description']; yourTicketCount = json['yourTicketCount']; return this; } Map toJson() => { 'id': id, 'imageUrls': JsonConverters.toJson(imageUrls,'List',context!), 'startAt': JsonConverters.toJson(startAt,'DateTime',context!), 'stopAt': JsonConverters.toJson(stopAt,'DateTime',context!), 'title': title, 'description': description, 'yourTicketCount': yourTicketCount }; getTypeName() => "ActiveLotteryDto"; TypeContext? context = _ctx; } class PreviousLotteryDto implements IConvertible { int? id; DateTime? startAt; DateTime? stopAt; String? title; int? yourTicketCount; String? winner; bool? youAreTheWinner; PreviousLotteryDto({this.id,this.startAt,this.stopAt,this.title,this.yourTicketCount,this.winner,this.youAreTheWinner}); PreviousLotteryDto.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!); title = json['title']; yourTicketCount = json['yourTicketCount']; winner = json['winner']; youAreTheWinner = json['youAreTheWinner']; return this; } Map toJson() => { 'id': id, 'startAt': JsonConverters.toJson(startAt,'DateTime',context!), 'stopAt': JsonConverters.toJson(stopAt,'DateTime',context!), 'title': title, 'yourTicketCount': yourTicketCount, 'winner': winner, 'youAreTheWinner': youAreTheWinner }; getTypeName() => "PreviousLotteryDto"; TypeContext? context = _ctx; } class LotteryGetResponse implements IConvertible { ActiveLotteryDto? activeLottery; PreviousLotteryDto? relevantPreviousLottery; LotteryGetResponse({this.activeLottery,this.relevantPreviousLottery}); LotteryGetResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { activeLottery = JsonConverters.fromJson(json['activeLottery'],'ActiveLotteryDto',context!); relevantPreviousLottery = JsonConverters.fromJson(json['relevantPreviousLottery'],'PreviousLotteryDto',context!); return this; } Map toJson() => { 'activeLottery': JsonConverters.toJson(activeLottery,'ActiveLotteryDto',context!), 'relevantPreviousLottery': JsonConverters.toJson(relevantPreviousLottery,'PreviousLotteryDto',context!) }; getTypeName() => "LotteryGetResponse"; TypeContext? context = _ctx; } // @Route("/lottery", "GET") class LotteryGetRequest implements IReturn, IGet, IConvertible { LotteryGetRequest(); LotteryGetRequest.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => LotteryGetResponse(); getResponseTypeName() => "LotteryGetResponse"; getTypeName() => "LotteryGetRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'ConsumerApi', types: { 'ActiveLotteryDto': TypeInfo(TypeOf.Class, create:() => ActiveLotteryDto()), 'PreviousLotteryDto': TypeInfo(TypeOf.Class, create:() => PreviousLotteryDto()), 'LotteryGetResponse': TypeInfo(TypeOf.Class, create:() => LotteryGetResponse()), 'LotteryGetRequest': TypeInfo(TypeOf.Class, create:() => LotteryGetRequest()), });