123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- import 'liveConsultation.m.dart';
- import 'vitalContractRecord.m.dart';
- import 'notification.m.dart';
- import 'device.m.dart';
- class CreateServicePackRequest extends TokenRequest{
- String? code;
- String? name;
- ServicePackTypeEnum servicePackType;
- String? content;
- CreateServicePackRequest({
- this.code,
- this.name,
- this.servicePackType = ServicePackTypeEnum.BasePack,
- this.content,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateServicePackRequest.fromJson(Map<String, dynamic> map) {
- return CreateServicePackRequest(
- code: map['Code'],
- name: map['Name'],
- servicePackType: ServicePackTypeEnum.values.firstWhere((e) => e.index == map['ServicePackType']),
- content: map['Content'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (name != null)
- map['Name'] = name;
- map['ServicePackType'] = servicePackType.index;
- if (content != null)
- map['Content'] = content;
- return map;
- }
- }
- class GetServicePackRequest extends TokenRequest{
- String? code;
- GetServicePackRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory GetServicePackRequest.fromJson(Map<String, dynamic> map) {
- return GetServicePackRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class ServicePackPageRequest extends PageRequest{
- ServicePackPageRequest({
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory ServicePackPageRequest.fromJson(Map<String, dynamic> map) {
- return ServicePackPageRequest(
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class RemovetServicePackRequest extends TokenRequest{
- String? code;
- RemovetServicePackRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory RemovetServicePackRequest.fromJson(Map<String, dynamic> map) {
- return RemovetServicePackRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class UpdateServicePackRequest extends TokenRequest{
- String? code;
- String? name;
- ServicePackTypeEnum servicePackType;
- String? content;
- UpdateServicePackRequest({
- this.code,
- this.name,
- this.servicePackType = ServicePackTypeEnum.BasePack,
- this.content,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateServicePackRequest.fromJson(Map<String, dynamic> map) {
- return UpdateServicePackRequest(
- code: map['Code'],
- name: map['Name'],
- servicePackType: ServicePackTypeEnum.values.firstWhere((e) => e.index == map['ServicePackType']),
- content: map['Content'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (name != null)
- map['Name'] = name;
- map['ServicePackType'] = servicePackType.index;
- if (content != null)
- map['Content'] = content;
- return map;
- }
- }
- class UpdateServicePackForItemsRequest extends TokenRequest{
- String? code;
- List<String>? items;
- UpdateServicePackForItemsRequest({
- this.code,
- this.items,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateServicePackForItemsRequest.fromJson(Map<String, dynamic> map) {
- return UpdateServicePackForItemsRequest(
- code: map['Code'],
- items: map['Items']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (items != null)
- map['Items'] = items;
- return map;
- }
- }
- enum ServiceItemTypeEnum {
- LimitCount,
- UnlimitedCount,
- }
- class CreateServiceItemRequest extends TokenRequest{
- String? name;
- String? content;
- ServiceItemTypeEnum serviceItemType;
- String? serviceNumber;
- String? department;
- String? guidancePrice;
- String? adjustedPrice;
- String? totalPrice;
- String? priceExplanation;
- CreateServiceItemRequest({
- this.name,
- this.content,
- this.serviceItemType = ServiceItemTypeEnum.LimitCount,
- this.serviceNumber,
- this.department,
- this.guidancePrice,
- this.adjustedPrice,
- this.totalPrice,
- this.priceExplanation,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateServiceItemRequest.fromJson(Map<String, dynamic> map) {
- return CreateServiceItemRequest(
- name: map['Name'],
- content: map['Content'],
- serviceItemType: ServiceItemTypeEnum.values.firstWhere((e) => e.index == map['ServiceItemType']),
- serviceNumber: map['ServiceNumber'],
- department: map['Department'],
- guidancePrice: map['GuidancePrice'],
- adjustedPrice: map['AdjustedPrice'],
- totalPrice: map['TotalPrice'],
- priceExplanation: map['PriceExplanation'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (name != null)
- map['Name'] = name;
- if (content != null)
- map['Content'] = content;
- map['ServiceItemType'] = serviceItemType.index;
- if (serviceNumber != null)
- map['ServiceNumber'] = serviceNumber;
- if (department != null)
- map['Department'] = department;
- if (guidancePrice != null)
- map['GuidancePrice'] = guidancePrice;
- if (adjustedPrice != null)
- map['AdjustedPrice'] = adjustedPrice;
- if (totalPrice != null)
- map['TotalPrice'] = totalPrice;
- if (priceExplanation != null)
- map['PriceExplanation'] = priceExplanation;
- return map;
- }
- }
- class ServiceItemDTO extends BaseDTO{
- String? code;
- String? name;
- String? content;
- ServiceItemTypeEnum serviceItemType;
- String? serviceNumber;
- String? department;
- String? guidancePrice;
- String? adjustedPrice;
- String? totalPrice;
- String? priceExplanation;
- ServiceItemDTO({
- this.code,
- this.name,
- this.content,
- this.serviceItemType = ServiceItemTypeEnum.LimitCount,
- this.serviceNumber,
- this.department,
- this.guidancePrice,
- this.adjustedPrice,
- this.totalPrice,
- this.priceExplanation,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ServiceItemDTO.fromJson(Map<String, dynamic> map) {
- return ServiceItemDTO(
- code: map['Code'],
- name: map['Name'],
- content: map['Content'],
- serviceItemType: ServiceItemTypeEnum.values.firstWhere((e) => e.index == map['ServiceItemType']),
- serviceNumber: map['ServiceNumber'],
- department: map['Department'],
- guidancePrice: map['GuidancePrice'],
- adjustedPrice: map['AdjustedPrice'],
- totalPrice: map['TotalPrice'],
- priceExplanation: map['PriceExplanation'],
- 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 (name != null)
- map['Name'] = name;
- if (content != null)
- map['Content'] = content;
- map['ServiceItemType'] = serviceItemType.index;
- if (serviceNumber != null)
- map['ServiceNumber'] = serviceNumber;
- if (department != null)
- map['Department'] = department;
- if (guidancePrice != null)
- map['GuidancePrice'] = guidancePrice;
- if (adjustedPrice != null)
- map['AdjustedPrice'] = adjustedPrice;
- if (totalPrice != null)
- map['TotalPrice'] = totalPrice;
- if (priceExplanation != null)
- map['PriceExplanation'] = priceExplanation;
- return map;
- }
- }
- class GetServiceItemRequest extends TokenRequest{
- String? code;
- GetServiceItemRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory GetServiceItemRequest.fromJson(Map<String, dynamic> map) {
- return GetServiceItemRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class GetServiceItemListRequest extends TokenRequest{
- List<String>? codes;
- GetServiceItemListRequest({
- this.codes,
- String? token,
- }) : super(
- token: token,
- );
- factory GetServiceItemListRequest.fromJson(Map<String, dynamic> map) {
- return GetServiceItemListRequest(
- 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 RemovetServiceItemRequest extends TokenRequest{
- String? code;
- RemovetServiceItemRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory RemovetServiceItemRequest.fromJson(Map<String, dynamic> map) {
- return RemovetServiceItemRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class UpdateServiceItemRequest extends TokenRequest{
- String? code;
- String? name;
- String? content;
- ServiceItemTypeEnum serviceItemType;
- String? serviceNumber;
- String? department;
- String? guidancePrice;
- String? adjustedPrice;
- String? totalPrice;
- String? priceExplanation;
- UpdateServiceItemRequest({
- this.code,
- this.name,
- this.content,
- this.serviceItemType = ServiceItemTypeEnum.LimitCount,
- this.serviceNumber,
- this.department,
- this.guidancePrice,
- this.adjustedPrice,
- this.totalPrice,
- this.priceExplanation,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateServiceItemRequest.fromJson(Map<String, dynamic> map) {
- return UpdateServiceItemRequest(
- code: map['Code'],
- name: map['Name'],
- content: map['Content'],
- serviceItemType: ServiceItemTypeEnum.values.firstWhere((e) => e.index == map['ServiceItemType']),
- serviceNumber: map['ServiceNumber'],
- department: map['Department'],
- guidancePrice: map['GuidancePrice'],
- adjustedPrice: map['AdjustedPrice'],
- totalPrice: map['TotalPrice'],
- priceExplanation: map['PriceExplanation'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (name != null)
- map['Name'] = name;
- if (content != null)
- map['Content'] = content;
- map['ServiceItemType'] = serviceItemType.index;
- if (serviceNumber != null)
- map['ServiceNumber'] = serviceNumber;
- if (department != null)
- map['Department'] = department;
- if (guidancePrice != null)
- map['GuidancePrice'] = guidancePrice;
- if (adjustedPrice != null)
- map['AdjustedPrice'] = adjustedPrice;
- if (totalPrice != null)
- map['TotalPrice'] = totalPrice;
- if (priceExplanation != null)
- map['PriceExplanation'] = priceExplanation;
- return map;
- }
- }
- class UpdateServicePackForLabelsRequest extends TokenRequest{
- String? code;
- List<String>? labels;
- UpdateServicePackForLabelsRequest({
- this.code,
- this.labels,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateServicePackForLabelsRequest.fromJson(Map<String, dynamic> map) {
- return UpdateServicePackForLabelsRequest(
- code: map['Code'],
- labels: map['Labels']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (labels != null)
- map['Labels'] = labels;
- return map;
- }
- }
|