/* Options: Date: 2025-12-06 06:26:11 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://business-api.brovs.com //GlobalNamespace: BusinessApi //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: UpdateStaffRoleRequest.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart */ library BusinessApi; import 'package:servicestack/servicestack.dart'; abstract class IHasStaffId { int? staffId; } enum StaffRole { Owner, Admin, Regular, } enum BusinessRole { Owner, Manager, Sales, Marketing, Other, } class StaffDto implements IConvertible { int? id; String? firstName; String? lastName; String? email; StaffRole? role; int? placeId; int? businessId; int? userId; String? placeName; String? businessName; String? mobileNumber; BusinessRole? businessRole; DateTime? lastActiveOn; StaffDto({this.id,this.firstName,this.lastName,this.email,this.role,this.placeId,this.businessId,this.userId,this.placeName,this.businessName,this.mobileNumber,this.businessRole,this.lastActiveOn}); StaffDto.fromJson(Map json) { fromMap(json); } fromMap(Map json) { id = json['id']; firstName = json['firstName']; lastName = json['lastName']; email = json['email']; role = JsonConverters.fromJson(json['role'],'StaffRole',context!); placeId = json['placeId']; businessId = json['businessId']; userId = json['userId']; placeName = json['placeName']; businessName = json['businessName']; mobileNumber = json['mobileNumber']; businessRole = JsonConverters.fromJson(json['businessRole'],'BusinessRole',context!); lastActiveOn = JsonConverters.fromJson(json['lastActiveOn'],'DateTime',context!); return this; } Map toJson() => { 'id': id, 'firstName': firstName, 'lastName': lastName, 'email': email, 'role': JsonConverters.toJson(role,'StaffRole',context!), 'placeId': placeId, 'businessId': businessId, 'userId': userId, 'placeName': placeName, 'businessName': businessName, 'mobileNumber': mobileNumber, 'businessRole': JsonConverters.toJson(businessRole,'BusinessRole',context!), 'lastActiveOn': JsonConverters.toJson(lastActiveOn,'DateTime',context!) }; getTypeName() => "StaffDto"; TypeContext? context = _ctx; } class UpdateStaffRoleResponse implements IConvertible { StaffDto? staff; UpdateStaffRoleResponse({this.staff}); UpdateStaffRoleResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { staff = JsonConverters.fromJson(json['staff'],'StaffDto',context!); return this; } Map toJson() => { 'staff': JsonConverters.toJson(staff,'StaffDto',context!) }; getTypeName() => "UpdateStaffRoleResponse"; TypeContext? context = _ctx; } // @Route("/staff/update_role", "POST") class UpdateStaffRoleRequest implements IReturn, IPost, IHasStaffId, IConvertible { int? staffId; int? businessId; int? placeId; StaffRole? role; BusinessRole? businessRole; UpdateStaffRoleRequest({this.staffId,this.businessId,this.placeId,this.role,this.businessRole}); UpdateStaffRoleRequest.fromJson(Map json) { fromMap(json); } fromMap(Map json) { staffId = json['staffId']; businessId = json['businessId']; placeId = json['placeId']; role = JsonConverters.fromJson(json['role'],'StaffRole',context!); businessRole = JsonConverters.fromJson(json['businessRole'],'BusinessRole',context!); return this; } Map toJson() => { 'staffId': staffId, 'businessId': businessId, 'placeId': placeId, 'role': JsonConverters.toJson(role,'StaffRole',context!), 'businessRole': JsonConverters.toJson(businessRole,'BusinessRole',context!) }; createResponse() => UpdateStaffRoleResponse(); getResponseTypeName() => "UpdateStaffRoleResponse"; getTypeName() => "UpdateStaffRoleRequest"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'BusinessApi', types: { 'IHasStaffId': TypeInfo(TypeOf.Interface), 'StaffRole': TypeInfo(TypeOf.Enum, enumValues:StaffRole.values), 'BusinessRole': TypeInfo(TypeOf.Enum, enumValues:BusinessRole.values), 'StaffDto': TypeInfo(TypeOf.Class, create:() => StaffDto()), 'UpdateStaffRoleResponse': TypeInfo(TypeOf.Class, create:() => UpdateStaffRoleResponse()), 'UpdateStaffRoleRequest': TypeInfo(TypeOf.Class, create:() => UpdateStaffRoleRequest()), });