123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991 |
- import 'liveConsultation.m.dart';
- import 'notification.m.dart';
- import 'device.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- class BaseLabelInfoDTO extends BaseDTO{
- String? code;
- String? name;
- String? parentCode;
- BaseLabelInfoDTO({
- this.code,
- this.name,
- this.parentCode,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory BaseLabelInfoDTO.fromJson(Map<String, dynamic> map) {
- return BaseLabelInfoDTO(
- code: map['Code'],
- name: map['Name'],
- parentCode: map['ParentCode'],
- 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(parentCode != null)
- map['ParentCode'] = parentCode;
- return map;
- }
- }
- enum LabelTypeEnum {
- Unknown,
- CaseLabel,
- CourseLabel,
- }
- class LabelLanguageConfigDTO {
- String? name;
- String? languageCode;
- LabelLanguageConfigDTO({
- this.name,
- this.languageCode,
- });
- factory LabelLanguageConfigDTO.fromJson(Map<String, dynamic> map) {
- return LabelLanguageConfigDTO(
- name: map['Name'],
- languageCode: map['LanguageCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(name != null)
- map['Name'] = name;
- if(languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- class CourseLabelDTO extends BaseLabelInfoDTO{
- String? languageCode;
- LabelTypeEnum type;
- OrganizationPatientTypeEnum useObjectType;
- bool isLastLevel;
- List<CourseLabelDTO >? childLabels;
- List<LabelLanguageConfigDTO >? labelLanguageConfigs;
- CourseLabelDTO({
- this.languageCode,
- this.type = LabelTypeEnum.Unknown,
- this.useObjectType = OrganizationPatientTypeEnum.Person,
- this.isLastLevel = false,
- this.childLabels,
- this.labelLanguageConfigs,
- String? code,
- String? name,
- String? parentCode,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- code: code,
- name: name,
- parentCode: parentCode,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory CourseLabelDTO.fromJson(Map<String, dynamic> map) {
- return CourseLabelDTO(
- languageCode: map['LanguageCode'],
- type: LabelTypeEnum.values.firstWhere((e) => e.index == map['Type']),
- useObjectType: OrganizationPatientTypeEnum.values.firstWhere((e) => e.index == map['UseObjectType']),
- isLastLevel: map['IsLastLevel'],
- childLabels: map['ChildLabels'] != null ? (map['ChildLabels'] as List).map((e)=>CourseLabelDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- labelLanguageConfigs: map['LabelLanguageConfigs'] != null ? (map['LabelLanguageConfigs'] as List).map((e)=>LabelLanguageConfigDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- name: map['Name'],
- parentCode: map['ParentCode'],
- 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(languageCode != null)
- map['LanguageCode'] = languageCode;
- map['Type'] = type.index;
- map['UseObjectType'] = useObjectType.index;
- map['IsLastLevel'] = isLastLevel;
- if(childLabels != null)
- map['ChildLabels'] = childLabels;
- if(labelLanguageConfigs != null)
- map['LabelLanguageConfigs'] = labelLanguageConfigs;
- return map;
- }
- }
- class QueryCourseLabelListRequest extends TokenRequest{
- String? name;
- String? languageCode;
- LabelTypeEnum type;
- String? parentCode;
- QueryCourseLabelListRequest({
- this.name,
- this.languageCode,
- this.type = LabelTypeEnum.Unknown,
- this.parentCode,
- String? token,
- }) : super(
- token: token,
- );
- factory QueryCourseLabelListRequest.fromJson(Map<String, dynamic> map) {
- return QueryCourseLabelListRequest(
- name: map['Name'],
- languageCode: map['LanguageCode'],
- type: LabelTypeEnum.values.firstWhere((e) => e.index == map['Type']),
- parentCode: map['ParentCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(name != null)
- map['Name'] = name;
- if(languageCode != null)
- map['LanguageCode'] = languageCode;
- map['Type'] = type.index;
- if(parentCode != null)
- map['ParentCode'] = parentCode;
- return map;
- }
- }
- enum CourseTypeEnum {
- Unknown,
- LiveCourse,
- VideoCourse,
- }
- enum CourseAudienceTypeEnum {
- Unknown,
- PublicClass,
- PrivateClass,
- }
- class ValueType {
- ValueType();
- factory ValueType.fromJson(Map<String, dynamic> map) {
- return ValueType(
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- return map;
- }
- }
- class Decimal extends ValueType{
- Decimal(
- ) : super(
- );
- factory Decimal.fromJson(Map<String, dynamic> map) {
- return Decimal(
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- enum CourseExaminationTypeEnum {
- Practice,
- Release,
- }
- class BaseCourseExaminationDTO {
- String? code;
- String? name;
- bool isRelease;
- CourseExaminationTypeEnum examinationType;
- DateTime? startTime;
- int examDuration;
- double totalScore;
- BaseCourseExaminationDTO({
- this.code,
- this.name,
- this.isRelease = false,
- this.examinationType = CourseExaminationTypeEnum.Practice,
- this.startTime,
- this.examDuration = 0,
- this.totalScore = 0,
- });
- factory BaseCourseExaminationDTO.fromJson(Map<String, dynamic> map) {
- return BaseCourseExaminationDTO(
- code: map['Code'],
- name: map['Name'],
- isRelease: map['IsRelease'],
- examinationType: CourseExaminationTypeEnum.values.firstWhere((e) => e.index == map['ExaminationType']),
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- examDuration: map['ExamDuration'],
- totalScore: double.parse(map['TotalScore'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- map['IsRelease'] = isRelease;
- map['ExaminationType'] = examinationType.index;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- map['ExamDuration'] = examDuration;
- map['TotalScore'] = totalScore;
- return map;
- }
- }
- enum QuestionTypeEnum {
- placeHolder_0,
- Judge,
- SingleChoice,
- MultipleChoice,
- ShortAnswer,
- }
- class QuestionOptionDTO {
- String? code;
- String? content;
- bool trueOrFalse;
- QuestionOptionDTO({
- this.code,
- this.content,
- this.trueOrFalse = false,
- });
- factory QuestionOptionDTO.fromJson(Map<String, dynamic> map) {
- return QuestionOptionDTO(
- code: map['Code'],
- content: map['Content'],
- trueOrFalse: map['TrueOrFalse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(content != null)
- map['Content'] = content;
- map['TrueOrFalse'] = trueOrFalse;
- return map;
- }
- }
- class QuestionFileDTO {
- String? sourceUrl;
- String? previewImageUrl;
- String? coverImageUrl;
- DateTime? createTime;
- String? creatorCode;
- RemedicalFileDataTypeEnum fileDataType;
- QuestionFileDTO({
- this.sourceUrl,
- this.previewImageUrl,
- this.coverImageUrl,
- this.createTime,
- this.creatorCode,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- });
- factory QuestionFileDTO.fromJson(Map<String, dynamic> map) {
- return QuestionFileDTO(
- sourceUrl: map['SourceUrl'],
- previewImageUrl: map['PreviewImageUrl'],
- coverImageUrl: map['CoverImageUrl'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- creatorCode: map['CreatorCode'],
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(sourceUrl != null)
- map['SourceUrl'] = sourceUrl;
- if(previewImageUrl != null)
- map['PreviewImageUrl'] = previewImageUrl;
- if(coverImageUrl != null)
- map['CoverImageUrl'] = coverImageUrl;
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- map['FileDataType'] = fileDataType.index;
- return map;
- }
- }
- class CourseExaminationQuestionDTO {
- String? code;
- String? stem;
- QuestionTypeEnum questionType;
- List<QuestionOptionDTO >? questionOptionList;
- List<QuestionFileDTO >? fileList;
- bool trueOrFalse;
- double score;
- CourseExaminationQuestionDTO({
- this.code,
- this.stem,
- this.questionType = QuestionTypeEnum.Judge,
- this.questionOptionList,
- this.fileList,
- this.trueOrFalse = false,
- this.score = 0,
- });
- factory CourseExaminationQuestionDTO.fromJson(Map<String, dynamic> map) {
- return CourseExaminationQuestionDTO(
- code: map['Code'],
- stem: map['Stem'],
- questionType: QuestionTypeEnum.values.firstWhere((e) => e.index == map['QuestionType']),
- questionOptionList: map['QuestionOptionList'] != null ? (map['QuestionOptionList'] as List).map((e)=>QuestionOptionDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- fileList: map['FileList'] != null ? (map['FileList'] as List).map((e)=>QuestionFileDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- trueOrFalse: map['TrueOrFalse'],
- score: double.parse(map['Score'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(stem != null)
- map['Stem'] = stem;
- map['QuestionType'] = questionType.index;
- if(questionOptionList != null)
- map['QuestionOptionList'] = questionOptionList;
- if(fileList != null)
- map['FileList'] = fileList;
- map['TrueOrFalse'] = trueOrFalse;
- map['Score'] = score;
- return map;
- }
- }
- class CourseExaminationDTO extends BaseCourseExaminationDTO{
- List<CourseExaminationQuestionDTO >? questionList;
- int submitLimitCount;
- int passingScore;
- CourseExaminationDTO({
- this.questionList,
- this.submitLimitCount = 0,
- this.passingScore = 0,
- String? code,
- String? name,
- bool isRelease = false,
- CourseExaminationTypeEnum examinationType = CourseExaminationTypeEnum.Practice,
- DateTime? startTime,
- int examDuration = 0,
- double totalScore = 0,
- }) : super(
- code: code,
- name: name,
- isRelease: isRelease,
- examinationType: examinationType,
- startTime: startTime,
- examDuration: examDuration,
- totalScore: totalScore,
- );
- factory CourseExaminationDTO.fromJson(Map<String, dynamic> map) {
- return CourseExaminationDTO(
- questionList: map['QuestionList'] != null ? (map['QuestionList'] as List).map((e)=>CourseExaminationQuestionDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- submitLimitCount: map['SubmitLimitCount'],
- passingScore: map['PassingScore'],
- code: map['Code'],
- name: map['Name'],
- isRelease: map['IsRelease'],
- examinationType: CourseExaminationTypeEnum.values.firstWhere((e) => e.index == map['ExaminationType']),
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- examDuration: map['ExamDuration'],
- totalScore: double.parse(map['TotalScore'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(questionList != null)
- map['QuestionList'] = questionList;
- map['SubmitLimitCount'] = submitLimitCount;
- map['PassingScore'] = passingScore;
- return map;
- }
- }
- class ApplyCourseRequest extends TokenRequest{
- String? name;
- String? courseIntro;
- String? teacherCode;
- String? poster;
- DateTime? startTime;
- int duration;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- String? coursewareToken;
- List<String >? caseLabelCodes;
- List<String >? courseLabelCodes;
- List<String >? userGroupCodes;
- Decimal? price;
- List<String >? courseVideoCodes;
- List<CourseExaminationDTO >? bindExams;
- List<String >? assistants;
- List<String >? experts;
- bool isAgentCourse;
- ApplyCourseRequest({
- this.name,
- this.courseIntro,
- this.teacherCode,
- this.poster,
- this.startTime,
- this.duration = 0,
- this.courseType = CourseTypeEnum.Unknown,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.coursewareToken,
- this.caseLabelCodes,
- this.courseLabelCodes,
- this.userGroupCodes,
- this.price,
- this.courseVideoCodes,
- this.bindExams,
- this.assistants,
- this.experts,
- this.isAgentCourse = false,
- String? token,
- }) : super(
- token: token,
- );
- factory ApplyCourseRequest.fromJson(Map<String, dynamic> map) {
- return ApplyCourseRequest(
- name: map['Name'],
- courseIntro: map['CourseIntro'],
- teacherCode: map['TeacherCode'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- duration: map['Duration'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- coursewareToken: map['CoursewareToken'],
- caseLabelCodes: map['CaseLabelCodes'] != null ? map['CaseLabelCodes'].cast<String>().toList() : null,
- courseLabelCodes: map['CourseLabelCodes'] != null ? map['CourseLabelCodes'].cast<String>().toList() : null,
- userGroupCodes: map['UserGroupCodes'] != null ? map['UserGroupCodes'].cast<String>().toList() : null,
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- courseVideoCodes: map['CourseVideoCodes'] != null ? map['CourseVideoCodes'].cast<String>().toList() : null,
- bindExams: map['BindExams'] != null ? (map['BindExams'] as List).map((e)=>CourseExaminationDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- assistants: map['Assistants'] != null ? map['Assistants'].cast<String>().toList() : null,
- experts: map['Experts'] != null ? map['Experts'].cast<String>().toList() : null,
- isAgentCourse: map['IsAgentCourse'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(name != null)
- map['Name'] = name;
- if(courseIntro != null)
- map['CourseIntro'] = courseIntro;
- if(teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if(poster != null)
- map['Poster'] = poster;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- map['Duration'] = duration;
- map['CourseType'] = courseType.index;
- map['AudienceType'] = audienceType.index;
- if(coursewareToken != null)
- map['CoursewareToken'] = coursewareToken;
- if(caseLabelCodes != null)
- map['CaseLabelCodes'] = caseLabelCodes;
- if(courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- if(userGroupCodes != null)
- map['UserGroupCodes'] = userGroupCodes;
- if(price != null)
- map['Price'] = price;
- if(courseVideoCodes != null)
- map['CourseVideoCodes'] = courseVideoCodes;
- if(bindExams != null)
- map['BindExams'] = bindExams;
- if(assistants != null)
- map['Assistants'] = assistants;
- if(experts != null)
- map['Experts'] = experts;
- map['IsAgentCourse'] = isAgentCourse;
- return map;
- }
- }
- class BaseCoursePageDTO {
- String? code;
- String? name;
- String? poster;
- DateTime? startTime;
- CourseStatusEnum status;
- String? teacherName;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- int duration;
- Decimal? price;
- BaseCoursePageDTO({
- this.code,
- this.name,
- this.poster,
- this.startTime,
- this.status = CourseStatusEnum.Unknown,
- this.teacherName,
- this.courseType = CourseTypeEnum.Unknown,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.duration = 0,
- this.price,
- });
- factory BaseCoursePageDTO.fromJson(Map<String, dynamic> map) {
- return BaseCoursePageDTO(
- code: map['Code'],
- name: map['Name'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- status: CourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
- teacherName: map['TeacherName'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- duration: map['Duration'],
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- if(poster != null)
- map['Poster'] = poster;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- map['Status'] = status.index;
- if(teacherName != null)
- map['TeacherName'] = teacherName;
- map['CourseType'] = courseType.index;
- map['AudienceType'] = audienceType.index;
- map['Duration'] = duration;
- if(price != null)
- map['Price'] = price;
- return map;
- }
- }
- class CoursePageDTO extends BaseCoursePageDTO{
- CoursePageDTO({
- String? code,
- String? name,
- String? poster,
- DateTime? startTime,
- CourseStatusEnum status = CourseStatusEnum.Unknown,
- String? teacherName,
- CourseTypeEnum courseType = CourseTypeEnum.Unknown,
- CourseAudienceTypeEnum audienceType = CourseAudienceTypeEnum.Unknown,
- int duration = 0,
- Decimal? price,
- }) : super(
- code: code,
- name: name,
- poster: poster,
- startTime: startTime,
- status: status,
- teacherName: teacherName,
- courseType: courseType,
- audienceType: audienceType,
- duration: duration,
- price: price,
- );
- factory CoursePageDTO.fromJson(Map<String, dynamic> map) {
- return CoursePageDTO(
- code: map['Code'],
- name: map['Name'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- status: CourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
- teacherName: map['TeacherName'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- duration: map['Duration'],
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class FindCoursePagesRequest extends PageRequest{
- String? keyword;
- List<String >? courseLabels;
- FindCoursePagesRequest({
- this.keyword,
- this.courseLabels,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindCoursePagesRequest.fromJson(Map<String, dynamic> map) {
- return FindCoursePagesRequest(
- keyword: map['Keyword'],
- courseLabels: map['CourseLabels'] != null ? map['CourseLabels'].cast<String>().toList() : null,
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(keyword != null)
- map['Keyword'] = keyword;
- if(courseLabels != null)
- map['CourseLabels'] = courseLabels;
- return map;
- }
- }
- class DeleteCourseByCodeRequest extends TokenRequest{
- String? code;
- DeleteCourseByCodeRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory DeleteCourseByCodeRequest.fromJson(Map<String, dynamic> map) {
- return DeleteCourseByCodeRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- return map;
- }
- }
- class UpdateCourseRequest extends TokenRequest{
- String? code;
- String? name;
- String? courseIntro;
- String? teacherCode;
- String? poster;
- DateTime? startTime;
- int duration;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- String? coursewareToken;
- List<String >? caseLabelCodes;
- List<String >? courseLabelCodes;
- List<String >? userGroupCodes;
- Decimal? price;
- List<String >? courseVideoCodes;
- List<CourseExaminationDTO >? bindExams;
- List<String >? assistants;
- List<String >? experts;
- bool isAgentCourse;
- UpdateCourseRequest({
- this.code,
- this.name,
- this.courseIntro,
- this.teacherCode,
- this.poster,
- this.startTime,
- this.duration = 0,
- this.courseType = CourseTypeEnum.Unknown,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.coursewareToken,
- this.caseLabelCodes,
- this.courseLabelCodes,
- this.userGroupCodes,
- this.price,
- this.courseVideoCodes,
- this.bindExams,
- this.assistants,
- this.experts,
- this.isAgentCourse = false,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateCourseRequest.fromJson(Map<String, dynamic> map) {
- return UpdateCourseRequest(
- code: map['Code'],
- name: map['Name'],
- courseIntro: map['CourseIntro'],
- teacherCode: map['TeacherCode'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- duration: map['Duration'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- coursewareToken: map['CoursewareToken'],
- caseLabelCodes: map['CaseLabelCodes'] != null ? map['CaseLabelCodes'].cast<String>().toList() : null,
- courseLabelCodes: map['CourseLabelCodes'] != null ? map['CourseLabelCodes'].cast<String>().toList() : null,
- userGroupCodes: map['UserGroupCodes'] != null ? map['UserGroupCodes'].cast<String>().toList() : null,
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- courseVideoCodes: map['CourseVideoCodes'] != null ? map['CourseVideoCodes'].cast<String>().toList() : null,
- bindExams: map['BindExams'] != null ? (map['BindExams'] as List).map((e)=>CourseExaminationDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- assistants: map['Assistants'] != null ? map['Assistants'].cast<String>().toList() : null,
- experts: map['Experts'] != null ? map['Experts'].cast<String>().toList() : null,
- isAgentCourse: map['IsAgentCourse'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- if(courseIntro != null)
- map['CourseIntro'] = courseIntro;
- if(teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if(poster != null)
- map['Poster'] = poster;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- map['Duration'] = duration;
- map['CourseType'] = courseType.index;
- map['AudienceType'] = audienceType.index;
- if(coursewareToken != null)
- map['CoursewareToken'] = coursewareToken;
- if(caseLabelCodes != null)
- map['CaseLabelCodes'] = caseLabelCodes;
- if(courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- if(userGroupCodes != null)
- map['UserGroupCodes'] = userGroupCodes;
- if(price != null)
- map['Price'] = price;
- if(courseVideoCodes != null)
- map['CourseVideoCodes'] = courseVideoCodes;
- if(bindExams != null)
- map['BindExams'] = bindExams;
- if(assistants != null)
- map['Assistants'] = assistants;
- if(experts != null)
- map['Experts'] = experts;
- map['IsAgentCourse'] = isAgentCourse;
- return map;
- }
- }
- enum CourseViewRangeEnum {
- All,
- Domestic,
- Overseas,
- }
- enum StudentCourseStatusEnum {
- All,
- SignUp,
- NoSignUp,
- Joined,
- Ended,
- }
- class StudentInfoDTO {
- String? code;
- String? name;
- String? phone;
- bool isPay;
- StudentCourseStatusEnum signCourseStatus;
- StudentInfoDTO({
- this.code,
- this.name,
- this.phone,
- this.isPay = false,
- this.signCourseStatus = StudentCourseStatusEnum.All,
- });
- factory StudentInfoDTO.fromJson(Map<String, dynamic> map) {
- return StudentInfoDTO(
- code: map['Code'],
- name: map['Name'],
- phone: map['Phone'],
- isPay: map['IsPay'],
- signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- if(phone != null)
- map['Phone'] = phone;
- map['IsPay'] = isPay;
- map['SignCourseStatus'] = signCourseStatus.index;
- return map;
- }
- }
- class BaseCourseInfoDTO {
- String? code;
- String? name;
- String? courseIntro;
- String? teacherCode;
- String? teacherName;
- String? poster;
- DateTime? startTime;
- int duration;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- String? coursewareToken;
- CourseStatusEnum status;
- CourseViewRangeEnum viewRange;
- String? creatorCode;
- String? organizationCode;
- DateTime? createTime;
- Decimal? price;
- List<String >? courseLabelCodes;
- List<String >? caseLabelCodes;
- List<String >? userGroupCodes;
- List<String >? courseVideoCodes;
- List<CourseExaminationDTO >? bindExams;
- List<StudentInfoDTO >? assistants;
- List<StudentInfoDTO >? experts;
- bool isAgentCourse;
- BaseCourseInfoDTO({
- this.code,
- this.name,
- this.courseIntro,
- this.teacherCode,
- this.teacherName,
- this.poster,
- this.startTime,
- this.duration = 0,
- this.courseType = CourseTypeEnum.Unknown,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.coursewareToken,
- this.status = CourseStatusEnum.Unknown,
- this.viewRange = CourseViewRangeEnum.All,
- this.creatorCode,
- this.organizationCode,
- this.createTime,
- this.price,
- this.courseLabelCodes,
- this.caseLabelCodes,
- this.userGroupCodes,
- this.courseVideoCodes,
- this.bindExams,
- this.assistants,
- this.experts,
- this.isAgentCourse = false,
- });
- factory BaseCourseInfoDTO.fromJson(Map<String, dynamic> map) {
- return BaseCourseInfoDTO(
- code: map['Code'],
- name: map['Name'],
- courseIntro: map['CourseIntro'],
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- duration: map['Duration'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- coursewareToken: map['CoursewareToken'],
- status: CourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- creatorCode: map['CreatorCode'],
- organizationCode: map['OrganizationCode'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- courseLabelCodes: map['CourseLabelCodes'] != null ? map['CourseLabelCodes'].cast<String>().toList() : null,
- caseLabelCodes: map['CaseLabelCodes'] != null ? map['CaseLabelCodes'].cast<String>().toList() : null,
- userGroupCodes: map['UserGroupCodes'] != null ? map['UserGroupCodes'].cast<String>().toList() : null,
- courseVideoCodes: map['CourseVideoCodes'] != null ? map['CourseVideoCodes'].cast<String>().toList() : null,
- bindExams: map['BindExams'] != null ? (map['BindExams'] as List).map((e)=>CourseExaminationDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- assistants: map['Assistants'] != null ? (map['Assistants'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- experts: map['Experts'] != null ? (map['Experts'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isAgentCourse: map['IsAgentCourse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- if(courseIntro != null)
- map['CourseIntro'] = courseIntro;
- if(teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if(teacherName != null)
- map['TeacherName'] = teacherName;
- if(poster != null)
- map['Poster'] = poster;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- map['Duration'] = duration;
- map['CourseType'] = courseType.index;
- map['AudienceType'] = audienceType.index;
- if(coursewareToken != null)
- map['CoursewareToken'] = coursewareToken;
- map['Status'] = status.index;
- map['ViewRange'] = viewRange.index;
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(organizationCode != null)
- map['OrganizationCode'] = organizationCode;
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if(price != null)
- map['Price'] = price;
- if(courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- if(caseLabelCodes != null)
- map['CaseLabelCodes'] = caseLabelCodes;
- if(userGroupCodes != null)
- map['UserGroupCodes'] = userGroupCodes;
- if(courseVideoCodes != null)
- map['CourseVideoCodes'] = courseVideoCodes;
- if(bindExams != null)
- map['BindExams'] = bindExams;
- if(assistants != null)
- map['Assistants'] = assistants;
- if(experts != null)
- map['Experts'] = experts;
- map['IsAgentCourse'] = isAgentCourse;
- return map;
- }
- }
- class BaseUserGroupDTO extends BaseDTO{
- String? code;
- String? name;
- BaseUserGroupDTO({
- this.code,
- this.name,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory BaseUserGroupDTO.fromJson(Map<String, dynamic> map) {
- return BaseUserGroupDTO(
- code: map['Code'],
- name: map['Name'],
- 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;
- return map;
- }
- }
- class VideoInfoDTO {
- String? code;
- String? name;
- String? videoToken;
- String? poster;
- String? vodFileId;
- int duration;
- double videoSize;
- DateTime? createTime;
- VideoInfoDTO({
- this.code,
- this.name,
- this.videoToken,
- this.poster,
- this.vodFileId,
- this.duration = 0,
- this.videoSize = 0,
- this.createTime,
- });
- factory VideoInfoDTO.fromJson(Map<String, dynamic> map) {
- return VideoInfoDTO(
- code: map['Code'],
- name: map['Name'],
- videoToken: map['VideoToken'],
- poster: map['Poster'],
- vodFileId: map['VodFileId'],
- duration: map['Duration'],
- videoSize: double.parse(map['VideoSize'].toString()),
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- if(videoToken != null)
- map['VideoToken'] = videoToken;
- if(poster != null)
- map['Poster'] = poster;
- if(vodFileId != null)
- map['VodFileId'] = vodFileId;
- map['Duration'] = duration;
- map['VideoSize'] = videoSize;
- if(createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- return map;
- }
- }
- class CourseInfoDetailDTO extends BaseCourseInfoDTO{
- List<StudentInfoDTO >? students;
- List<BaseLabelInfoDTO >? caseLabels;
- List<BaseLabelInfoDTO >? courseLabels;
- List<BaseUserGroupDTO >? userGroups;
- List<VideoInfoDTO >? courseVideos;
- bool needPay;
- StudentCourseStatusEnum signCourseStatus;
- bool isPay;
- CourseInfoDetailDTO({
- this.students,
- this.caseLabels,
- this.courseLabels,
- this.userGroups,
- this.courseVideos,
- this.needPay = false,
- this.signCourseStatus = StudentCourseStatusEnum.All,
- this.isPay = false,
- String? code,
- String? name,
- String? courseIntro,
- String? teacherCode,
- String? teacherName,
- String? poster,
- DateTime? startTime,
- int duration = 0,
- CourseTypeEnum courseType = CourseTypeEnum.Unknown,
- CourseAudienceTypeEnum audienceType = CourseAudienceTypeEnum.Unknown,
- String? coursewareToken,
- CourseStatusEnum status = CourseStatusEnum.Unknown,
- CourseViewRangeEnum viewRange = CourseViewRangeEnum.All,
- String? creatorCode,
- String? organizationCode,
- DateTime? createTime,
- Decimal? price,
- List<String >? courseLabelCodes,
- List<String >? caseLabelCodes,
- List<String >? userGroupCodes,
- List<String >? courseVideoCodes,
- List<CourseExaminationDTO >? bindExams,
- List<StudentInfoDTO >? assistants,
- List<StudentInfoDTO >? experts,
- bool isAgentCourse = false,
- }) : super(
- code: code,
- name: name,
- courseIntro: courseIntro,
- teacherCode: teacherCode,
- teacherName: teacherName,
- poster: poster,
- startTime: startTime,
- duration: duration,
- courseType: courseType,
- audienceType: audienceType,
- coursewareToken: coursewareToken,
- status: status,
- viewRange: viewRange,
- creatorCode: creatorCode,
- organizationCode: organizationCode,
- createTime: createTime,
- price: price,
- courseLabelCodes: courseLabelCodes,
- caseLabelCodes: caseLabelCodes,
- userGroupCodes: userGroupCodes,
- courseVideoCodes: courseVideoCodes,
- bindExams: bindExams,
- assistants: assistants,
- experts: experts,
- isAgentCourse: isAgentCourse,
- );
- factory CourseInfoDetailDTO.fromJson(Map<String, dynamic> map) {
- return CourseInfoDetailDTO(
- students: map['Students'] != null ? (map['Students'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- caseLabels: map['CaseLabels'] != null ? (map['CaseLabels'] as List).map((e)=>BaseLabelInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseLabels: map['CourseLabels'] != null ? (map['CourseLabels'] as List).map((e)=>BaseLabelInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- userGroups: map['UserGroups'] != null ? (map['UserGroups'] as List).map((e)=>BaseUserGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseVideos: map['CourseVideos'] != null ? (map['CourseVideos'] as List).map((e)=>VideoInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- needPay: map['NeedPay'],
- signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
- isPay: map['IsPay'],
- code: map['Code'],
- name: map['Name'],
- courseIntro: map['CourseIntro'],
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- duration: map['Duration'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- coursewareToken: map['CoursewareToken'],
- status: CourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- creatorCode: map['CreatorCode'],
- organizationCode: map['OrganizationCode'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- courseLabelCodes: map['CourseLabelCodes'] != null ? map['CourseLabelCodes'].cast<String>().toList() : null,
- caseLabelCodes: map['CaseLabelCodes'] != null ? map['CaseLabelCodes'].cast<String>().toList() : null,
- userGroupCodes: map['UserGroupCodes'] != null ? map['UserGroupCodes'].cast<String>().toList() : null,
- courseVideoCodes: map['CourseVideoCodes'] != null ? map['CourseVideoCodes'].cast<String>().toList() : null,
- bindExams: map['BindExams'] != null ? (map['BindExams'] as List).map((e)=>CourseExaminationDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- assistants: map['Assistants'] != null ? (map['Assistants'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- experts: map['Experts'] != null ? (map['Experts'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isAgentCourse: map['IsAgentCourse'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(students != null)
- map['Students'] = students;
- if(caseLabels != null)
- map['CaseLabels'] = caseLabels;
- if(courseLabels != null)
- map['CourseLabels'] = courseLabels;
- if(userGroups != null)
- map['UserGroups'] = userGroups;
- if(courseVideos != null)
- map['CourseVideos'] = courseVideos;
- map['NeedPay'] = needPay;
- map['SignCourseStatus'] = signCourseStatus.index;
- map['IsPay'] = isPay;
- return map;
- }
- }
- class FindCourseByCodeRequest extends TokenRequest{
- String? code;
- String? languageCode;
- FindCourseByCodeRequest({
- this.code,
- this.languageCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindCourseByCodeRequest.fromJson(Map<String, dynamic> map) {
- return FindCourseByCodeRequest(
- code: map['Code'],
- languageCode: map['LanguageCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- class StudentInCoursePageDTO extends BaseCoursePageDTO{
- StudentCourseStatusEnum signCourseStatus;
- bool isPay;
- StudentInCoursePageDTO({
- this.signCourseStatus = StudentCourseStatusEnum.All,
- this.isPay = false,
- String? code,
- String? name,
- String? poster,
- DateTime? startTime,
- CourseStatusEnum status = CourseStatusEnum.Unknown,
- String? teacherName,
- CourseTypeEnum courseType = CourseTypeEnum.Unknown,
- CourseAudienceTypeEnum audienceType = CourseAudienceTypeEnum.Unknown,
- int duration = 0,
- Decimal? price,
- }) : super(
- code: code,
- name: name,
- poster: poster,
- startTime: startTime,
- status: status,
- teacherName: teacherName,
- courseType: courseType,
- audienceType: audienceType,
- duration: duration,
- price: price,
- );
- factory StudentInCoursePageDTO.fromJson(Map<String, dynamic> map) {
- return StudentInCoursePageDTO(
- signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
- isPay: map['IsPay'],
- code: map['Code'],
- name: map['Name'],
- poster: map['Poster'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- status: CourseStatusEnum.values.firstWhere((e) => e.index == map['Status']),
- teacherName: map['TeacherName'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- duration: map['Duration'],
- price: map['Price'] != null ? Decimal.fromJson(map['Price']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['SignCourseStatus'] = signCourseStatus.index;
- map['IsPay'] = isPay;
- return map;
- }
- }
- enum QueryCourseSortEnum {
- StartTime,
- Recommended,
- }
- enum QueryCourseTypeEnum {
- All,
- LiveCourse,
- VideoCourse,
- }
- class FindStudentInCoursePagesRequest extends PageRequest{
- String? keyword;
- StudentCourseStatusEnum queryStatus;
- DateTime? startTime;
- QueryCourseSortEnum queryCourseSort;
- QueryCourseTypeEnum courseType;
- FindStudentInCoursePagesRequest({
- this.keyword,
- this.queryStatus = StudentCourseStatusEnum.All,
- this.startTime,
- this.queryCourseSort = QueryCourseSortEnum.StartTime,
- this.courseType = QueryCourseTypeEnum.All,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindStudentInCoursePagesRequest.fromJson(Map<String, dynamic> map) {
- return FindStudentInCoursePagesRequest(
- keyword: map['Keyword'],
- queryStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['QueryStatus']),
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- queryCourseSort: QueryCourseSortEnum.values.firstWhere((e) => e.index == map['QueryCourseSort']),
- courseType: QueryCourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(keyword != null)
- map['Keyword'] = keyword;
- map['QueryStatus'] = queryStatus.index;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- map['QueryCourseSort'] = queryCourseSort.index;
- map['CourseType'] = courseType.index;
- return map;
- }
- }
- class UserGroupDTO extends BaseUserGroupDTO{
- int maxPeople;
- String? creatorCode;
- String? creatorName;
- List<StudentInfoDTO >? students;
- UserGroupDTO({
- this.maxPeople = 0,
- this.creatorCode,
- this.creatorName,
- this.students,
- String? code,
- String? name,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- code: code,
- name: name,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory UserGroupDTO.fromJson(Map<String, dynamic> map) {
- return UserGroupDTO(
- maxPeople: map['MaxPeople'],
- creatorCode: map['CreatorCode'],
- creatorName: map['CreatorName'],
- students: map['Students'] != null ? (map['Students'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- name: map['Name'],
- 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();
- map['MaxPeople'] = maxPeople;
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(creatorName != null)
- map['CreatorName'] = creatorName;
- if(students != null)
- map['Students'] = students;
- return map;
- }
- }
- class UserGroupRequest extends TokenRequest{
- String? code;
- String? name;
- int maxPeople;
- String? creatorCode;
- List<StudentInfoDTO >? students;
- List<String >? removeStudentCodes;
- UserGroupRequest({
- this.code,
- this.name,
- this.maxPeople = 0,
- this.creatorCode,
- this.students,
- this.removeStudentCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory UserGroupRequest.fromJson(Map<String, dynamic> map) {
- return UserGroupRequest(
- code: map['Code'],
- name: map['Name'],
- maxPeople: map['MaxPeople'],
- creatorCode: map['CreatorCode'],
- students: map['Students'] != null ? (map['Students'] as List).map((e)=>StudentInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- removeStudentCodes: map['RemoveStudentCodes'] != null ? map['RemoveStudentCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- map['MaxPeople'] = maxPeople;
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(students != null)
- map['Students'] = students;
- if(removeStudentCodes != null)
- map['RemoveStudentCodes'] = removeStudentCodes;
- return map;
- }
- }
- class QueryStudentByGroupCodePageRequest extends PageRequest{
- String? keyword;
- String? userGroupCode;
- QueryStudentByGroupCodePageRequest({
- this.keyword,
- this.userGroupCode,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory QueryStudentByGroupCodePageRequest.fromJson(Map<String, dynamic> map) {
- return QueryStudentByGroupCodePageRequest(
- keyword: map['Keyword'],
- userGroupCode: map['UserGroupCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(keyword != null)
- map['Keyword'] = keyword;
- if(userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- return map;
- }
- }
- class UserGroupFilterRequest extends TokenRequest{
- String? userGroupCode;
- String? creatorCode;
- String? keyword;
- List<String >? studentCodes;
- UserGroupFilterRequest({
- this.userGroupCode,
- this.creatorCode,
- this.keyword,
- this.studentCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory UserGroupFilterRequest.fromJson(Map<String, dynamic> map) {
- return UserGroupFilterRequest(
- userGroupCode: map['UserGroupCode'],
- creatorCode: map['CreatorCode'],
- keyword: map['Keyword'],
- studentCodes: map['StudentCodes'] != null ? map['StudentCodes'].cast<String>().toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- if(creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if(keyword != null)
- map['Keyword'] = keyword;
- if(studentCodes != null)
- map['StudentCodes'] = studentCodes;
- return map;
- }
- }
- class SaveVideoRequest extends TokenRequest{
- String? courseCode;
- String? code;
- String? name;
- String? videoToken;
- String? vodFileId;
- String? poster;
- int duration;
- double videoSize;
- SaveVideoRequest({
- this.courseCode,
- this.code,
- this.name,
- this.videoToken,
- this.vodFileId,
- this.poster,
- this.duration = 0,
- this.videoSize = 0,
- String? token,
- }) : super(
- token: token,
- );
- factory SaveVideoRequest.fromJson(Map<String, dynamic> map) {
- return SaveVideoRequest(
- courseCode: map['CourseCode'],
- code: map['Code'],
- name: map['Name'],
- videoToken: map['VideoToken'],
- vodFileId: map['VodFileId'],
- poster: map['Poster'],
- duration: map['Duration'],
- videoSize: double.parse(map['VideoSize'].toString()),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(code != null)
- map['Code'] = code;
- if(name != null)
- map['Name'] = name;
- if(videoToken != null)
- map['VideoToken'] = videoToken;
- if(vodFileId != null)
- map['VodFileId'] = vodFileId;
- if(poster != null)
- map['Poster'] = poster;
- map['Duration'] = duration;
- map['VideoSize'] = videoSize;
- return map;
- }
- }
- class FindVideoPagesRequest extends PageRequest{
- String? keyword;
- String? courseCode;
- FindVideoPagesRequest({
- this.keyword,
- this.courseCode,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindVideoPagesRequest.fromJson(Map<String, dynamic> map) {
- return FindVideoPagesRequest(
- keyword: map['Keyword'],
- courseCode: map['CourseCode'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(keyword != null)
- map['Keyword'] = keyword;
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class DeleteVideoRequest extends TokenRequest{
- String? code;
- String? courseCode;
- DeleteVideoRequest({
- this.code,
- this.courseCode,
- String? token,
- }) : super(
- token: token,
- );
- factory DeleteVideoRequest.fromJson(Map<String, dynamic> map) {
- return DeleteVideoRequest(
- code: map['Code'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class BuyCourseResult {
- String? courseCode;
- String? paymentOrderCode;
- String? orderTitle;
- double orderAmount;
- String? payUrl;
- BuyCourseResult({
- this.courseCode,
- this.paymentOrderCode,
- this.orderTitle,
- this.orderAmount = 0,
- this.payUrl,
- });
- factory BuyCourseResult.fromJson(Map<String, dynamic> map) {
- return BuyCourseResult(
- courseCode: map['CourseCode'],
- paymentOrderCode: map['PaymentOrderCode'],
- orderTitle: map['OrderTitle'],
- orderAmount: double.parse(map['OrderAmount'].toString()),
- payUrl: map['PayUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(paymentOrderCode != null)
- map['PaymentOrderCode'] = paymentOrderCode;
- if(orderTitle != null)
- map['OrderTitle'] = orderTitle;
- map['OrderAmount'] = orderAmount;
- if(payUrl != null)
- map['PayUrl'] = payUrl;
- return map;
- }
- }
- enum PayTypeEnum {
- Alipay_PAGE,
- Alipay_WAP,
- WeChat_PAGE,
- WeChat_WAP,
- Paypal,
- }
- class BuyCourseRequest extends TokenRequest{
- String? courseCode;
- int quantity;
- PayTypeEnum payType;
- BuyCourseRequest({
- this.courseCode,
- this.quantity = 0,
- this.payType = PayTypeEnum.Alipay_PAGE,
- String? token,
- }) : super(
- token: token,
- );
- factory BuyCourseRequest.fromJson(Map<String, dynamic> map) {
- return BuyCourseRequest(
- courseCode: map['CourseCode'],
- quantity: map['Quantity'],
- payType: PayTypeEnum.values.firstWhere((e) => e.index == map['PayType']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- map['Quantity'] = quantity;
- map['PayType'] = payType.index;
- return map;
- }
- }
- enum PayStatusEnum {
- NoPay,
- InPayment,
- Paid,
- }
- class PaymentCallbackRequest extends TokenRequest{
- String? paymentOrderCode;
- PayStatusEnum payStatus;
- DateTime? payTime;
- PaymentCallbackRequest({
- this.paymentOrderCode,
- this.payStatus = PayStatusEnum.NoPay,
- this.payTime,
- String? token,
- }) : super(
- token: token,
- );
- factory PaymentCallbackRequest.fromJson(Map<String, dynamic> map) {
- return PaymentCallbackRequest(
- paymentOrderCode: map['PaymentOrderCode'],
- payStatus: PayStatusEnum.values.firstWhere((e) => e.index == map['PayStatus']),
- payTime: map['PayTime'] != null ? DateTime.parse(map['PayTime']) : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(paymentOrderCode != null)
- map['PaymentOrderCode'] = paymentOrderCode;
- map['PayStatus'] = payStatus.index;
- if(payTime != null)
- map['PayTime'] = JsonRpcUtils.dateFormat(payTime!);
- return map;
- }
- }
- class SignUpCourseRequest extends TokenRequest{
- String? courseCode;
- SignUpCourseRequest({
- this.courseCode,
- String? token,
- }) : super(
- token: token,
- );
- factory SignUpCourseRequest.fromJson(Map<String, dynamic> map) {
- return SignUpCourseRequest(
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class CancelSignUpCourseRequest extends TokenRequest{
- String? courseCode;
- CancelSignUpCourseRequest({
- this.courseCode,
- String? token,
- }) : super(
- token: token,
- );
- factory CancelSignUpCourseRequest.fromJson(Map<String, dynamic> map) {
- return CancelSignUpCourseRequest(
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class PublishCourseExaminationPaperRequest extends TokenRequest{
- String? code;
- String? courseCode;
- DateTime? startTime;
- PublishCourseExaminationPaperRequest({
- this.code,
- this.courseCode,
- this.startTime,
- String? token,
- }) : super(
- token: token,
- );
- factory PublishCourseExaminationPaperRequest.fromJson(Map<String, dynamic> map) {
- return PublishCourseExaminationPaperRequest(
- code: map['Code'],
- courseCode: map['CourseCode'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- return map;
- }
- }
- class FindCourseExaminationPapersRequest extends TokenRequest{
- String? courseCode;
- FindCourseExaminationPapersRequest({
- this.courseCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindCourseExaminationPapersRequest.fromJson(Map<String, dynamic> map) {
- return FindCourseExaminationPapersRequest(
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class FindCourseExaminationPaperByCodeRequest extends TokenRequest{
- String? code;
- String? courseCode;
- FindCourseExaminationPaperByCodeRequest({
- this.code,
- this.courseCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindCourseExaminationPaperByCodeRequest.fromJson(Map<String, dynamic> map) {
- return FindCourseExaminationPaperByCodeRequest(
- code: map['Code'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class StudentSetExaminationAnswerDTO {
- String? questionCode;
- String? answer;
- List<String >? files;
- List<String >? optionCodeList;
- StudentSetExaminationAnswerDTO({
- this.questionCode,
- this.answer,
- this.files,
- this.optionCodeList,
- });
- factory StudentSetExaminationAnswerDTO.fromJson(Map<String, dynamic> map) {
- return StudentSetExaminationAnswerDTO(
- questionCode: map['QuestionCode'],
- answer: map['Answer'],
- files: map['Files'] != null ? map['Files'].cast<String>().toList() : null,
- optionCodeList: map['OptionCodeList'] != null ? map['OptionCodeList'].cast<String>().toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(questionCode != null)
- map['QuestionCode'] = questionCode;
- if(answer != null)
- map['Answer'] = answer;
- if(files != null)
- map['Files'] = files;
- if(optionCodeList != null)
- map['OptionCodeList'] = optionCodeList;
- return map;
- }
- }
- class SubmitCourseExaminationPaperRequest extends TokenRequest{
- String? courseCode;
- String? code;
- List<StudentSetExaminationAnswerDTO >? answers;
- SubmitCourseExaminationPaperRequest({
- this.courseCode,
- this.code,
- this.answers,
- String? token,
- }) : super(
- token: token,
- );
- factory SubmitCourseExaminationPaperRequest.fromJson(Map<String, dynamic> map) {
- return SubmitCourseExaminationPaperRequest(
- courseCode: map['CourseCode'],
- code: map['Code'],
- answers: map['Answers'] != null ? (map['Answers'] as List).map((e)=>StudentSetExaminationAnswerDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(code != null)
- map['Code'] = code;
- if(answers != null)
- map['Answers'] = answers;
- return map;
- }
- }
- class BaseStudentExaminationDTO {
- String? code;
- String? examinationCode;
- String? studentCode;
- String? studentName;
- double totalScore;
- BaseStudentExaminationDTO({
- this.code,
- this.examinationCode,
- this.studentCode,
- this.studentName,
- this.totalScore = 0,
- });
- factory BaseStudentExaminationDTO.fromJson(Map<String, dynamic> map) {
- return BaseStudentExaminationDTO(
- code: map['Code'],
- examinationCode: map['ExaminationCode'],
- studentCode: map['StudentCode'],
- studentName: map['StudentName'],
- totalScore: double.parse(map['TotalScore'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- if(examinationCode != null)
- map['ExaminationCode'] = examinationCode;
- if(studentCode != null)
- map['StudentCode'] = studentCode;
- if(studentName != null)
- map['StudentName'] = studentName;
- map['TotalScore'] = totalScore;
- return map;
- }
- }
- class FindCourseStudentExaminationPagesRequest extends PageRequest{
- String? courseCode;
- String? keyword;
- FindCourseStudentExaminationPagesRequest({
- this.courseCode,
- this.keyword,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindCourseStudentExaminationPagesRequest.fromJson(Map<String, dynamic> map) {
- return FindCourseStudentExaminationPagesRequest(
- courseCode: map['CourseCode'],
- keyword: map['Keyword'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(keyword != null)
- map['Keyword'] = keyword;
- return map;
- }
- }
- class ExaminationAnswerDTO {
- String? questionCode;
- QuestionTypeEnum questionType;
- String? answer;
- List<String >? files;
- List<String >? optionCodeList;
- bool isCorrect;
- double score;
- ExaminationAnswerDTO({
- this.questionCode,
- this.questionType = QuestionTypeEnum.Judge,
- this.answer,
- this.files,
- this.optionCodeList,
- this.isCorrect = false,
- this.score = 0,
- });
- factory ExaminationAnswerDTO.fromJson(Map<String, dynamic> map) {
- return ExaminationAnswerDTO(
- questionCode: map['QuestionCode'],
- questionType: QuestionTypeEnum.values.firstWhere((e) => e.index == map['QuestionType']),
- answer: map['Answer'],
- files: map['Files'] != null ? map['Files'].cast<String>().toList() : null,
- optionCodeList: map['OptionCodeList'] != null ? map['OptionCodeList'].cast<String>().toList() : null,
- isCorrect: map['IsCorrect'],
- score: double.parse(map['Score'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(questionCode != null)
- map['QuestionCode'] = questionCode;
- map['QuestionType'] = questionType.index;
- if(answer != null)
- map['Answer'] = answer;
- if(files != null)
- map['Files'] = files;
- if(optionCodeList != null)
- map['OptionCodeList'] = optionCodeList;
- map['IsCorrect'] = isCorrect;
- map['Score'] = score;
- return map;
- }
- }
- class StudentExaminationDetailDTO extends BaseStudentExaminationDTO{
- CourseExaminationDTO? examination;
- List<ExaminationAnswerDTO >? studentAnswers;
- StudentExaminationDetailDTO({
- this.examination,
- this.studentAnswers,
- String? code,
- String? examinationCode,
- String? studentCode,
- String? studentName,
- double totalScore = 0,
- }) : super(
- code: code,
- examinationCode: examinationCode,
- studentCode: studentCode,
- studentName: studentName,
- totalScore: totalScore,
- );
- factory StudentExaminationDetailDTO.fromJson(Map<String, dynamic> map) {
- return StudentExaminationDetailDTO(
- examination: map['Examination'] != null ? CourseExaminationDTO.fromJson(map['Examination']) : null,
- studentAnswers: map['StudentAnswers'] != null ? (map['StudentAnswers'] as List).map((e)=>ExaminationAnswerDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- code: map['Code'],
- examinationCode: map['ExaminationCode'],
- studentCode: map['StudentCode'],
- studentName: map['StudentName'],
- totalScore: double.parse(map['TotalScore'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(examination != null)
- map['Examination'] = examination;
- if(studentAnswers != null)
- map['StudentAnswers'] = studentAnswers;
- return map;
- }
- }
- class FindStudentExaminationByCodeRequest extends TokenRequest{
- String? code;
- FindStudentExaminationByCodeRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory FindStudentExaminationByCodeRequest.fromJson(Map<String, dynamic> map) {
- return FindStudentExaminationByCodeRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- return map;
- }
- }
- class TeacherSetExaminationAnswerDTO {
- String? questionCode;
- bool isCorrect;
- double score;
- TeacherSetExaminationAnswerDTO({
- this.questionCode,
- this.isCorrect = false,
- this.score = 0,
- });
- factory TeacherSetExaminationAnswerDTO.fromJson(Map<String, dynamic> map) {
- return TeacherSetExaminationAnswerDTO(
- questionCode: map['QuestionCode'],
- isCorrect: map['IsCorrect'],
- score: double.parse(map['Score'].toString()),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(questionCode != null)
- map['QuestionCode'] = questionCode;
- map['IsCorrect'] = isCorrect;
- map['Score'] = score;
- return map;
- }
- }
- class SubmitReviewStudentExaminationRequest extends TokenRequest{
- String? code;
- List<TeacherSetExaminationAnswerDTO >? answers;
- SubmitReviewStudentExaminationRequest({
- this.code,
- this.answers,
- String? token,
- }) : super(
- token: token,
- );
- factory SubmitReviewStudentExaminationRequest.fromJson(Map<String, dynamic> map) {
- return SubmitReviewStudentExaminationRequest(
- code: map['Code'],
- answers: map['Answers'] != null ? (map['Answers'] as List).map((e)=>TeacherSetExaminationAnswerDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- if(answers != null)
- map['Answers'] = answers;
- return map;
- }
- }
- class FindMyCourseStudentExaminationResultPagesRequest extends PageRequest{
- String? courseCode;
- String? keyword;
- FindMyCourseStudentExaminationResultPagesRequest({
- this.courseCode,
- this.keyword,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindMyCourseStudentExaminationResultPagesRequest.fromJson(Map<String, dynamic> map) {
- return FindMyCourseStudentExaminationResultPagesRequest(
- courseCode: map['CourseCode'],
- keyword: map['Keyword'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(keyword != null)
- map['Keyword'] = keyword;
- return map;
- }
- }
- class FindMyCourseStudentExaminationResultRequest extends TokenRequest{
- String? code;
- FindMyCourseStudentExaminationResultRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory FindMyCourseStudentExaminationResultRequest.fromJson(Map<String, dynamic> map) {
- return FindMyCourseStudentExaminationResultRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(code != null)
- map['Code'] = code;
- return map;
- }
- }
- class LiveCourseBaseResult {
- String? courseCode;
- LiveCourseBaseResult({
- this.courseCode,
- });
- factory LiveCourseBaseResult.fromJson(Map<String, dynamic> map) {
- return LiveCourseBaseResult(
- courseCode: map['CourseCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- enum LiveMemberStatus {
- Default,
- Accepted,
- Rejected,
- Joined,
- Left,
- }
- class LiveCourseMember {
- String? id;
- String? name;
- LiveMemberEnum memberType;
- String? headImageToken;
- UserStatusEnum userStatusType;
- bool mute;
- bool videoOpend;
- bool isTeacher;
- bool isExpertUser;
- bool isAssistantUser;
- LiveMemberStatus status;
- String? loginServerUrl;
- LoginSource loginSource;
- LiveDataDTO? liveData;
- List<VideoDeviceOutputInfo >? videoDeviceInfos;
- bool isControllingParameter;
- bool mergedChannel;
- int mergedVideoOutputWidth;
- int mergedVideoOutputHeight;
- LiveCourseMember({
- this.id,
- this.name,
- this.memberType = LiveMemberEnum.User,
- this.headImageToken,
- this.userStatusType = UserStatusEnum.NotOnline,
- this.mute = false,
- this.videoOpend = false,
- this.isTeacher = false,
- this.isExpertUser = false,
- this.isAssistantUser = false,
- this.status = LiveMemberStatus.Default,
- this.loginServerUrl,
- this.loginSource = LoginSource.PC,
- this.liveData,
- this.videoDeviceInfos,
- this.isControllingParameter = false,
- this.mergedChannel = false,
- this.mergedVideoOutputWidth = 0,
- this.mergedVideoOutputHeight = 0,
- });
- factory LiveCourseMember.fromJson(Map<String, dynamic> map) {
- return LiveCourseMember(
- id: map['Id'],
- name: map['Name'],
- memberType: LiveMemberEnum.values.firstWhere((e) => e.index == map['MemberType']),
- headImageToken: map['HeadImageToken'],
- userStatusType: UserStatusEnum.values.firstWhere((e) => e.index == map['UserStatusType']),
- mute: map['Mute'],
- videoOpend: map['VideoOpend'],
- isTeacher: map['IsTeacher'],
- isExpertUser: map['IsExpertUser'],
- isAssistantUser: map['IsAssistantUser'],
- status: LiveMemberStatus.values.firstWhere((e) => e.index == map['Status']),
- loginServerUrl: map['LoginServerUrl'],
- loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
- liveData: map['LiveData'] != null ? LiveDataDTO.fromJson(map['LiveData']) : null,
- videoDeviceInfos: map['VideoDeviceInfos'] != null ? (map['VideoDeviceInfos'] as List).map((e)=>VideoDeviceOutputInfo.fromJson(e as Map<String,dynamic>)).toList() : null,
- isControllingParameter: map['IsControllingParameter'],
- mergedChannel: map['MergedChannel'],
- mergedVideoOutputWidth: map['MergedVideoOutputWidth'],
- mergedVideoOutputHeight: map['MergedVideoOutputHeight'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(id != null)
- map['Id'] = id;
- if(name != null)
- map['Name'] = name;
- map['MemberType'] = memberType.index;
- if(headImageToken != null)
- map['HeadImageToken'] = headImageToken;
- map['UserStatusType'] = userStatusType.index;
- map['Mute'] = mute;
- map['VideoOpend'] = videoOpend;
- map['IsTeacher'] = isTeacher;
- map['IsExpertUser'] = isExpertUser;
- map['IsAssistantUser'] = isAssistantUser;
- map['Status'] = status.index;
- if(loginServerUrl != null)
- map['LoginServerUrl'] = loginServerUrl;
- map['LoginSource'] = loginSource.index;
- if(liveData != null)
- map['LiveData'] = liveData;
- if(videoDeviceInfos != null)
- map['VideoDeviceInfos'] = videoDeviceInfos;
- map['IsControllingParameter'] = isControllingParameter;
- map['MergedChannel'] = mergedChannel;
- map['MergedVideoOutputWidth'] = mergedVideoOutputWidth;
- map['MergedVideoOutputHeight'] = mergedVideoOutputHeight;
- return map;
- }
- }
- class InitiateLiveCourseResult extends LiveCourseBaseResult{
- String? initiatorCode;
- int roomNo;
- int appId;
- String? userSign;
- List<LiveCourseMember >? memberLiveDatas;
- InitiateLiveCourseResult({
- this.initiatorCode,
- this.roomNo = 0,
- this.appId = 0,
- this.userSign,
- this.memberLiveDatas,
- String? courseCode,
- }) : super(
- courseCode: courseCode,
- );
- factory InitiateLiveCourseResult.fromJson(Map<String, dynamic> map) {
- return InitiateLiveCourseResult(
- initiatorCode: map['InitiatorCode'],
- roomNo: map['RoomNo'],
- appId: map['AppId'],
- userSign: map['UserSign'],
- memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveCourseMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseCode: map['CourseCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(initiatorCode != null)
- map['InitiatorCode'] = initiatorCode;
- map['RoomNo'] = roomNo;
- map['AppId'] = appId;
- if(userSign != null)
- map['UserSign'] = userSign;
- if(memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- return map;
- }
- }
- class InitiateLiveCourseRequest extends TokenRequest{
- String? courseCode;
- InitiateLiveCourseRequest({
- this.courseCode,
- String? token,
- }) : super(
- token: token,
- );
- factory InitiateLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return InitiateLiveCourseRequest(
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- return map;
- }
- }
- class JoinLiveCourseResult extends LiveCourseBaseResult{
- String? userCode;
- int roomNo;
- int appId;
- String? userSign;
- List<LiveCourseMember >? memberLiveDatas;
- JoinLiveCourseResult({
- this.userCode,
- this.roomNo = 0,
- this.appId = 0,
- this.userSign,
- this.memberLiveDatas,
- String? courseCode,
- }) : super(
- courseCode: courseCode,
- );
- factory JoinLiveCourseResult.fromJson(Map<String, dynamic> map) {
- return JoinLiveCourseResult(
- userCode: map['UserCode'],
- roomNo: map['RoomNo'],
- appId: map['AppId'],
- userSign: map['UserSign'],
- memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveCourseMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseCode: map['CourseCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(userCode != null)
- map['UserCode'] = userCode;
- map['RoomNo'] = roomNo;
- map['AppId'] = appId;
- if(userSign != null)
- map['UserSign'] = userSign;
- if(memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- return map;
- }
- }
- class JoinLiveCourseRequest extends InitiateLiveCourseRequest{
- String? deviceCode;
- JoinLiveCourseRequest({
- this.deviceCode,
- String? courseCode,
- String? token,
- }) : super(
- courseCode: courseCode,
- token: token,
- );
- factory JoinLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return JoinLiveCourseRequest(
- deviceCode: map['DeviceCode'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- return map;
- }
- }
- class LiveHeartRateResult {
- String? liveCode;
- LiveHeartRateResult({
- this.liveCode,
- });
- factory LiveHeartRateResult.fromJson(Map<String, dynamic> map) {
- return LiveHeartRateResult(
- liveCode: map['LiveCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(liveCode != null)
- map['LiveCode'] = liveCode;
- return map;
- }
- }
- class LiveHeartRateRequest extends TokenRequest{
- String? liveCode;
- LiveHeartRateRequest({
- this.liveCode,
- String? token,
- }) : super(
- token: token,
- );
- factory LiveHeartRateRequest.fromJson(Map<String, dynamic> map) {
- return LiveHeartRateRequest(
- liveCode: map['LiveCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(liveCode != null)
- map['LiveCode'] = liveCode;
- return map;
- }
- }
- class SetMuteLiveCourseRequest extends InitiateLiveCourseRequest{
- bool isMute;
- SetMuteLiveCourseRequest({
- this.isMute = false,
- String? courseCode,
- String? token,
- }) : super(
- courseCode: courseCode,
- token: token,
- );
- factory SetMuteLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return SetMuteLiveCourseRequest(
- isMute: map['IsMute'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['IsMute'] = isMute;
- return map;
- }
- }
- class SetVideoLiveCourseRequest extends InitiateLiveCourseRequest{
- bool isOpened;
- SetVideoLiveCourseRequest({
- this.isOpened = false,
- String? courseCode,
- String? token,
- }) : super(
- courseCode: courseCode,
- token: token,
- );
- factory SetVideoLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return SetVideoLiveCourseRequest(
- isOpened: map['IsOpened'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['IsOpened'] = isOpened;
- return map;
- }
- }
- class ControlParameterInCourseRequest extends InitiateLiveCourseRequest{
- List<AdditionParameterDTO >? parameters;
- ControlDeviceParameterEnum controlType;
- ControlParameterInCourseRequest({
- this.parameters,
- this.controlType = ControlDeviceParameterEnum.Start,
- String? courseCode,
- String? token,
- }) : super(
- courseCode: courseCode,
- token: token,
- );
- factory ControlParameterInCourseRequest.fromJson(Map<String, dynamic> map) {
- return ControlParameterInCourseRequest(
- parameters: map['Parameters'] != null ? (map['Parameters'] as List).map((e)=>AdditionParameterDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(parameters != null)
- map['Parameters'] = parameters;
- map['ControlType'] = controlType.index;
- return map;
- }
- }
- class UploadRemoteExamRequest extends TokenRequest{
- String? deviceUniqueCode;
- String? previewFileToken;
- String? fileToken;
- int fileSize;
- String? coverImageToken;
- String? applicationCategory;
- String? application;
- RemedicalFileDataTypeEnum fileDataType;
- MeasuredResultsDTO? measuredResult;
- ScanImageDTO? commentResult;
- UploadRemoteExamRequest({
- this.deviceUniqueCode,
- this.previewFileToken,
- this.fileToken,
- this.fileSize = 0,
- this.coverImageToken,
- this.applicationCategory,
- this.application,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- this.measuredResult,
- this.commentResult,
- String? token,
- }) : super(
- token: token,
- );
- factory UploadRemoteExamRequest.fromJson(Map<String, dynamic> map) {
- return UploadRemoteExamRequest(
- deviceUniqueCode: map['DeviceUniqueCode'],
- previewFileToken: map['PreviewFileToken'],
- fileToken: map['FileToken'],
- fileSize: map['FileSize'],
- coverImageToken: map['CoverImageToken'],
- applicationCategory: map['ApplicationCategory'],
- application: map['Application'],
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
- commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(deviceUniqueCode != null)
- map['DeviceUniqueCode'] = deviceUniqueCode;
- if(previewFileToken != null)
- map['PreviewFileToken'] = previewFileToken;
- if(fileToken != null)
- map['FileToken'] = fileToken;
- map['FileSize'] = fileSize;
- if(coverImageToken != null)
- map['CoverImageToken'] = coverImageToken;
- if(applicationCategory != null)
- map['ApplicationCategory'] = applicationCategory;
- if(application != null)
- map['Application'] = application;
- map['FileDataType'] = fileDataType.index;
- if(measuredResult != null)
- map['MeasuredResult'] = measuredResult;
- if(commentResult != null)
- map['CommentResult'] = commentResult;
- return map;
- }
- }
- class RemoteExaminationDTO extends BaseDTO{
- String? code;
- String? deviceCode;
- String? userCode;
- String? application;
- String? previewUrl;
- String? imageUrl;
- String? coverImageUrl;
- String? originImageUrl;
- int imageSize;
- RemedicalFileDataTypeEnum fileDataType;
- MeasuredResultsDTO? measuredResult;
- ScanImageDTO? commentResult;
- RemoteExaminationDTO({
- this.code,
- this.deviceCode,
- this.userCode,
- this.application,
- this.previewUrl,
- this.imageUrl,
- this.coverImageUrl,
- this.originImageUrl,
- this.imageSize = 0,
- this.fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- this.measuredResult,
- this.commentResult,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory RemoteExaminationDTO.fromJson(Map<String, dynamic> map) {
- return RemoteExaminationDTO(
- code: map['Code'],
- deviceCode: map['DeviceCode'],
- userCode: map['UserCode'],
- application: map['Application'],
- previewUrl: map['PreviewUrl'],
- imageUrl: map['ImageUrl'],
- coverImageUrl: map['CoverImageUrl'],
- originImageUrl: map['OriginImageUrl'],
- imageSize: map['ImageSize'],
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
- commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
- 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(deviceCode != null)
- map['DeviceCode'] = deviceCode;
- if(userCode != null)
- map['UserCode'] = userCode;
- if(application != null)
- map['Application'] = application;
- if(previewUrl != null)
- map['PreviewUrl'] = previewUrl;
- if(imageUrl != null)
- map['ImageUrl'] = imageUrl;
- if(coverImageUrl != null)
- map['CoverImageUrl'] = coverImageUrl;
- if(originImageUrl != null)
- map['OriginImageUrl'] = originImageUrl;
- map['ImageSize'] = imageSize;
- map['FileDataType'] = fileDataType.index;
- if(measuredResult != null)
- map['MeasuredResult'] = measuredResult;
- if(commentResult != null)
- map['CommentResult'] = commentResult;
- return map;
- }
- }
- class RemoteExaminationPageDTO extends RemoteExaminationDTO{
- String? deviceName;
- RemoteExaminationPageDTO({
- this.deviceName,
- String? code,
- String? deviceCode,
- String? userCode,
- String? application,
- String? previewUrl,
- String? imageUrl,
- String? coverImageUrl,
- String? originImageUrl,
- int imageSize = 0,
- RemedicalFileDataTypeEnum fileDataType = RemedicalFileDataTypeEnum.VinnoVidSingle,
- MeasuredResultsDTO? measuredResult,
- ScanImageDTO? commentResult,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- code: code,
- deviceCode: deviceCode,
- userCode: userCode,
- application: application,
- previewUrl: previewUrl,
- imageUrl: imageUrl,
- coverImageUrl: coverImageUrl,
- originImageUrl: originImageUrl,
- imageSize: imageSize,
- fileDataType: fileDataType,
- measuredResult: measuredResult,
- commentResult: commentResult,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory RemoteExaminationPageDTO.fromJson(Map<String, dynamic> map) {
- return RemoteExaminationPageDTO(
- deviceName: map['DeviceName'],
- code: map['Code'],
- deviceCode: map['DeviceCode'],
- userCode: map['UserCode'],
- application: map['Application'],
- previewUrl: map['PreviewUrl'],
- imageUrl: map['ImageUrl'],
- coverImageUrl: map['CoverImageUrl'],
- originImageUrl: map['OriginImageUrl'],
- imageSize: map['ImageSize'],
- fileDataType: RemedicalFileDataTypeEnum.values.firstWhere((e) => e.index == map['FileDataType']),
- measuredResult: map['MeasuredResult'] != null ? MeasuredResultsDTO.fromJson(map['MeasuredResult']) : null,
- commentResult: map['CommentResult'] != null ? ScanImageDTO.fromJson(map['CommentResult']) : null,
- 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(deviceName != null)
- map['DeviceName'] = deviceName;
- return map;
- }
- }
- class AddStudentInCourseUserGroupRequest {
- String? userGroupCode;
- List<String >? studentCodes;
- AddStudentInCourseUserGroupRequest({
- this.userGroupCode,
- this.studentCodes,
- });
- factory AddStudentInCourseUserGroupRequest.fromJson(Map<String, dynamic> map) {
- return AddStudentInCourseUserGroupRequest(
- userGroupCode: map['UserGroupCode'],
- studentCodes: map['StudentCodes'] != null ? map['StudentCodes'].cast<String>().toList() : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- if(studentCodes != null)
- map['StudentCodes'] = studentCodes;
- return map;
- }
- }
- class StudyCompletedRequest {
- String? courseCode;
- String? studentCode;
- StudyCompletedRequest({
- this.courseCode,
- this.studentCode,
- });
- factory StudyCompletedRequest.fromJson(Map<String, dynamic> map) {
- return StudyCompletedRequest(
- courseCode: map['CourseCode'],
- studentCode: map['StudentCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(courseCode != null)
- map['CourseCode'] = courseCode;
- if(studentCode != null)
- map['StudentCode'] = studentCode;
- return map;
- }
- }
|