/* Options: Date: 2024-12-22 12:47:10 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: QueryPostComments.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class PostComment implements IConvertible { int? id; int? postId; int? userId; int? replyId; // @StringLength(2147483647) String? content; // @StringLength(2147483647) String? contentHtml; int? score; int? rank; int? upVotes; int? downVotes; int? favorites; int? wordCount; int? reportCount; DateTime? deleted; DateTime? hidden; DateTime? modified; DateTime? created; String? createdBy; int? refId; String? refSource; String? refUrn; PostComment({this.id,this.postId,this.userId,this.replyId,this.content,this.contentHtml,this.score,this.rank,this.upVotes,this.downVotes,this.favorites,this.wordCount,this.reportCount,this.deleted,this.hidden,this.modified,this.created,this.createdBy,this.refId,this.refSource,this.refUrn}); PostComment.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; postId = json['postId']; userId = json['userId']; replyId = json['replyId']; content = json['content']; contentHtml = json['contentHtml']; score = json['score']; rank = json['rank']; upVotes = json['upVotes']; downVotes = json['downVotes']; favorites = json['favorites']; wordCount = json['wordCount']; reportCount = json['reportCount']; deleted = JsonConverters.fromJson(json['deleted'],'DateTime',context!); hidden = JsonConverters.fromJson(json['hidden'],'DateTime',context!); modified = JsonConverters.fromJson(json['modified'],'DateTime',context!); created = JsonConverters.fromJson(json['created'],'DateTime',context!); createdBy = json['createdBy']; refId = json['refId']; refSource = json['refSource']; refUrn = json['refUrn']; return this; } Map toJson() => { 'id': id, 'postId': postId, 'userId': userId, 'replyId': replyId, 'content': content, 'contentHtml': contentHtml, 'score': score, 'rank': rank, 'upVotes': upVotes, 'downVotes': downVotes, 'favorites': favorites, 'wordCount': wordCount, 'reportCount': reportCount, 'deleted': JsonConverters.toJson(deleted,'DateTime',context!), 'hidden': JsonConverters.toJson(hidden,'DateTime',context!), 'modified': JsonConverters.toJson(modified,'DateTime',context!), 'created': JsonConverters.toJson(created,'DateTime',context!), 'createdBy': createdBy, 'refId': refId, 'refSource': refSource, 'refUrn': refUrn }; getTypeName() => "PostComment"; TypeContext? context = _ctx; } // @Route("/posts/comment", "GET") class QueryPostComments extends QueryDb implements IReturn>, IConvertible, IGet { int? id; int? userId; int? postId; String? contentContains; int? upVotesAbove; int? upVotesBelow; int? downVotesAbove; int? downVotes; int? favoritesAbove; int? favoritesBelow; int? wordCountAbove; int? wordCountBelow; int? reportCountAbove; int? reportCountBelow; QueryPostComments({this.id,this.userId,this.postId,this.contentContains,this.upVotesAbove,this.upVotesBelow,this.downVotesAbove,this.downVotes,this.favoritesAbove,this.favoritesBelow,this.wordCountAbove,this.wordCountBelow,this.reportCountAbove,this.reportCountBelow}); QueryPostComments.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); id = json['id']; userId = json['userId']; postId = json['postId']; contentContains = json['contentContains']; upVotesAbove = json['upVotesAbove']; upVotesBelow = json['upVotesBelow']; downVotesAbove = json['downVotesAbove']; downVotes = json['downVotes']; favoritesAbove = json['favoritesAbove']; favoritesBelow = json['favoritesBelow']; wordCountAbove = json['wordCountAbove']; wordCountBelow = json['wordCountBelow']; reportCountAbove = json['reportCountAbove']; reportCountBelow = json['reportCountBelow']; return this; } Map toJson() => super.toJson()..addAll({ 'id': id, 'userId': userId, 'postId': postId, 'contentContains': contentContains, 'upVotesAbove': upVotesAbove, 'upVotesBelow': upVotesBelow, 'downVotesAbove': downVotesAbove, 'downVotes': downVotes, 'favoritesAbove': favoritesAbove, 'favoritesBelow': favoritesBelow, 'wordCountAbove': wordCountAbove, 'wordCountBelow': wordCountBelow, 'reportCountAbove': reportCountAbove, 'reportCountBelow': reportCountBelow }); createResponse() => QueryResponse(); getResponseTypeName() => "QueryResponse"; getTypeName() => "QueryPostComments"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'techstacks.io', types: { 'PostComment': TypeInfo(TypeOf.Class, create:() => PostComment()), 'QueryResponse': TypeInfo(TypeOf.Class, create:() => QueryResponse()), 'QueryPostComments': TypeInfo(TypeOf.Class, create:() => QueryPostComments()), 'List': TypeInfo(TypeOf.Class, create:() => []), });