/* Options: Date: 2024-12-22 21:14:28 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: QueryPlayerGameItem.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; enum PhoneKind { Home, Mobile, Work, } class Phone implements IConvertible { PhoneKind? kind; String? number; String? ext; Phone({this.kind,this.number,this.ext}); Phone.fromJson(Map json) { fromMap(json); } fromMap(Map json) { kind = JsonConverters.fromJson(json['kind'],'PhoneKind',context!); number = json['number']; ext = json['ext']; return this; } Map toJson() => { 'kind': JsonConverters.toJson(kind,'PhoneKind',context!), 'number': number, 'ext': ext }; getTypeName() => "Phone"; TypeContext? context = _ctx; } class PlayerGameItem implements IConvertible { int? id; // @References(typeof(Player)) int? playerId; // @References(typeof(GameItem)) String? gameItemName; PlayerGameItem({this.id,this.playerId,this.gameItemName}); PlayerGameItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; playerId = json['playerId']; gameItemName = json['gameItemName']; return this; } Map toJson() => { 'id': id, 'playerId': playerId, 'gameItemName': gameItemName }; getTypeName() => "PlayerGameItem"; TypeContext? context = _ctx; } enum PlayerRole { Leader, Player, NonPlayer, } enum PlayerRegion { Africa, Americas, Asia, Australasia, Europe, } class Profile extends AuditBase implements IConvertible { int? id; PlayerRole? role; PlayerRegion? region; String? username; int? highScore; int? gamesPlayed; int? energy; String? profileUrl; String? coverUrl; Map? meta; Profile({this.id,this.role,this.region,this.username,this.highScore,this.gamesPlayed,this.energy,this.profileUrl,this.coverUrl,this.meta}); Profile.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; role = JsonConverters.fromJson(json['role'],'PlayerRole',context!); region = JsonConverters.fromJson(json['region'],'PlayerRegion',context!); username = json['username']; highScore = json['highScore']; gamesPlayed = json['gamesPlayed']; energy = json['energy']; profileUrl = json['profileUrl']; coverUrl = json['coverUrl']; meta = JsonConverters.toStringMap(json['meta']); return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'role': JsonConverters.toJson(role,'PlayerRole',context!), 'region': JsonConverters.toJson(region,'PlayerRegion',context!), 'username': username, 'highScore': highScore, 'gamesPlayed': gamesPlayed, 'energy': energy, 'profileUrl': profileUrl, 'coverUrl': coverUrl, 'meta': meta }); getTypeName() => "Profile"; TypeContext? context = _ctx; } class Player extends AuditBase implements IConvertible { int? id; // @required() String? firstName; String? lastName; String? email; List? phoneNumbers = []; List? gameItems = []; Profile? profile; int? profileId; String? savedLevelId; int? rowVersion; Player({this.id,this.firstName,this.lastName,this.email,this.phoneNumbers,this.gameItems,this.profile,this.profileId,this.savedLevelId,this.rowVersion}); Player.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; firstName = json['firstName']; lastName = json['lastName']; email = json['email']; phoneNumbers = JsonConverters.fromJson(json['phoneNumbers'],'List',context!); gameItems = JsonConverters.fromJson(json['gameItems'],'List',context!); profile = JsonConverters.fromJson(json['profile'],'Profile',context!); profileId = json['profileId']; savedLevelId = json['savedLevelId']; rowVersion = json['rowVersion']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'firstName': firstName, 'lastName': lastName, 'email': email, 'phoneNumbers': JsonConverters.toJson(phoneNumbers,'List',context!), 'gameItems': JsonConverters.toJson(gameItems,'List',context!), 'profile': JsonConverters.toJson(profile,'Profile',context!), 'profileId': profileId, 'savedLevelId': savedLevelId, 'rowVersion': rowVersion }); getTypeName() => "Player"; TypeContext? context = _ctx; } class GameItem extends AuditBase implements IConvertible { // @StringLength(50) String? name; String? imageUrl; // @StringLength(2147483647) String? description; DateTime? dateAdded; GameItem({this.name,this.imageUrl,this.description,this.dateAdded}); GameItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); name = json['name']; imageUrl = json['imageUrl']; description = json['description']; dateAdded = JsonConverters.fromJson(json['dateAdded'],'DateTime',context!); return this; } Map toJson() => super.toJson()..addAll({ 'name': name, 'imageUrl': imageUrl, 'description': description, 'dateAdded': JsonConverters.toJson(dateAdded,'DateTime',context!) }); getTypeName() => "GameItem"; TypeContext? context = _ctx; } class QueryPlayerGameItem extends QueryDb implements IReturn>, IConvertible, IGet { int? id; int? playerId; String? gameItemName; QueryPlayerGameItem({this.id,this.playerId,this.gameItemName}); QueryPlayerGameItem.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; playerId = json['playerId']; gameItemName = json['gameItemName']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'playerId': playerId, 'gameItemName': gameItemName }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryPlayerGameItem"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'blazor_gallery.servicestack.net', types: { 'PhoneKind': TypeInfo(TypeOf.Enum, enumValues:PhoneKind.values), 'Phone': TypeInfo(TypeOf.Class, create:() => Phone()), 'PlayerGameItem': TypeInfo(TypeOf.Class, create:() => PlayerGameItem()), 'PlayerRole': TypeInfo(TypeOf.Enum, enumValues:PlayerRole.values), 'PlayerRegion': TypeInfo(TypeOf.Enum, enumValues:PlayerRegion.values), 'Profile': TypeInfo(TypeOf.Class, create:() => Profile()), 'Player': TypeInfo(TypeOf.Class, create:() => Player()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GameItem': TypeInfo(TypeOf.Class, create:() => GameItem()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryPlayerGameItem': TypeInfo(TypeOf.Class, create:() => QueryPlayerGameItem()), });