123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415 |
- import 'liveConsultation.m.dart';
- import 'notification.m.dart';
- import 'device.m.dart';
- class CreateTeamRequest extends TokenRequest{
- String? code;
- String? teamName;
- String? description;
- String? organizationCode;
- List<String>? members;
- String? principal;
- CreateTeamRequest({
- this.code,
- this.teamName,
- this.description,
- this.organizationCode,
- this.members,
- this.principal,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateTeamRequest.fromJson(Map<String, dynamic> map) {
- return CreateTeamRequest(
- code: map['Code'],
- teamName: map['TeamName'],
- description: map['Description'],
- organizationCode: map['OrganizationCode'],
- members: map['Members']?.cast<String>().toList(),
- principal: map['Principal'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (teamName != null)
- map['TeamName'] = teamName;
- if (description != null)
- map['Description'] = description;
- if (organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if (members != null)
- map['Members'] = members;
- if (principal != null)
- map['Principal'] = principal;
- return map;
- }
- }
- class TeamDTO extends BaseDTO{
- String? code;
- String? teamName;
- String? description;
- String? organizationCode;
- List<String>? members;
- String? principal;
- String? principalName;
- TeamDTO({
- this.code,
- this.teamName,
- this.description,
- this.organizationCode,
- this.members,
- this.principal,
- this.principalName,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory TeamDTO.fromJson(Map<String, dynamic> map) {
- return TeamDTO(
- code: map['Code'],
- teamName: map['TeamName'],
- description: map['Description'],
- organizationCode: map['OrganizationCode'],
- members: map['Members']?.cast<String>().toList(),
- principal: map['Principal'],
- principalName: map['PrincipalName'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (teamName != null)
- map['TeamName'] = teamName;
- if (description != null)
- map['Description'] = description;
- if (organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if (members != null)
- map['Members'] = members;
- if (principal != null)
- map['Principal'] = principal;
- if (principalName != null)
- map['PrincipalName'] = principalName;
- return map;
- }
- }
- class GetTeamRequest extends TokenRequest{
- String? code;
- GetTeamRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory GetTeamRequest.fromJson(Map<String, dynamic> map) {
- return GetTeamRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class GetTeamByKeyRequest extends TokenRequest{
- String? key;
- String? value;
- GetTeamByKeyRequest({
- this.key,
- this.value,
- String? token,
- }) : super(
- token: token,
- );
- factory GetTeamByKeyRequest.fromJson(Map<String, dynamic> map) {
- return GetTeamByKeyRequest(
- key: map['Key'],
- value: map['Value'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (key != null)
- map['Key'] = key;
- if (value != null)
- map['Value'] = value;
- return map;
- }
- }
- class TeamPageRequest extends PageRequest{
- TeamPageRequest({
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory TeamPageRequest.fromJson(Map<String, dynamic> map) {
- return TeamPageRequest(
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class RemoveTeamRequest extends TokenRequest{
- String? code;
- RemoveTeamRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory RemoveTeamRequest.fromJson(Map<String, dynamic> map) {
- return RemoveTeamRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class GetTeamListRequest extends TokenRequest{
- List<String>? codes;
- GetTeamListRequest({
- this.codes,
- String? token,
- }) : super(
- token: token,
- );
- factory GetTeamListRequest.fromJson(Map<String, dynamic> map) {
- return GetTeamListRequest(
- codes: map['Codes']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (codes != null)
- map['Codes'] = codes;
- return map;
- }
- }
- class UpdateTeamRequest extends TokenRequest{
- String? code;
- String? teamName;
- String? description;
- String? organizationCode;
- List<String>? members;
- String? principal;
- UpdateTeamRequest({
- this.code,
- this.teamName,
- this.description,
- this.organizationCode,
- this.members,
- this.principal,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateTeamRequest.fromJson(Map<String, dynamic> map) {
- return UpdateTeamRequest(
- code: map['Code'],
- teamName: map['TeamName'],
- description: map['Description'],
- organizationCode: map['OrganizationCode'],
- members: map['Members']?.cast<String>().toList(),
- principal: map['Principal'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (teamName != null)
- map['TeamName'] = teamName;
- if (description != null)
- map['Description'] = description;
- if (organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if (members != null)
- map['Members'] = members;
- if (principal != null)
- map['Principal'] = principal;
- return map;
- }
- }
- class JoinTeamRequest extends TokenRequest{
- List<String>? userCodes;
- String? teamCode;
- JoinTeamRequest({
- this.userCodes,
- this.teamCode,
- String? token,
- }) : super(
- token: token,
- );
- factory JoinTeamRequest.fromJson(Map<String, dynamic> map) {
- return JoinTeamRequest(
- userCodes: map['UserCodes']?.cast<String>().toList(),
- teamCode: map['TeamCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCodes != null)
- map['UserCodes'] = userCodes;
- if (teamCode != null)
- map['TeamCode'] = teamCode;
- return map;
- }
- }
- class QuitTeamRequest extends TokenRequest{
- List<String>? userCodes;
- String? teamCode;
- QuitTeamRequest({
- this.userCodes,
- this.teamCode,
- String? token,
- }) : super(
- token: token,
- );
- factory QuitTeamRequest.fromJson(Map<String, dynamic> map) {
- return QuitTeamRequest(
- userCodes: map['UserCodes']?.cast<String>().toList(),
- teamCode: map['TeamCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCodes != null)
- map['UserCodes'] = userCodes;
- if (teamCode != null)
- map['TeamCode'] = teamCode;
- return map;
- }
- }
- class GetTeamPageByOrganizationRequest extends PageRequest{
- String? organizationCode;
- GetTeamPageByOrganizationRequest({
- this.organizationCode,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory GetTeamPageByOrganizationRequest.fromJson(Map<String, dynamic> map) {
- return GetTeamPageByOrganizationRequest(
- organizationCode: map['OrganizationCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- return map;
- }
- }
- class SetTeamPrincipalRequest extends TokenRequest{
- String? teamCode;
- String? principal;
- SetTeamPrincipalRequest({
- this.teamCode,
- this.principal,
- String? token,
- }) : super(
- token: token,
- );
- factory SetTeamPrincipalRequest.fromJson(Map<String, dynamic> map) {
- return SetTeamPrincipalRequest(
- teamCode: map['TeamCode'],
- principal: map['Principal'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (teamCode != null)
- map['TeamCode'] = teamCode;
- if (principal != null)
- map['Principal'] = principal;
- return map;
- }
- }
|