/* Options: Date: 2026-01-22 01:53:53 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://pecuario-backend.develsystems.com //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: GetFarms.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ import 'package:servicestack/servicestack.dart'; class Status implements IConvertible { String? message; int? statusCode; Status({this.message,this.statusCode}); Status.fromJson(Map json) { fromMap(json); } fromMap(Map json) { message = json['message']; statusCode = json['statusCode']; return this; } Map toJson() => { 'message': message, 'statusCode': statusCode }; getTypeName() => "Status"; TypeContext? context = _ctx; } class BaseResponse implements IConvertible { Status? status; BaseResponse({this.status}); BaseResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { status = JsonConverters.fromJson(json['status'],'Status',context!); return this; } Map toJson() => { 'status': JsonConverters.toJson(status,'Status',context!) }; getTypeName() => "BaseResponse"; TypeContext? context = _ctx; } class Farm implements IConvertible { int? id; // @References(typeof(AppUser)) int? userId; // @required() // @StringLength(100) String? name; // @References(typeof(Region)) int? regionId; // @References(typeof(MeasurementUnit)) int? measurementUnitId; double? area; Farm({this.id,this.userId,this.name,this.regionId,this.measurementUnitId,this.area}); Farm.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; userId = json['userId']; name = json['name']; regionId = json['regionId']; measurementUnitId = json['measurementUnitId']; area = JsonConverters.toDouble(json['area']); return this; } Map toJson() => { 'id': id, 'userId': userId, 'name': name, 'regionId': regionId, 'measurementUnitId': measurementUnitId, 'area': area }; getTypeName() => "Farm"; TypeContext? context = _ctx; } class MeasurementUnit implements IConvertible { int? id; // @required() // @StringLength(10) String? code; // @required() // @StringLength(100) String? name; MeasurementUnit({this.id,this.code,this.name}); MeasurementUnit.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; code = json['code']; name = json['name']; return this; } Map toJson() => { 'id': id, 'code': code, 'name': name }; getTypeName() => "MeasurementUnit"; TypeContext? context = _ctx; } class Country implements IConvertible { int? id; // @required() // @StringLength(2) String? code; // @required() // @StringLength(3) String? phoneCode; // @required() // @StringLength(200) String? name; // @required() // @StringLength(5) String? currencySymbol; // @required() // @StringLength(200) String? currencyName; // @required() int? order; Country({this.id,this.code,this.phoneCode,this.name,this.currencySymbol,this.currencyName,this.order}); Country.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; code = json['code']; phoneCode = json['phoneCode']; name = json['name']; currencySymbol = json['currencySymbol']; currencyName = json['currencyName']; order = json['order']; return this; } Map toJson() => { 'id': id, 'code': code, 'phoneCode': phoneCode, 'name': name, 'currencySymbol': currencySymbol, 'currencyName': currencyName, 'order': order }; getTypeName() => "Country"; TypeContext? context = _ctx; } class Region implements IConvertible { int? id; // @References(typeof(Country)) int? countryId; // @required() // @StringLength(200) String? name; Region({this.id,this.countryId,this.name}); Region.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; countryId = json['countryId']; name = json['name']; return this; } Map toJson() => { 'id': id, 'countryId': countryId, 'name': name }; getTypeName() => "Region"; TypeContext? context = _ctx; } class GetFarmsResponse extends BaseResponse implements IConvertible { List? farms; GetFarmsResponse({this.farms}); GetFarmsResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { super.fromMap(json); farms = JsonConverters.fromJson(json['farms'],'List',context!); return this; } Map toJson() => super.toJson()..addAll({ 'farms': JsonConverters.toJson(farms,'List',context!) }); getTypeName() => "GetFarmsResponse"; TypeContext? context = _ctx; } // @Route("/api/v1/farms", "GET") class GetFarms implements IReturn, IGet, IConvertible { GetFarms(); GetFarms.fromJson(Map json) : super(); fromMap(Map json) { return this; } Map toJson() => {}; createResponse() => GetFarmsResponse(); getResponseTypeName() => "GetFarmsResponse"; getTypeName() => "GetFarms"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'pecuario_backend.develsystems.com', types: { 'Status': TypeInfo(TypeOf.Class, create:() => Status()), 'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()), 'Farm': TypeInfo(TypeOf.Class, create:() => Farm()), 'MeasurementUnit': TypeInfo(TypeOf.Class, create:() => MeasurementUnit()), 'Country': TypeInfo(TypeOf.Class, create:() => Country()), 'Region': TypeInfo(TypeOf.Class, create:() => Region()), 'GetFarmsResponse': TypeInfo(TypeOf.Class, create:() => GetFarmsResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'GetFarms': TypeInfo(TypeOf.Class, create:() => GetFarms()), });