12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844 |
- import 'notification.m.dart';
- import 'liveConsultation.m.dart';
- import 'authentication.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;
- bool isShow;
- LabelLanguageConfigDTO({
- this.name,
- this.languageCode,
- this.isShow = false,
- });
- factory LabelLanguageConfigDTO.fromJson(Map<String, dynamic> map) {
- return LabelLanguageConfigDTO(
- name: map['Name'],
- languageCode: map['LanguageCode'],
- isShow: map['IsShow'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (name != null) {
- map['Name'] = name;
- }
- if (languageCode != null) {
- map['LanguageCode'] = languageCode;
- }
- map['IsShow'] = isShow;
- return map;
- }
- }
- class CourseLabelDTO extends BaseLabelInfoDTO{
- String? languageCode;
- bool isShow;
- LabelTypeEnum type;
- OrganizationPatientTypeEnum useObjectType;
- bool isLastLevel;
- List<CourseLabelDTO>? childLabels;
- List<LabelLanguageConfigDTO>? labelLanguageConfigs;
- CourseLabelDTO({
- this.languageCode,
- this.isShow = false,
- 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'],
- isShow: map['IsShow'],
- 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['IsShow'] = isShow;
- 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;
- String? labelCode;
- QueryCourseLabelListRequest({
- this.name,
- this.languageCode,
- this.type = LabelTypeEnum.Unknown,
- this.parentCode,
- this.labelCode,
- 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'],
- labelCode: map['LabelCode'],
- 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;
- if (labelCode != null)
- map['LabelCode'] = labelCode;
- return map;
- }
- }
- enum CourseTypeEnum {
- Unknown,
- LiveCourse,
- Multimedia,
- }
- enum CourseAudienceTypeEnum {
- Unknown,
- PublicClass,
- PrivateClass,
- }
- enum CourseAppearTypeEnum {
- Unknown,
- Independent,
- Album,
- }
- class ApplyCourseRequest extends TokenRequest{
- String? name;
- String? courseIntro;
- String? teacherCode;
- String? cover;
- DateTime? startTime;
- int duration;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- String? coursewareToken;
- List<String>? caseLabelCodes;
- List<String>? courseLabelCodes;
- List<String>? userGroupCodes;
- double price;
- List<String>? courseVideoCodes;
- List<String>? courseMaterialCodes;
- List<String>? bindExams;
- bool isSmallClass;
- List<String>? assistants;
- List<String>? experts;
- bool isAgentCourse;
- List<String>? courseAlbumCodes;
- CourseAppearTypeEnum courseAppearType;
- bool isJustVideoCourse;
- ApplyCourseRequest({
- this.name,
- this.courseIntro,
- this.teacherCode,
- this.cover,
- this.startTime,
- this.duration = 0,
- this.courseType = CourseTypeEnum.Unknown,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.coursewareToken,
- this.caseLabelCodes,
- this.courseLabelCodes,
- this.userGroupCodes,
- this.price = 0,
- this.courseVideoCodes,
- this.courseMaterialCodes,
- this.bindExams,
- this.isSmallClass = false,
- this.assistants,
- this.experts,
- this.isAgentCourse = false,
- this.courseAlbumCodes,
- this.courseAppearType = CourseAppearTypeEnum.Unknown,
- this.isJustVideoCourse = false,
- String? token,
- }) : super(
- token: token,
- );
- factory ApplyCourseRequest.fromJson(Map<String, dynamic> map) {
- return ApplyCourseRequest(
- name: map['Name'],
- courseIntro: map['CourseIntro'],
- teacherCode: map['TeacherCode'],
- cover: map['Cover'],
- 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']?.cast<String>().toList(),
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
- price: double.parse(map['Price'].toString()),
- courseVideoCodes: map['CourseVideoCodes']?.cast<String>().toList(),
- courseMaterialCodes: map['CourseMaterialCodes']?.cast<String>().toList(),
- bindExams: map['BindExams']?.cast<String>().toList(),
- isSmallClass: map['IsSmallClass'],
- assistants: map['Assistants']?.cast<String>().toList(),
- experts: map['Experts']?.cast<String>().toList(),
- isAgentCourse: map['IsAgentCourse'],
- courseAlbumCodes: map['CourseAlbumCodes']?.cast<String>().toList(),
- courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
- isJustVideoCourse: map['IsJustVideoCourse'],
- 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 (cover != null)
- map['Cover'] = cover;
- 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;
- map['Price'] = price;
- if (courseVideoCodes != null)
- map['CourseVideoCodes'] = courseVideoCodes;
- if (courseMaterialCodes != null)
- map['CourseMaterialCodes'] = courseMaterialCodes;
- if (bindExams != null)
- map['BindExams'] = bindExams;
- map['IsSmallClass'] = isSmallClass;
- if (assistants != null)
- map['Assistants'] = assistants;
- if (experts != null)
- map['Experts'] = experts;
- map['IsAgentCourse'] = isAgentCourse;
- if (courseAlbumCodes != null)
- map['CourseAlbumCodes'] = courseAlbumCodes;
- map['CourseAppearType'] = courseAppearType.index;
- map['IsJustVideoCourse'] = isJustVideoCourse;
- return map;
- }
- }
- enum CourseViewRangeEnum {
- All,
- Domestic,
- Overseas,
- }
- enum CourseExaminationTypeEnum {
- Practice,
- Exam,
- }
- 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;
- }
- }
- enum StudentCourseStatusEnum {
- All,
- SignUp,
- NoSignUp,
- Joined,
- Ended,
- MyCreated,
- Expired,
- }
- enum LearnerStatusEnum {
- Unknown,
- NoApproval,
- Accept,
- Reject,
- }
- class StudentInfoDTO {
- String? code;
- String? name;
- String? phone;
- bool isPay;
- StudentCourseStatusEnum signCourseStatus;
- LearnerStatusEnum learnerStatus;
- StudentInfoDTO({
- this.code,
- this.name,
- this.phone,
- this.isPay = false,
- this.signCourseStatus = StudentCourseStatusEnum.All,
- this.learnerStatus = LearnerStatusEnum.Unknown,
- });
- 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']),
- learnerStatus: LearnerStatusEnum.values.firstWhere((e) => e.index == map['LearnerStatus']),
- );
- }
- 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;
- map['LearnerStatus'] = learnerStatus.index;
- return map;
- }
- }
- class ScreenSharingChannelDTO {
- int rtcRoomId;
- int sdkAppId;
- String? userCode;
- String? userSign;
- LiveDataDTO? liveData;
- ScreenSharingChannelDTO({
- this.rtcRoomId = 0,
- this.sdkAppId = 0,
- this.userCode,
- this.userSign,
- this.liveData,
- });
- factory ScreenSharingChannelDTO.fromJson(Map<String, dynamic> map) {
- return ScreenSharingChannelDTO(
- rtcRoomId: map['RtcRoomId'],
- sdkAppId: map['SdkAppId'],
- userCode: map['UserCode'],
- userSign: map['UserSign'],
- liveData: map['LiveData'] != null ? LiveDataDTO.fromJson(map['LiveData']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['RtcRoomId'] = rtcRoomId;
- map['SdkAppId'] = sdkAppId;
- if (userCode != null) {
- map['UserCode'] = userCode;
- }
- if (userSign != null) {
- map['UserSign'] = userSign;
- }
- if (liveData != null) {
- map['LiveData'] = liveData;
- }
- return map;
- }
- }
- class BaseCourseInfoDTO {
- String? code;
- String? name;
- String? courseIntro;
- String? teacherCode;
- String? teacherName;
- String? cover;
- DateTime? startTime;
- int duration;
- DateTime? actualStartTime;
- DateTime? actualEndTime;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- String? coursewareToken;
- CourseStatusEnum status;
- CourseViewRangeEnum viewRange;
- String? creatorCode;
- String? organizationCode;
- DateTime? createTime;
- DateTime? updateTime;
- double price;
- List<String>? courseLabelCodes;
- List<String>? caseLabelCodes;
- List<String>? userGroupCodes;
- List<String>? courseVideoCodes;
- List<String>? courseMaterialCodes;
- List<CourseExaminationDTO>? bindExams;
- bool isSmallClass;
- List<StudentInfoDTO>? assistants;
- List<StudentInfoDTO>? experts;
- bool isAgentCourse;
- List<String>? courseAlbumCodes;
- CourseAppearTypeEnum courseAppearType;
- bool isStick;
- int sort;
- int playCount;
- int signInCount;
- String? defaultVideoToken;
- LiveDataDTO? courseChannel;
- LiveDataDTO? othersScreenSharingChannel;
- ScreenSharingChannelDTO? rtcScreenSharingChannel;
- String? languageCode;
- bool isJustVideoCourse;
- bool isProhibition;
- BaseCourseInfoDTO({
- this.code,
- this.name,
- this.courseIntro,
- this.teacherCode,
- this.teacherName,
- this.cover,
- this.startTime,
- this.duration = 0,
- this.actualStartTime,
- this.actualEndTime,
- 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.updateTime,
- this.price = 0,
- this.courseLabelCodes,
- this.caseLabelCodes,
- this.userGroupCodes,
- this.courseVideoCodes,
- this.courseMaterialCodes,
- this.bindExams,
- this.isSmallClass = false,
- this.assistants,
- this.experts,
- this.isAgentCourse = false,
- this.courseAlbumCodes,
- this.courseAppearType = CourseAppearTypeEnum.Unknown,
- this.isStick = false,
- this.sort = 0,
- this.playCount = 0,
- this.signInCount = 0,
- this.defaultVideoToken,
- this.courseChannel,
- this.othersScreenSharingChannel,
- this.rtcScreenSharingChannel,
- this.languageCode,
- this.isJustVideoCourse = false,
- this.isProhibition = 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'],
- cover: map['Cover'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- duration: map['Duration'],
- actualStartTime: map['ActualStartTime'] != null ? DateTime.parse(map['ActualStartTime']) : null,
- actualEndTime: map['ActualEndTime'] != null ? DateTime.parse(map['ActualEndTime']) : null,
- 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,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- price: double.parse(map['Price'].toString()),
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- caseLabelCodes: map['CaseLabelCodes']?.cast<String>().toList(),
- userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
- courseVideoCodes: map['CourseVideoCodes']?.cast<String>().toList(),
- courseMaterialCodes: map['CourseMaterialCodes']?.cast<String>().toList(),
- bindExams: map['BindExams'] != null ? (map['BindExams'] as List).map((e)=>CourseExaminationDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isSmallClass: map['IsSmallClass'],
- 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'],
- courseAlbumCodes: map['CourseAlbumCodes']?.cast<String>().toList(),
- courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
- isStick: map['IsStick'],
- sort: map['Sort'],
- playCount: map['PlayCount'],
- signInCount: map['SignInCount'],
- defaultVideoToken: map['DefaultVideoToken'],
- courseChannel: map['CourseChannel'] != null ? LiveDataDTO.fromJson(map['CourseChannel']) : null,
- othersScreenSharingChannel: map['OthersScreenSharingChannel'] != null ? LiveDataDTO.fromJson(map['OthersScreenSharingChannel']) : null,
- rtcScreenSharingChannel: map['RtcScreenSharingChannel'] != null ? ScreenSharingChannelDTO.fromJson(map['RtcScreenSharingChannel']) : null,
- languageCode: map['LanguageCode'],
- isJustVideoCourse: map['IsJustVideoCourse'],
- isProhibition: map['IsProhibition'],
- );
- }
- 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 (cover != null) {
- map['Cover'] = cover;
- }
- if (startTime != null) {
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- }
- map['Duration'] = duration;
- if (actualStartTime != null) {
- map['ActualStartTime'] = JsonRpcUtils.dateFormat(actualStartTime!);
- }
- if (actualEndTime != null) {
- map['ActualEndTime'] = JsonRpcUtils.dateFormat(actualEndTime!);
- }
- 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 (updateTime != null) {
- map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
- }
- 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 (courseMaterialCodes != null) {
- map['CourseMaterialCodes'] = courseMaterialCodes;
- }
- if (bindExams != null) {
- map['BindExams'] = bindExams;
- }
- map['IsSmallClass'] = isSmallClass;
- if (assistants != null) {
- map['Assistants'] = assistants;
- }
- if (experts != null) {
- map['Experts'] = experts;
- }
- map['IsAgentCourse'] = isAgentCourse;
- if (courseAlbumCodes != null) {
- map['CourseAlbumCodes'] = courseAlbumCodes;
- }
- map['CourseAppearType'] = courseAppearType.index;
- map['IsStick'] = isStick;
- map['Sort'] = sort;
- map['PlayCount'] = playCount;
- map['SignInCount'] = signInCount;
- if (defaultVideoToken != null) {
- map['DefaultVideoToken'] = defaultVideoToken;
- }
- if (courseChannel != null) {
- map['CourseChannel'] = courseChannel;
- }
- if (othersScreenSharingChannel != null) {
- map['OthersScreenSharingChannel'] = othersScreenSharingChannel;
- }
- if (rtcScreenSharingChannel != null) {
- map['RtcScreenSharingChannel'] = rtcScreenSharingChannel;
- }
- if (languageCode != null) {
- map['LanguageCode'] = languageCode;
- }
- map['IsJustVideoCourse'] = isJustVideoCourse;
- map['IsProhibition'] = isProhibition;
- return map;
- }
- }
- class BaseUserGroupDTO extends BaseDTO{
- String? code;
- String? name;
- String? shortCode;
- String? description;
- BaseUserGroupDTO({
- this.code,
- this.name,
- this.shortCode,
- this.description,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory BaseUserGroupDTO.fromJson(Map<String, dynamic> map) {
- return BaseUserGroupDTO(
- code: map['Code'],
- name: map['Name'],
- shortCode: map['ShortCode'],
- description: map['Description'],
- 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 (shortCode != null)
- map['ShortCode'] = shortCode;
- if (description != null)
- map['Description'] = description;
- return map;
- }
- }
- enum UploadFileTypeEnum {
- Unknown,
- EXE,
- APK,
- IPA,
- ZIP,
- DAT,
- RAR,
- PNG,
- ICON,
- BMP,
- JPEG,
- JPG,
- GIF,
- WEBP,
- TIFF,
- IMG,
- PDF,
- DOC,
- DOCX,
- XLS,
- XLSX,
- MP4,
- MSI,
- VID,
- DICOM,
- PPT,
- PPTX,
- M4V,
- FVID,
- }
- class VideoInfoDTO {
- String? code;
- String? name;
- String? videoToken;
- String? poster;
- String? vodFileId;
- int duration;
- double videoSize;
- DateTime? createTime;
- String? creatorCode;
- String? creatorName;
- UploadFileTypeEnum fodderType;
- bool isPublic;
- CourseViewRangeEnum viewRange;
- int playCount;
- String? srcFileToken;
- String? intro;
- bool autoCreateCourse;
- List<String>? userGroupCodes;
- List<String>? courseLabelCodes;
- CourseAudienceTypeEnum audienceType;
- bool isAdminCreated;
- VideoInfoDTO({
- this.code,
- this.name,
- this.videoToken,
- this.poster,
- this.vodFileId,
- this.duration = 0,
- this.videoSize = 0,
- this.createTime,
- this.creatorCode,
- this.creatorName,
- this.fodderType = UploadFileTypeEnum.Unknown,
- this.isPublic = false,
- this.viewRange = CourseViewRangeEnum.All,
- this.playCount = 0,
- this.srcFileToken,
- this.intro,
- this.autoCreateCourse = false,
- this.userGroupCodes,
- this.courseLabelCodes,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.isAdminCreated = false,
- });
- 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,
- creatorCode: map['CreatorCode'],
- creatorName: map['CreatorName'],
- fodderType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FodderType']),
- isPublic: map['IsPublic'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- playCount: map['PlayCount'],
- srcFileToken: map['SrcFileToken'],
- intro: map['Intro'],
- autoCreateCourse: map['AutoCreateCourse'],
- userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- isAdminCreated: map['IsAdminCreated'],
- );
- }
- 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!);
- }
- if (creatorCode != null) {
- map['CreatorCode'] = creatorCode;
- }
- if (creatorName != null) {
- map['CreatorName'] = creatorName;
- }
- map['FodderType'] = fodderType.index;
- map['IsPublic'] = isPublic;
- map['ViewRange'] = viewRange.index;
- map['PlayCount'] = playCount;
- if (srcFileToken != null) {
- map['SrcFileToken'] = srcFileToken;
- }
- if (intro != null) {
- map['Intro'] = intro;
- }
- map['AutoCreateCourse'] = autoCreateCourse;
- if (userGroupCodes != null) {
- map['UserGroupCodes'] = userGroupCodes;
- }
- if (courseLabelCodes != null) {
- map['CourseLabelCodes'] = courseLabelCodes;
- }
- map['AudienceType'] = audienceType.index;
- map['IsAdminCreated'] = isAdminCreated;
- return map;
- }
- }
- class BaseCourseAlbumDTO {
- String? code;
- String? name;
- BaseCourseAlbumDTO({
- this.code,
- this.name,
- });
- factory BaseCourseAlbumDTO.fromJson(Map<String, dynamic> map) {
- return BaseCourseAlbumDTO(
- code: map['Code'],
- name: map['Name'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (code != null) {
- map['Code'] = code;
- }
- if (name != null) {
- map['Name'] = name;
- }
- return map;
- }
- }
- class CourseInfoDetailDTO extends BaseCourseInfoDTO{
- List<BaseLabelInfoDTO>? caseLabels;
- List<BaseLabelInfoDTO>? courseLabels;
- List<BaseUserGroupDTO>? userGroups;
- List<VideoInfoDTO>? courseVideos;
- List<VideoInfoDTO>? courseMaterials;
- List<BaseCourseAlbumDTO>? courseAlbums;
- bool needPay;
- StudentCourseStatusEnum signCourseStatus;
- bool isPay;
- bool isParticipant;
- bool isAssistant;
- String? courseLiveUrl;
- String? courseShareUrl;
- CourseInfoDetailDTO({
- this.caseLabels,
- this.courseLabels,
- this.userGroups,
- this.courseVideos,
- this.courseMaterials,
- this.courseAlbums,
- this.needPay = false,
- this.signCourseStatus = StudentCourseStatusEnum.All,
- this.isPay = false,
- this.isParticipant = false,
- this.isAssistant = false,
- this.courseLiveUrl,
- this.courseShareUrl,
- String? code,
- String? name,
- String? courseIntro,
- String? teacherCode,
- String? teacherName,
- String? cover,
- DateTime? startTime,
- int duration = 0,
- DateTime? actualStartTime,
- DateTime? actualEndTime,
- CourseTypeEnum courseType = CourseTypeEnum.Unknown,
- CourseAudienceTypeEnum audienceType = CourseAudienceTypeEnum.Unknown,
- String? coursewareToken,
- CourseStatusEnum status = CourseStatusEnum.Unknown,
- CourseViewRangeEnum viewRange = CourseViewRangeEnum.All,
- String? creatorCode,
- String? organizationCode,
- DateTime? createTime,
- DateTime? updateTime,
- double price = 0,
- List<String>? courseLabelCodes,
- List<String>? caseLabelCodes,
- List<String>? userGroupCodes,
- List<String>? courseVideoCodes,
- List<String>? courseMaterialCodes,
- List<CourseExaminationDTO>? bindExams,
- bool isSmallClass = false,
- List<StudentInfoDTO>? assistants,
- List<StudentInfoDTO>? experts,
- bool isAgentCourse = false,
- List<String>? courseAlbumCodes,
- CourseAppearTypeEnum courseAppearType = CourseAppearTypeEnum.Unknown,
- bool isStick = false,
- int sort = 0,
- int playCount = 0,
- int signInCount = 0,
- String? defaultVideoToken,
- LiveDataDTO? courseChannel,
- LiveDataDTO? othersScreenSharingChannel,
- ScreenSharingChannelDTO? rtcScreenSharingChannel,
- String? languageCode,
- bool isJustVideoCourse = false,
- bool isProhibition = false,
- }) : super(
- code: code,
- name: name,
- courseIntro: courseIntro,
- teacherCode: teacherCode,
- teacherName: teacherName,
- cover: cover,
- startTime: startTime,
- duration: duration,
- actualStartTime: actualStartTime,
- actualEndTime: actualEndTime,
- courseType: courseType,
- audienceType: audienceType,
- coursewareToken: coursewareToken,
- status: status,
- viewRange: viewRange,
- creatorCode: creatorCode,
- organizationCode: organizationCode,
- createTime: createTime,
- updateTime: updateTime,
- price: price,
- courseLabelCodes: courseLabelCodes,
- caseLabelCodes: caseLabelCodes,
- userGroupCodes: userGroupCodes,
- courseVideoCodes: courseVideoCodes,
- courseMaterialCodes: courseMaterialCodes,
- bindExams: bindExams,
- isSmallClass: isSmallClass,
- assistants: assistants,
- experts: experts,
- isAgentCourse: isAgentCourse,
- courseAlbumCodes: courseAlbumCodes,
- courseAppearType: courseAppearType,
- isStick: isStick,
- sort: sort,
- playCount: playCount,
- signInCount: signInCount,
- defaultVideoToken: defaultVideoToken,
- courseChannel: courseChannel,
- othersScreenSharingChannel: othersScreenSharingChannel,
- rtcScreenSharingChannel: rtcScreenSharingChannel,
- languageCode: languageCode,
- isJustVideoCourse: isJustVideoCourse,
- isProhibition: isProhibition,
- );
- factory CourseInfoDetailDTO.fromJson(Map<String, dynamic> map) {
- return CourseInfoDetailDTO(
- 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,
- courseMaterials: map['CourseMaterials'] != null ? (map['CourseMaterials'] as List).map((e)=>VideoInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseAlbums: map['CourseAlbums'] != null ? (map['CourseAlbums'] as List).map((e)=>BaseCourseAlbumDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- needPay: map['NeedPay'],
- signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
- isPay: map['IsPay'],
- isParticipant: map['IsParticipant'],
- isAssistant: map['IsAssistant'],
- courseLiveUrl: map['CourseLiveUrl'],
- courseShareUrl: map['CourseShareUrl'],
- code: map['Code'],
- name: map['Name'],
- courseIntro: map['CourseIntro'],
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- cover: map['Cover'],
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- duration: map['Duration'],
- actualStartTime: map['ActualStartTime'] != null ? DateTime.parse(map['ActualStartTime']) : null,
- actualEndTime: map['ActualEndTime'] != null ? DateTime.parse(map['ActualEndTime']) : null,
- 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,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- price: double.parse(map['Price'].toString()),
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- caseLabelCodes: map['CaseLabelCodes']?.cast<String>().toList(),
- userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
- courseVideoCodes: map['CourseVideoCodes']?.cast<String>().toList(),
- courseMaterialCodes: map['CourseMaterialCodes']?.cast<String>().toList(),
- bindExams: map['BindExams'] != null ? (map['BindExams'] as List).map((e)=>CourseExaminationDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- isSmallClass: map['IsSmallClass'],
- 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'],
- courseAlbumCodes: map['CourseAlbumCodes']?.cast<String>().toList(),
- courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
- isStick: map['IsStick'],
- sort: map['Sort'],
- playCount: map['PlayCount'],
- signInCount: map['SignInCount'],
- defaultVideoToken: map['DefaultVideoToken'],
- courseChannel: map['CourseChannel'] != null ? LiveDataDTO.fromJson(map['CourseChannel']) : null,
- othersScreenSharingChannel: map['OthersScreenSharingChannel'] != null ? LiveDataDTO.fromJson(map['OthersScreenSharingChannel']) : null,
- rtcScreenSharingChannel: map['RtcScreenSharingChannel'] != null ? ScreenSharingChannelDTO.fromJson(map['RtcScreenSharingChannel']) : null,
- languageCode: map['LanguageCode'],
- isJustVideoCourse: map['IsJustVideoCourse'],
- isProhibition: map['IsProhibition'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (caseLabels != null)
- map['CaseLabels'] = caseLabels;
- if (courseLabels != null)
- map['CourseLabels'] = courseLabels;
- if (userGroups != null)
- map['UserGroups'] = userGroups;
- if (courseVideos != null)
- map['CourseVideos'] = courseVideos;
- if (courseMaterials != null)
- map['CourseMaterials'] = courseMaterials;
- if (courseAlbums != null)
- map['CourseAlbums'] = courseAlbums;
- map['NeedPay'] = needPay;
- map['SignCourseStatus'] = signCourseStatus.index;
- map['IsPay'] = isPay;
- map['IsParticipant'] = isParticipant;
- map['IsAssistant'] = isAssistant;
- if (courseLiveUrl != null)
- map['CourseLiveUrl'] = courseLiveUrl;
- if (courseShareUrl != null)
- map['CourseShareUrl'] = courseShareUrl;
- return map;
- }
- }
- enum QueryCourseApprovalStatusEnum {
- All,
- NotApproval,
- Approved,
- }
- enum QueryCourseTypeEnum {
- All,
- LiveCourse,
- VideoCourse,
- }
- class FindCoursePagesRequest extends PageRequest{
- String? keyword;
- List<String>? courseLabels;
- DateTime? startTime;
- DateTime? endTime;
- String? teacherCode;
- String? participantCode;
- String? languageCode;
- QueryCourseApprovalStatusEnum courseApprovalStatus;
- QueryCourseTypeEnum queryCourseType;
- bool justPastVideo;
- FindCoursePagesRequest({
- this.keyword,
- this.courseLabels,
- this.startTime,
- this.endTime,
- this.teacherCode,
- this.participantCode,
- this.languageCode,
- this.courseApprovalStatus = QueryCourseApprovalStatusEnum.All,
- this.queryCourseType = QueryCourseTypeEnum.All,
- this.justPastVideo = false,
- 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']?.cast<String>().toList(),
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
- teacherCode: map['TeacherCode'],
- participantCode: map['ParticipantCode'],
- languageCode: map['LanguageCode'],
- courseApprovalStatus: QueryCourseApprovalStatusEnum.values.firstWhere((e) => e.index == map['CourseApprovalStatus']),
- queryCourseType: QueryCourseTypeEnum.values.firstWhere((e) => e.index == map['QueryCourseType']),
- justPastVideo: map['JustPastVideo'],
- 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;
- if (startTime != null)
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- if (endTime != null)
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (participantCode != null)
- map['ParticipantCode'] = participantCode;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- map['CourseApprovalStatus'] = courseApprovalStatus.index;
- map['QueryCourseType'] = queryCourseType.index;
- map['JustPastVideo'] = justPastVideo;
- 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? cover;
- DateTime? startTime;
- int duration;
- CourseTypeEnum courseType;
- CourseAudienceTypeEnum audienceType;
- String? coursewareToken;
- List<String>? caseLabelCodes;
- List<String>? courseLabelCodes;
- List<String>? userGroupCodes;
- double price;
- List<String>? courseVideoCodes;
- List<String>? bindExams;
- bool isSmallClass;
- List<String>? assistants;
- List<String>? experts;
- bool isAgentCourse;
- List<String>? courseAlbumCodes;
- CourseAppearTypeEnum courseAppearType;
- List<String>? courseMaterialCodes;
- bool isJustVideoCourse;
- UpdateCourseRequest({
- this.code,
- this.name,
- this.courseIntro,
- this.teacherCode,
- this.cover,
- this.startTime,
- this.duration = 0,
- this.courseType = CourseTypeEnum.Unknown,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.coursewareToken,
- this.caseLabelCodes,
- this.courseLabelCodes,
- this.userGroupCodes,
- this.price = 0,
- this.courseVideoCodes,
- this.bindExams,
- this.isSmallClass = false,
- this.assistants,
- this.experts,
- this.isAgentCourse = false,
- this.courseAlbumCodes,
- this.courseAppearType = CourseAppearTypeEnum.Unknown,
- this.courseMaterialCodes,
- this.isJustVideoCourse = 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'],
- cover: map['Cover'],
- 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']?.cast<String>().toList(),
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
- price: double.parse(map['Price'].toString()),
- courseVideoCodes: map['CourseVideoCodes']?.cast<String>().toList(),
- bindExams: map['BindExams']?.cast<String>().toList(),
- isSmallClass: map['IsSmallClass'],
- assistants: map['Assistants']?.cast<String>().toList(),
- experts: map['Experts']?.cast<String>().toList(),
- isAgentCourse: map['IsAgentCourse'],
- courseAlbumCodes: map['CourseAlbumCodes']?.cast<String>().toList(),
- courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
- courseMaterialCodes: map['CourseMaterialCodes']?.cast<String>().toList(),
- isJustVideoCourse: map['IsJustVideoCourse'],
- 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 (cover != null)
- map['Cover'] = cover;
- 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;
- map['Price'] = price;
- if (courseVideoCodes != null)
- map['CourseVideoCodes'] = courseVideoCodes;
- if (bindExams != null)
- map['BindExams'] = bindExams;
- map['IsSmallClass'] = isSmallClass;
- if (assistants != null)
- map['Assistants'] = assistants;
- if (experts != null)
- map['Experts'] = experts;
- map['IsAgentCourse'] = isAgentCourse;
- if (courseAlbumCodes != null)
- map['CourseAlbumCodes'] = courseAlbumCodes;
- map['CourseAppearType'] = courseAppearType.index;
- if (courseMaterialCodes != null)
- map['CourseMaterialCodes'] = courseMaterialCodes;
- map['IsJustVideoCourse'] = isJustVideoCourse;
- 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 FindMyCoursePagesRequest extends PageRequest{
- String? keyword;
- StudentCourseStatusEnum queryStatus;
- FindMyCoursePagesRequest({
- this.keyword,
- this.queryStatus = StudentCourseStatusEnum.All,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindMyCoursePagesRequest.fromJson(Map<String, dynamic> map) {
- return FindMyCoursePagesRequest(
- keyword: map['Keyword'],
- queryStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['QueryStatus']),
- 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;
- return map;
- }
- }
- class CourseAlbumDTO extends BaseCourseAlbumDTO{
- String? cover;
- List<String>? courseCodes;
- String? introduction;
- List<String>? courseLabelCodes;
- String? teacherCode;
- String? teacherName;
- CourseViewRangeEnum viewRange;
- double price;
- DateTime? createTime;
- DateTime? updateTime;
- int sort;
- bool isStick;
- String? languageCode;
- CourseAlbumDTO({
- this.cover,
- this.courseCodes,
- this.introduction,
- this.courseLabelCodes,
- this.teacherCode,
- this.teacherName,
- this.viewRange = CourseViewRangeEnum.All,
- this.price = 0,
- this.createTime,
- this.updateTime,
- this.sort = 0,
- this.isStick = false,
- this.languageCode,
- String? code,
- String? name,
- }) : super(
- code: code,
- name: name,
- );
- factory CourseAlbumDTO.fromJson(Map<String, dynamic> map) {
- return CourseAlbumDTO(
- cover: map['Cover'],
- courseCodes: map['CourseCodes']?.cast<String>().toList(),
- introduction: map['Introduction'],
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- price: double.parse(map['Price'].toString()),
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- sort: map['Sort'],
- isStick: map['IsStick'],
- languageCode: map['LanguageCode'],
- code: map['Code'],
- name: map['Name'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (cover != null)
- map['Cover'] = cover;
- if (courseCodes != null)
- map['CourseCodes'] = courseCodes;
- if (introduction != null)
- map['Introduction'] = introduction;
- if (courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (teacherName != null)
- map['TeacherName'] = teacherName;
- map['ViewRange'] = viewRange.index;
- map['Price'] = price;
- if (createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if (updateTime != null)
- map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
- map['Sort'] = sort;
- map['IsStick'] = isStick;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- enum UserGroupEnum {
- Class,
- Group,
- }
- class UserGroupDTO extends BaseUserGroupDTO{
- int maxPeople;
- String? creatorCode;
- String? creatorName;
- List<StudentInfoDTO>? students;
- int courseCount;
- int practiceCount;
- int examCount;
- int studentCount;
- bool isAgent;
- bool isOldPlatformData;
- UserGroupEnum userGroupType;
- List<String>? userCodes;
- List<String>? deviceCodes;
- UserGroupDTO({
- this.maxPeople = 0,
- this.creatorCode,
- this.creatorName,
- this.students,
- this.courseCount = 0,
- this.practiceCount = 0,
- this.examCount = 0,
- this.studentCount = 0,
- this.isAgent = false,
- this.isOldPlatformData = false,
- this.userGroupType = UserGroupEnum.Class,
- this.userCodes,
- this.deviceCodes,
- String? code,
- String? name,
- String? shortCode,
- String? description,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- code: code,
- name: name,
- shortCode: shortCode,
- description: description,
- 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,
- courseCount: map['CourseCount'],
- practiceCount: map['PracticeCount'],
- examCount: map['ExamCount'],
- studentCount: map['StudentCount'],
- isAgent: map['IsAgent'],
- isOldPlatformData: map['IsOldPlatformData'],
- userGroupType: UserGroupEnum.values.firstWhere((e) => e.index == map['UserGroupType']),
- userCodes: map['UserCodes']?.cast<String>().toList(),
- deviceCodes: map['DeviceCodes']?.cast<String>().toList(),
- code: map['Code'],
- name: map['Name'],
- shortCode: map['ShortCode'],
- description: map['Description'],
- 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;
- map['CourseCount'] = courseCount;
- map['PracticeCount'] = practiceCount;
- map['ExamCount'] = examCount;
- map['StudentCount'] = studentCount;
- map['IsAgent'] = isAgent;
- map['IsOldPlatformData'] = isOldPlatformData;
- map['UserGroupType'] = userGroupType.index;
- if (userCodes != null)
- map['UserCodes'] = userCodes;
- if (deviceCodes != null)
- map['DeviceCodes'] = deviceCodes;
- return map;
- }
- }
- class QueryUserGroupPageRequest extends PageRequest{
- String? keyword;
- String? teacherCode;
- bool? isOldPlatformData;
- QueryUserGroupPageRequest({
- this.keyword,
- this.teacherCode,
- this.isOldPlatformData,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory QueryUserGroupPageRequest.fromJson(Map<String, dynamic> map) {
- return QueryUserGroupPageRequest(
- keyword: map['Keyword'],
- teacherCode: map['TeacherCode'],
- isOldPlatformData: map['IsOldPlatformData'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (keyword != null)
- map['Keyword'] = keyword;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (isOldPlatformData != null)
- map['IsOldPlatformData'] = isOldPlatformData;
- return map;
- }
- }
- class UserGroupRequest extends TokenRequest{
- String? code;
- String? name;
- int maxPeople;
- String? creatorCode;
- List<StudentInfoDTO>? students;
- List<String>? removeStudentCodes;
- bool isAgent;
- bool notValidateRepeat;
- UserGroupRequest({
- this.code,
- this.name,
- this.maxPeople = 0,
- this.creatorCode,
- this.students,
- this.removeStudentCodes,
- this.isAgent = false,
- this.notValidateRepeat = false,
- 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']?.cast<String>().toList(),
- isAgent: map['IsAgent'],
- notValidateRepeat: map['NotValidateRepeat'],
- 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;
- map['IsAgent'] = isAgent;
- map['NotValidateRepeat'] = notValidateRepeat;
- 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']?.cast<String>().toList(),
- 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;
- int category;
- String? code;
- String? name;
- String? videoToken;
- String? vodFileId;
- String? poster;
- int duration;
- double videoSize;
- String? creatorCode;
- String? creatorName;
- UploadFileTypeEnum fodderType;
- bool isPublic;
- CourseViewRangeEnum viewRange;
- CourseAudienceTypeEnum audienceType;
- bool autoCreateCourse;
- List<String>? courseLabelCodes;
- List<String>? userGroupCodes;
- String? intro;
- SaveVideoRequest({
- this.courseCode,
- this.category = 0,
- this.code,
- this.name,
- this.videoToken,
- this.vodFileId,
- this.poster,
- this.duration = 0,
- this.videoSize = 0,
- this.creatorCode,
- this.creatorName,
- this.fodderType = UploadFileTypeEnum.Unknown,
- this.isPublic = false,
- this.viewRange = CourseViewRangeEnum.All,
- this.audienceType = CourseAudienceTypeEnum.Unknown,
- this.autoCreateCourse = false,
- this.courseLabelCodes,
- this.userGroupCodes,
- this.intro,
- String? token,
- }) : super(
- token: token,
- );
- factory SaveVideoRequest.fromJson(Map<String, dynamic> map) {
- return SaveVideoRequest(
- courseCode: map['CourseCode'],
- category: map['Category'],
- code: map['Code'],
- name: map['Name'],
- videoToken: map['VideoToken'],
- vodFileId: map['VodFileId'],
- poster: map['Poster'],
- duration: map['Duration'],
- videoSize: double.parse(map['VideoSize'].toString()),
- creatorCode: map['CreatorCode'],
- creatorName: map['CreatorName'],
- fodderType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FodderType']),
- isPublic: map['IsPublic'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- audienceType: CourseAudienceTypeEnum.values.firstWhere((e) => e.index == map['AudienceType']),
- autoCreateCourse: map['AutoCreateCourse'],
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- userGroupCodes: map['UserGroupCodes']?.cast<String>().toList(),
- intro: map['Intro'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseCode != null)
- map['CourseCode'] = courseCode;
- map['Category'] = category;
- 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;
- if (creatorCode != null)
- map['CreatorCode'] = creatorCode;
- if (creatorName != null)
- map['CreatorName'] = creatorName;
- map['FodderType'] = fodderType.index;
- map['IsPublic'] = isPublic;
- map['ViewRange'] = viewRange.index;
- map['AudienceType'] = audienceType.index;
- map['AutoCreateCourse'] = autoCreateCourse;
- if (courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- if (userGroupCodes != null)
- map['UserGroupCodes'] = userGroupCodes;
- if (intro != null)
- map['Intro'] = intro;
- return map;
- }
- }
- class FindVideoPagesRequest extends PageRequest{
- String? keyword;
- String? courseCode;
- int category;
- UploadFileTypeEnum fodderType;
- bool isJustQueryMyUpload;
- FindVideoPagesRequest({
- this.keyword,
- this.courseCode,
- this.category = 0,
- this.fodderType = UploadFileTypeEnum.Unknown,
- this.isJustQueryMyUpload = false,
- 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'],
- category: map['Category'],
- fodderType: UploadFileTypeEnum.values.firstWhere((e) => e.index == map['FodderType']),
- isJustQueryMyUpload: map['IsJustQueryMyUpload'],
- 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;
- map['Category'] = category;
- map['FodderType'] = fodderType.index;
- map['IsJustQueryMyUpload'] = isJustQueryMyUpload;
- 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? courseOrAlbumCode;
- CourseAppearTypeEnum courseAppearType;
- SignUpCourseRequest({
- this.courseOrAlbumCode,
- this.courseAppearType = CourseAppearTypeEnum.Unknown,
- String? token,
- }) : super(
- token: token,
- );
- factory SignUpCourseRequest.fromJson(Map<String, dynamic> map) {
- return SignUpCourseRequest(
- courseOrAlbumCode: map['CourseOrAlbumCode'],
- courseAppearType: CourseAppearTypeEnum.values.firstWhere((e) => e.index == map['CourseAppearType']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseOrAlbumCode != null)
- map['CourseOrAlbumCode'] = courseOrAlbumCode;
- map['CourseAppearType'] = courseAppearType.index;
- return map;
- }
- }
- class CancelSignUpCourseRequest extends TokenRequest{
- String? courseOrAlbumCode;
- CancelSignUpCourseRequest({
- this.courseOrAlbumCode,
- String? token,
- }) : super(
- token: token,
- );
- factory CancelSignUpCourseRequest.fromJson(Map<String, dynamic> map) {
- return CancelSignUpCourseRequest(
- courseOrAlbumCode: map['CourseOrAlbumCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseOrAlbumCode != null)
- map['CourseOrAlbumCode'] = courseOrAlbumCode;
- return map;
- }
- }
- enum QueryCourseFileCategoryEnum {
- All,
- CourseWare,
- }
- class FindVideoFilesCourseTypeByPageRequest extends PageRequest{
- String? keyword;
- CourseTypeEnum courseType;
- QueryCourseFileCategoryEnum courseFileCategoryEnum;
- FindVideoFilesCourseTypeByPageRequest({
- this.keyword,
- this.courseType = CourseTypeEnum.Unknown,
- this.courseFileCategoryEnum = QueryCourseFileCategoryEnum.All,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory FindVideoFilesCourseTypeByPageRequest.fromJson(Map<String, dynamic> map) {
- return FindVideoFilesCourseTypeByPageRequest(
- keyword: map['Keyword'],
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- courseFileCategoryEnum: QueryCourseFileCategoryEnum.values.firstWhere((e) => e.index == map['CourseFileCategoryEnum']),
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (keyword != null)
- map['Keyword'] = keyword;
- map['CourseType'] = courseType.index;
- map['CourseFileCategoryEnum'] = courseFileCategoryEnum.index;
- 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']?.cast<String>().toList(),
- optionCodeList: map['OptionCodeList']?.cast<String>().toList(),
- );
- }
- 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']?.cast<String>().toList(),
- optionCodeList: map['OptionCodeList']?.cast<String>().toList(),
- 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;
- }
- }
- class InitiateLiveCourseResult extends LiveCourseBaseResult{
- String? initiatorCode;
- int roomNo;
- TransactionStatusEnum liveProtocol;
- int appId;
- String? userSign;
- int heartRateInterval;
- List<LiveCourseMember>? memberLiveDatas;
- LiveDataDTO? courseChannel;
- LiveDataDTO? othersScreenSharingChannel;
- ScreenSharingChannelDTO? rtcScreenSharingChannel;
- InitiateLiveCourseResult({
- this.initiatorCode,
- this.roomNo = 0,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.appId = 0,
- this.userSign,
- this.heartRateInterval = 0,
- this.memberLiveDatas,
- this.courseChannel,
- this.othersScreenSharingChannel,
- this.rtcScreenSharingChannel,
- String? courseCode,
- }) : super(
- courseCode: courseCode,
- );
- factory InitiateLiveCourseResult.fromJson(Map<String, dynamic> map) {
- return InitiateLiveCourseResult(
- initiatorCode: map['InitiatorCode'],
- roomNo: map['RoomNo'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- appId: map['AppId'],
- userSign: map['UserSign'],
- heartRateInterval: map['HeartRateInterval'],
- memberLiveDatas: map['MemberLiveDatas'] != null ? (map['MemberLiveDatas'] as List).map((e)=>LiveCourseMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseChannel: map['CourseChannel'] != null ? LiveDataDTO.fromJson(map['CourseChannel']) : null,
- othersScreenSharingChannel: map['OthersScreenSharingChannel'] != null ? LiveDataDTO.fromJson(map['OthersScreenSharingChannel']) : null,
- rtcScreenSharingChannel: map['RtcScreenSharingChannel'] != null ? ScreenSharingChannelDTO.fromJson(map['RtcScreenSharingChannel']) : null,
- courseCode: map['CourseCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (initiatorCode != null)
- map['InitiatorCode'] = initiatorCode;
- map['RoomNo'] = roomNo;
- map['LiveProtocol'] = liveProtocol.index;
- map['AppId'] = appId;
- if (userSign != null)
- map['UserSign'] = userSign;
- map['HeartRateInterval'] = heartRateInterval;
- if (memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- if (courseChannel != null)
- map['CourseChannel'] = courseChannel;
- if (othersScreenSharingChannel != null)
- map['OthersScreenSharingChannel'] = othersScreenSharingChannel;
- if (rtcScreenSharingChannel != null)
- map['RtcScreenSharingChannel'] = rtcScreenSharingChannel;
- 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;
- TransactionStatusEnum liveProtocol;
- int appId;
- String? userSign;
- List<LiveCourseMember>? memberLiveDatas;
- List<LiveCourseMember>? deviceLiveDatas;
- int heartRateInterval;
- LiveDataDTO? courseChannel;
- ShareInfoDTO? shareInfo;
- LiveDataDTO? othersScreenSharingChannel;
- ScreenSharingChannelDTO? rtcScreenSharingChannel;
- JoinLiveCourseResult({
- this.userCode,
- this.roomNo = 0,
- this.liveProtocol = TransactionStatusEnum.Applied,
- this.appId = 0,
- this.userSign,
- this.memberLiveDatas,
- this.deviceLiveDatas,
- this.heartRateInterval = 0,
- this.courseChannel,
- this.shareInfo,
- this.othersScreenSharingChannel,
- this.rtcScreenSharingChannel,
- String? courseCode,
- }) : super(
- courseCode: courseCode,
- );
- factory JoinLiveCourseResult.fromJson(Map<String, dynamic> map) {
- return JoinLiveCourseResult(
- userCode: map['UserCode'],
- roomNo: map['RoomNo'],
- liveProtocol: TransactionStatusEnum.values.firstWhere((e) => e.index == map['LiveProtocol']),
- 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,
- deviceLiveDatas: map['DeviceLiveDatas'] != null ? (map['DeviceLiveDatas'] as List).map((e)=>LiveCourseMember.fromJson(e as Map<String,dynamic>)).toList() : null,
- heartRateInterval: map['HeartRateInterval'],
- courseChannel: map['CourseChannel'] != null ? LiveDataDTO.fromJson(map['CourseChannel']) : null,
- shareInfo: map['ShareInfo'] != null ? ShareInfoDTO.fromJson(map['ShareInfo']) : null,
- othersScreenSharingChannel: map['OthersScreenSharingChannel'] != null ? LiveDataDTO.fromJson(map['OthersScreenSharingChannel']) : null,
- rtcScreenSharingChannel: map['RtcScreenSharingChannel'] != null ? ScreenSharingChannelDTO.fromJson(map['RtcScreenSharingChannel']) : null,
- courseCode: map['CourseCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userCode != null)
- map['UserCode'] = userCode;
- map['RoomNo'] = roomNo;
- map['LiveProtocol'] = liveProtocol.index;
- map['AppId'] = appId;
- if (userSign != null)
- map['UserSign'] = userSign;
- if (memberLiveDatas != null)
- map['MemberLiveDatas'] = memberLiveDatas;
- if (deviceLiveDatas != null)
- map['DeviceLiveDatas'] = deviceLiveDatas;
- map['HeartRateInterval'] = heartRateInterval;
- if (courseChannel != null)
- map['CourseChannel'] = courseChannel;
- if (shareInfo != null)
- map['ShareInfo'] = shareInfo;
- if (othersScreenSharingChannel != null)
- map['OthersScreenSharingChannel'] = othersScreenSharingChannel;
- if (rtcScreenSharingChannel != null)
- map['RtcScreenSharingChannel'] = rtcScreenSharingChannel;
- 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 StudentLivePullUrlResult {
- String? rtmpPullUrl;
- String? httpPullUrl;
- String? hlsPullUrl;
- StudentLivePullUrlResult({
- this.rtmpPullUrl,
- this.httpPullUrl,
- this.hlsPullUrl,
- });
- factory StudentLivePullUrlResult.fromJson(Map<String, dynamic> map) {
- return StudentLivePullUrlResult(
- rtmpPullUrl: map['RtmpPullUrl'],
- httpPullUrl: map['HttpPullUrl'],
- hlsPullUrl: map['HlsPullUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (rtmpPullUrl != null) {
- map['RtmpPullUrl'] = rtmpPullUrl;
- }
- if (httpPullUrl != null) {
- map['HttpPullUrl'] = httpPullUrl;
- }
- if (hlsPullUrl != null) {
- map['HlsPullUrl'] = hlsPullUrl;
- }
- 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 LeaveLiveCourseRequest extends InitiateLiveCourseRequest{
- LeaveLiveCourseRequest({
- String? courseCode,
- String? token,
- }) : super(
- courseCode: courseCode,
- token: token,
- );
- factory LeaveLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return LeaveLiveCourseRequest(
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- 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;
- bool isDelete;
- 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,
- this.isDelete = false,
- 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,
- isDelete: map['IsDelete'],
- 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;
- map['IsDelete'] = isDelete;
- 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,
- bool isDelete = false,
- 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,
- isDelete: isDelete,
- 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,
- isDelete: map['IsDelete'],
- 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 extends TokenRequest{
- String? userGroupCode;
- String? shortCode;
- AddStudentInCourseUserGroupRequest({
- this.userGroupCode,
- this.shortCode,
- String? token,
- }) : super(
- token: token,
- );
- factory AddStudentInCourseUserGroupRequest.fromJson(Map<String, dynamic> map) {
- return AddStudentInCourseUserGroupRequest(
- userGroupCode: map['UserGroupCode'],
- shortCode: map['ShortCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- if (shortCode != null)
- map['ShortCode'] = shortCode;
- return map;
- }
- }
- class StudentLeaveCourseUserGroupRequest extends TokenRequest{
- String? userGroupCode;
- StudentLeaveCourseUserGroupRequest({
- this.userGroupCode,
- String? token,
- }) : super(
- token: token,
- );
- factory StudentLeaveCourseUserGroupRequest.fromJson(Map<String, dynamic> map) {
- return StudentLeaveCourseUserGroupRequest(
- userGroupCode: map['UserGroupCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- 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;
- }
- }
- class AddCourseAlbumRequest extends TokenRequest{
- String? name;
- List<String>? courseCodes;
- String? cover;
- String? introduction;
- List<String>? courseLabelCodes;
- int sort;
- bool isStick;
- String? teacherCode;
- String? teacherName;
- CourseViewRangeEnum viewRange;
- double price;
- String? languageCode;
- AddCourseAlbumRequest({
- this.name,
- this.courseCodes,
- this.cover,
- this.introduction,
- this.courseLabelCodes,
- this.sort = 0,
- this.isStick = false,
- this.teacherCode,
- this.teacherName,
- this.viewRange = CourseViewRangeEnum.All,
- this.price = 0,
- this.languageCode,
- String? token,
- }) : super(
- token: token,
- );
- factory AddCourseAlbumRequest.fromJson(Map<String, dynamic> map) {
- return AddCourseAlbumRequest(
- name: map['Name'],
- courseCodes: map['CourseCodes']?.cast<String>().toList(),
- cover: map['Cover'],
- introduction: map['Introduction'],
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- sort: map['Sort'],
- isStick: map['IsStick'],
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- price: double.parse(map['Price'].toString()),
- languageCode: map['LanguageCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (name != null)
- map['Name'] = name;
- if (courseCodes != null)
- map['CourseCodes'] = courseCodes;
- if (cover != null)
- map['Cover'] = cover;
- if (introduction != null)
- map['Introduction'] = introduction;
- if (courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- map['Sort'] = sort;
- map['IsStick'] = isStick;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (teacherName != null)
- map['TeacherName'] = teacherName;
- map['ViewRange'] = viewRange.index;
- map['Price'] = price;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- class DeleteCourseAlbumRequest {
- String? courseAlbumCode;
- DeleteCourseAlbumRequest({
- this.courseAlbumCode,
- });
- factory DeleteCourseAlbumRequest.fromJson(Map<String, dynamic> map) {
- return DeleteCourseAlbumRequest(
- courseAlbumCode: map['CourseAlbumCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (courseAlbumCode != null) {
- map['CourseAlbumCode'] = courseAlbumCode;
- }
- return map;
- }
- }
- class CourseCommonInfoDTO extends BaseCourseAlbumDTO{
- String? cover;
- String? introduction;
- List<String>? courseLabels;
- String? teacherCode;
- String? teacherName;
- CourseViewRangeEnum viewRange;
- double price;
- CourseTypeEnum courseType;
- List<BaseUserGroupDTO>? userGroupList;
- List<BaseCourseAlbumDTO>? courseAlbumList;
- StudentCourseStatusEnum signCourseStatus;
- bool isPay;
- DateTime? createTime;
- DateTime? updateTime;
- CourseCommonInfoDTO({
- this.cover,
- this.introduction,
- this.courseLabels,
- this.teacherCode,
- this.teacherName,
- this.viewRange = CourseViewRangeEnum.All,
- this.price = 0,
- this.courseType = CourseTypeEnum.Unknown,
- this.userGroupList,
- this.courseAlbumList,
- this.signCourseStatus = StudentCourseStatusEnum.All,
- this.isPay = false,
- this.createTime,
- this.updateTime,
- String? code,
- String? name,
- }) : super(
- code: code,
- name: name,
- );
- factory CourseCommonInfoDTO.fromJson(Map<String, dynamic> map) {
- return CourseCommonInfoDTO(
- cover: map['Cover'],
- introduction: map['Introduction'],
- courseLabels: map['CourseLabels']?.cast<String>().toList(),
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- price: double.parse(map['Price'].toString()),
- courseType: CourseTypeEnum.values.firstWhere((e) => e.index == map['CourseType']),
- userGroupList: map['UserGroupList'] != null ? (map['UserGroupList'] as List).map((e)=>BaseUserGroupDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- courseAlbumList: map['CourseAlbumList'] != null ? (map['CourseAlbumList'] as List).map((e)=>BaseCourseAlbumDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
- isPay: map['IsPay'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- code: map['Code'],
- name: map['Name'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (cover != null)
- map['Cover'] = cover;
- if (introduction != null)
- map['Introduction'] = introduction;
- if (courseLabels != null)
- map['CourseLabels'] = courseLabels;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (teacherName != null)
- map['TeacherName'] = teacherName;
- map['ViewRange'] = viewRange.index;
- map['Price'] = price;
- map['CourseType'] = courseType.index;
- if (userGroupList != null)
- map['UserGroupList'] = userGroupList;
- if (courseAlbumList != null)
- map['CourseAlbumList'] = courseAlbumList;
- map['SignCourseStatus'] = signCourseStatus.index;
- map['IsPay'] = isPay;
- if (createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- if (updateTime != null)
- map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
- return map;
- }
- }
- class CourseAlbumExtendDTO extends BaseCourseAlbumDTO{
- List<CourseInfoDetailDTO>? courseInfos;
- int signInCount;
- String? cover;
- List<String>? courseCodes;
- String? introduction;
- List<String>? courseLabelCodes;
- List<String>? courseLabelNames;
- String? teacherCode;
- String? teacherName;
- CourseViewRangeEnum viewRange;
- double price;
- DateTime? createTime;
- int sort;
- bool isStick;
- StudentCourseStatusEnum signCourseStatus;
- bool isPay;
- CourseAlbumExtendDTO({
- this.courseInfos,
- this.signInCount = 0,
- this.cover,
- this.courseCodes,
- this.introduction,
- this.courseLabelCodes,
- this.courseLabelNames,
- this.teacherCode,
- this.teacherName,
- this.viewRange = CourseViewRangeEnum.All,
- this.price = 0,
- this.createTime,
- this.sort = 0,
- this.isStick = false,
- this.signCourseStatus = StudentCourseStatusEnum.All,
- this.isPay = false,
- String? code,
- String? name,
- }) : super(
- code: code,
- name: name,
- );
- factory CourseAlbumExtendDTO.fromJson(Map<String, dynamic> map) {
- return CourseAlbumExtendDTO(
- courseInfos: map['CourseInfos'] != null ? (map['CourseInfos'] as List).map((e)=>CourseInfoDetailDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- signInCount: map['SignInCount'],
- cover: map['Cover'],
- courseCodes: map['CourseCodes']?.cast<String>().toList(),
- introduction: map['Introduction'],
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- courseLabelNames: map['CourseLabelNames']?.cast<String>().toList(),
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- price: double.parse(map['Price'].toString()),
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- sort: map['Sort'],
- isStick: map['IsStick'],
- signCourseStatus: StudentCourseStatusEnum.values.firstWhere((e) => e.index == map['SignCourseStatus']),
- isPay: map['IsPay'],
- code: map['Code'],
- name: map['Name'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseInfos != null)
- map['CourseInfos'] = courseInfos;
- map['SignInCount'] = signInCount;
- if (cover != null)
- map['Cover'] = cover;
- if (courseCodes != null)
- map['CourseCodes'] = courseCodes;
- if (introduction != null)
- map['Introduction'] = introduction;
- if (courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- if (courseLabelNames != null)
- map['CourseLabelNames'] = courseLabelNames;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (teacherName != null)
- map['TeacherName'] = teacherName;
- map['ViewRange'] = viewRange.index;
- map['Price'] = price;
- if (createTime != null)
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- map['Sort'] = sort;
- map['IsStick'] = isStick;
- map['SignCourseStatus'] = signCourseStatus.index;
- map['IsPay'] = isPay;
- return map;
- }
- }
- class FindCourseAlbumByCodeRequest extends TokenRequest{
- String? courseAlbumCode;
- String? languageCode;
- FindCourseAlbumByCodeRequest({
- this.courseAlbumCode,
- this.languageCode,
- String? token,
- }) : super(
- token: token,
- );
- factory FindCourseAlbumByCodeRequest.fromJson(Map<String, dynamic> map) {
- return FindCourseAlbumByCodeRequest(
- courseAlbumCode: map['CourseAlbumCode'],
- languageCode: map['LanguageCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (courseAlbumCode != null)
- map['CourseAlbumCode'] = courseAlbumCode;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- class TeacherAddStudentsInUserGroupsRequest extends TokenRequest{
- String? userGroupCode;
- List<String>? studentCodes;
- TeacherAddStudentsInUserGroupsRequest({
- this.userGroupCode,
- this.studentCodes,
- String? token,
- }) : super(
- token: token,
- );
- factory TeacherAddStudentsInUserGroupsRequest.fromJson(Map<String, dynamic> map) {
- return TeacherAddStudentsInUserGroupsRequest(
- userGroupCode: map['UserGroupCode'],
- studentCodes: map['StudentCodes']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- if (studentCodes != null)
- map['StudentCodes'] = studentCodes;
- return map;
- }
- }
- class JoinClassApprovedRequest extends TokenRequest{
- String? userGroupCode;
- List<String>? students;
- JoinClassApprovedRequest({
- this.userGroupCode,
- this.students,
- String? token,
- }) : super(
- token: token,
- );
- factory JoinClassApprovedRequest.fromJson(Map<String, dynamic> map) {
- return JoinClassApprovedRequest(
- userGroupCode: map['UserGroupCode'],
- students: map['Students']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- if (students != null)
- map['Students'] = students;
- return map;
- }
- }
- class JoinClassRejectedRequest extends TokenRequest{
- String? userGroupCode;
- List<String>? students;
- JoinClassRejectedRequest({
- this.userGroupCode,
- this.students,
- String? token,
- }) : super(
- token: token,
- );
- factory JoinClassRejectedRequest.fromJson(Map<String, dynamic> map) {
- return JoinClassRejectedRequest(
- userGroupCode: map['UserGroupCode'],
- students: map['Students']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- if (students != null)
- map['Students'] = students;
- return map;
- }
- }
- class UserGroupStudentsDTO {
- String? code;
- String? name;
- String? userGroupCode;
- String? phone;
- bool isPay;
- LearnerStatusEnum learnerStatus;
- String? organizationName;
- UserGroupStudentsDTO({
- this.code,
- this.name,
- this.userGroupCode,
- this.phone,
- this.isPay = false,
- this.learnerStatus = LearnerStatusEnum.Unknown,
- this.organizationName,
- });
- factory UserGroupStudentsDTO.fromJson(Map<String, dynamic> map) {
- return UserGroupStudentsDTO(
- code: map['Code'],
- name: map['Name'],
- userGroupCode: map['UserGroupCode'],
- phone: map['Phone'],
- isPay: map['IsPay'],
- learnerStatus: LearnerStatusEnum.values.firstWhere((e) => e.index == map['LearnerStatus']),
- organizationName: map['OrganizationName'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (code != null) {
- map['Code'] = code;
- }
- if (name != null) {
- map['Name'] = name;
- }
- if (userGroupCode != null) {
- map['UserGroupCode'] = userGroupCode;
- }
- if (phone != null) {
- map['Phone'] = phone;
- }
- map['IsPay'] = isPay;
- map['LearnerStatus'] = learnerStatus.index;
- if (organizationName != null) {
- map['OrganizationName'] = organizationName;
- }
- return map;
- }
- }
- class FindStudentListRequest extends TokenRequest{
- String? userGroupCode;
- LearnerStatusEnum learnerStatus;
- FindStudentListRequest({
- this.userGroupCode,
- this.learnerStatus = LearnerStatusEnum.Unknown,
- String? token,
- }) : super(
- token: token,
- );
- factory FindStudentListRequest.fromJson(Map<String, dynamic> map) {
- return FindStudentListRequest(
- userGroupCode: map['UserGroupCode'],
- learnerStatus: LearnerStatusEnum.values.firstWhere((e) => e.index == map['LearnerStatus']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (userGroupCode != null)
- map['UserGroupCode'] = userGroupCode;
- map['LearnerStatus'] = learnerStatus.index;
- return map;
- }
- }
- class CreateVideosRequest extends TokenRequest{
- List<SaveVideoRequest>? videoList;
- CreateVideosRequest({
- this.videoList,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateVideosRequest.fromJson(Map<String, dynamic> map) {
- return CreateVideosRequest(
- videoList: map['VideoList'] != null ? (map['VideoList'] as List).map((e)=>SaveVideoRequest.fromJson(e as Map<String,dynamic>)).toList() : null,
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (videoList != null)
- map['VideoList'] = videoList;
- return map;
- }
- }
- class GetUserPagesRequest extends PageRequest{
- String? queryType;
- String? keyword;
- String? queryState;
- List<String>? excludeUserCodes;
- String? languageCode;
- String? userCode;
- List<String>? roleCodes;
- bool? isAgent;
- GetUserPagesRequest({
- this.queryType,
- this.keyword,
- this.queryState,
- this.excludeUserCodes,
- this.languageCode,
- this.userCode,
- this.roleCodes,
- this.isAgent,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory GetUserPagesRequest.fromJson(Map<String, dynamic> map) {
- return GetUserPagesRequest(
- queryType: map['QueryType'],
- keyword: map['Keyword'],
- queryState: map['QueryState'],
- excludeUserCodes: map['ExcludeUserCodes']?.cast<String>().toList(),
- languageCode: map['LanguageCode'],
- userCode: map['UserCode'],
- roleCodes: map['RoleCodes']?.cast<String>().toList(),
- isAgent: map['IsAgent'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (queryType != null)
- map['QueryType'] = queryType;
- if (keyword != null)
- map['Keyword'] = keyword;
- if (queryState != null)
- map['QueryState'] = queryState;
- if (excludeUserCodes != null)
- map['ExcludeUserCodes'] = excludeUserCodes;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (roleCodes != null)
- map['RoleCodes'] = roleCodes;
- if (isAgent != null)
- map['IsAgent'] = isAgent;
- return map;
- }
- }
- class SetShareInLiveCourseRequest extends InitiateLiveCourseRequest{
- CourseShareStates currentShareState;
- CourseShareType currentShareType;
- String? currentShareMemberCode;
- SetShareInLiveCourseRequest({
- this.currentShareState = CourseShareStates.Opened,
- this.currentShareType = CourseShareType.Window,
- this.currentShareMemberCode,
- String? courseCode,
- String? token,
- }) : super(
- courseCode: courseCode,
- token: token,
- );
- factory SetShareInLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return SetShareInLiveCourseRequest(
- currentShareState: CourseShareStates.values.firstWhere((e) => e.index == map['CurrentShareState']),
- currentShareType: CourseShareType.values.firstWhere((e) => e.index == map['CurrentShareType']),
- currentShareMemberCode: map['CurrentShareMemberCode'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['CurrentShareState'] = currentShareState.index;
- map['CurrentShareType'] = currentShareType.index;
- if (currentShareMemberCode != null)
- map['CurrentShareMemberCode'] = currentShareMemberCode;
- return map;
- }
- }
- class FindMyOrganizationExpertsRequest extends TokenRequest{
- String? name;
- FindMyOrganizationExpertsRequest({
- this.name,
- String? token,
- }) : super(
- token: token,
- );
- factory FindMyOrganizationExpertsRequest.fromJson(Map<String, dynamic> map) {
- return FindMyOrganizationExpertsRequest(
- name: map['Name'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (name != null)
- map['Name'] = name;
- return map;
- }
- }
- class SendLiveInteractiveBoardDataRequest extends TokenRequest{
- String? roomId;
- bool isClear;
- String? boardData;
- SendLiveInteractiveBoardDataRequest({
- this.roomId,
- this.isClear = false,
- this.boardData,
- String? token,
- }) : super(
- token: token,
- );
- factory SendLiveInteractiveBoardDataRequest.fromJson(Map<String, dynamic> map) {
- return SendLiveInteractiveBoardDataRequest(
- roomId: map['RoomId'],
- isClear: map['IsClear'],
- boardData: map['BoardData'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (roomId != null)
- map['RoomId'] = roomId;
- map['IsClear'] = isClear;
- if (boardData != null)
- map['BoardData'] = boardData;
- return map;
- }
- }
- class SendCourseEntryNoticeRequest extends TokenRequest{
- String? clientId;
- String? noticeData;
- SendCourseEntryNoticeRequest({
- this.clientId,
- this.noticeData,
- String? token,
- }) : super(
- token: token,
- );
- factory SendCourseEntryNoticeRequest.fromJson(Map<String, dynamic> map) {
- return SendCourseEntryNoticeRequest(
- clientId: map['ClientId'],
- noticeData: map['NoticeData'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (clientId != null)
- map['ClientId'] = clientId;
- if (noticeData != null)
- map['NoticeData'] = noticeData;
- return map;
- }
- }
- class DeviceLeaveLiveCourseRequest extends JoinLiveCourseRequest{
- DeviceLeaveLiveCourseRequest({
- String? deviceCode,
- String? courseCode,
- String? token,
- }) : super(
- deviceCode: deviceCode,
- courseCode: courseCode,
- token: token,
- );
- factory DeviceLeaveLiveCourseRequest.fromJson(Map<String, dynamic> map) {
- return DeviceLeaveLiveCourseRequest(
- deviceCode: map['DeviceCode'],
- courseCode: map['CourseCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class UpdateCourseAlbumRequest extends TokenRequest{
- String? name;
- String? courseAlbumCode;
- List<String>? courseCodes;
- String? cover;
- String? introduction;
- List<String>? courseLabelCodes;
- int sort;
- bool isStick;
- String? teacherCode;
- String? teacherName;
- CourseViewRangeEnum viewRange;
- double price;
- String? languageCode;
- UpdateCourseAlbumRequest({
- this.name,
- this.courseAlbumCode,
- this.courseCodes,
- this.cover,
- this.introduction,
- this.courseLabelCodes,
- this.sort = 0,
- this.isStick = false,
- this.teacherCode,
- this.teacherName,
- this.viewRange = CourseViewRangeEnum.All,
- this.price = 0,
- this.languageCode,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateCourseAlbumRequest.fromJson(Map<String, dynamic> map) {
- return UpdateCourseAlbumRequest(
- name: map['Name'],
- courseAlbumCode: map['CourseAlbumCode'],
- courseCodes: map['CourseCodes']?.cast<String>().toList(),
- cover: map['Cover'],
- introduction: map['Introduction'],
- courseLabelCodes: map['CourseLabelCodes']?.cast<String>().toList(),
- sort: map['Sort'],
- isStick: map['IsStick'],
- teacherCode: map['TeacherCode'],
- teacherName: map['TeacherName'],
- viewRange: CourseViewRangeEnum.values.firstWhere((e) => e.index == map['ViewRange']),
- price: double.parse(map['Price'].toString()),
- languageCode: map['LanguageCode'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (name != null)
- map['Name'] = name;
- if (courseAlbumCode != null)
- map['CourseAlbumCode'] = courseAlbumCode;
- if (courseCodes != null)
- map['CourseCodes'] = courseCodes;
- if (cover != null)
- map['Cover'] = cover;
- if (introduction != null)
- map['Introduction'] = introduction;
- if (courseLabelCodes != null)
- map['CourseLabelCodes'] = courseLabelCodes;
- map['Sort'] = sort;
- map['IsStick'] = isStick;
- if (teacherCode != null)
- map['TeacherCode'] = teacherCode;
- if (teacherName != null)
- map['TeacherName'] = teacherName;
- map['ViewRange'] = viewRange.index;
- map['Price'] = price;
- if (languageCode != null)
- map['LanguageCode'] = languageCode;
- return map;
- }
- }
- class ChangeVideoNameRequest extends TokenRequest{
- String? videoCode;
- String? newName;
- ChangeVideoNameRequest({
- this.videoCode,
- this.newName,
- String? token,
- }) : super(
- token: token,
- );
- factory ChangeVideoNameRequest.fromJson(Map<String, dynamic> map) {
- return ChangeVideoNameRequest(
- videoCode: map['VideoCode'],
- newName: map['NewName'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (videoCode != null)
- map['VideoCode'] = videoCode;
- if (newName != null)
- map['NewName'] = newName;
- return map;
- }
- }
- class AddCoursePlayCountRequest extends TokenRequest{
- String? code;
- AddCoursePlayCountRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory AddCoursePlayCountRequest.fromJson(Map<String, dynamic> map) {
- return AddCoursePlayCountRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- enum BrowsedUserTypeEnum {
- Teacher,
- Assistant,
- Guesting,
- Student,
- Visitor,
- }
- class BrowsedTimeRecordInfoDTO {
- DateTime? startTime;
- DateTime? endTime;
- int duration;
- BrowsedTimeRecordInfoDTO({
- this.startTime,
- this.endTime,
- this.duration = 0,
- });
- factory BrowsedTimeRecordInfoDTO.fromJson(Map<String, dynamic> map) {
- return BrowsedTimeRecordInfoDTO(
- startTime: map['StartTime'] != null ? DateTime.parse(map['StartTime']) : null,
- endTime: map['EndTime'] != null ? DateTime.parse(map['EndTime']) : null,
- duration: map['Duration'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (startTime != null) {
- map['StartTime'] = JsonRpcUtils.dateFormat(startTime!);
- }
- if (endTime != null) {
- map['EndTime'] = JsonRpcUtils.dateFormat(endTime!);
- }
- map['Duration'] = duration;
- return map;
- }
- }
- class CourseBrowsedRecordDTO {
- String? courseBrowsedRecordCode;
- String? relevanceCode;
- String? userCode;
- String? displayName;
- String? fromPlatform;
- int browsedCount;
- bool isOnline;
- BrowsedUserTypeEnum browsedUserType;
- DateTime? createTime;
- DateTime? updateTime;
- String? avatar;
- int durationMintues;
- List<BrowsedTimeRecordInfoDTO>? browsedTimeRecords;
- CustomerRpcCode errorCode;
- CourseBrowsedRecordDTO({
- this.courseBrowsedRecordCode,
- this.relevanceCode,
- this.userCode,
- this.displayName,
- this.fromPlatform,
- this.browsedCount = 0,
- this.isOnline = false,
- this.browsedUserType = BrowsedUserTypeEnum.Teacher,
- this.createTime,
- this.updateTime,
- this.avatar,
- this.durationMintues = 0,
- this.browsedTimeRecords,
- this.errorCode = CustomerRpcCode.Ok,
- });
- factory CourseBrowsedRecordDTO.fromJson(Map<String, dynamic> map) {
- return CourseBrowsedRecordDTO(
- courseBrowsedRecordCode: map['CourseBrowsedRecordCode'],
- relevanceCode: map['RelevanceCode'],
- userCode: map['UserCode'],
- displayName: map['DisplayName'],
- fromPlatform: map['FromPlatform'],
- browsedCount: map['BrowsedCount'],
- isOnline: map['IsOnline'],
- browsedUserType: BrowsedUserTypeEnum.values.firstWhere((e) => e.index == map['BrowsedUserType']),
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- avatar: map['Avatar'],
- durationMintues: map['DurationMintues'],
- browsedTimeRecords: map['BrowsedTimeRecords'] != null ? (map['BrowsedTimeRecords'] as List).map((e)=>BrowsedTimeRecordInfoDTO.fromJson(e as Map<String,dynamic>)).toList() : null,
- errorCode: CustomerRpcCode.values.firstWhere((e) => e.index == map['ErrorCode']),
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (courseBrowsedRecordCode != null) {
- map['CourseBrowsedRecordCode'] = courseBrowsedRecordCode;
- }
- if (relevanceCode != null) {
- map['RelevanceCode'] = relevanceCode;
- }
- if (userCode != null) {
- map['UserCode'] = userCode;
- }
- if (displayName != null) {
- map['DisplayName'] = displayName;
- }
- if (fromPlatform != null) {
- map['FromPlatform'] = fromPlatform;
- }
- map['BrowsedCount'] = browsedCount;
- map['IsOnline'] = isOnline;
- map['BrowsedUserType'] = browsedUserType.index;
- if (createTime != null) {
- map['CreateTime'] = JsonRpcUtils.dateFormat(createTime!);
- }
- if (updateTime != null) {
- map['UpdateTime'] = JsonRpcUtils.dateFormat(updateTime!);
- }
- if (avatar != null) {
- map['Avatar'] = avatar;
- }
- map['DurationMintues'] = durationMintues;
- if (browsedTimeRecords != null) {
- map['BrowsedTimeRecords'] = browsedTimeRecords;
- }
- map['ErrorCode'] = errorCode.index;
- return map;
- }
- }
- class CourseBrowsedRecordRequest extends TokenRequest{
- String? relevanceCode;
- String? userCode;
- String? displayName;
- String? fromPlatform;
- bool isOnline;
- BrowsedUserTypeEnum browsedUserType;
- bool isHeartRateRequest;
- CourseBrowsedRecordRequest({
- this.relevanceCode,
- this.userCode,
- this.displayName,
- this.fromPlatform,
- this.isOnline = false,
- this.browsedUserType = BrowsedUserTypeEnum.Teacher,
- this.isHeartRateRequest = false,
- String? token,
- }) : super(
- token: token,
- );
- factory CourseBrowsedRecordRequest.fromJson(Map<String, dynamic> map) {
- return CourseBrowsedRecordRequest(
- relevanceCode: map['RelevanceCode'],
- userCode: map['UserCode'],
- displayName: map['DisplayName'],
- fromPlatform: map['FromPlatform'],
- isOnline: map['IsOnline'],
- browsedUserType: BrowsedUserTypeEnum.values.firstWhere((e) => e.index == map['BrowsedUserType']),
- isHeartRateRequest: map['IsHeartRateRequest'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (relevanceCode != null)
- map['RelevanceCode'] = relevanceCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (displayName != null)
- map['DisplayName'] = displayName;
- if (fromPlatform != null)
- map['FromPlatform'] = fromPlatform;
- map['IsOnline'] = isOnline;
- map['BrowsedUserType'] = browsedUserType.index;
- map['IsHeartRateRequest'] = isHeartRateRequest;
- return map;
- }
- }
- class QueryBrowsedRecordPageRequest extends PageRequest{
- String? relevanceCode;
- String? userCode;
- String? displayName;
- int category;
- QueryBrowsedRecordPageRequest({
- this.relevanceCode,
- this.userCode,
- this.displayName,
- this.category = 0,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory QueryBrowsedRecordPageRequest.fromJson(Map<String, dynamic> map) {
- return QueryBrowsedRecordPageRequest(
- relevanceCode: map['RelevanceCode'],
- userCode: map['UserCode'],
- displayName: map['DisplayName'],
- category: map['Category'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (relevanceCode != null)
- map['RelevanceCode'] = relevanceCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (displayName != null)
- map['DisplayName'] = displayName;
- map['Category'] = category;
- return map;
- }
- }
- class QueryBrowsedRecordRequest extends TokenRequest{
- String? relevanceCode;
- String? userCode;
- String? displayName;
- QueryBrowsedRecordRequest({
- this.relevanceCode,
- this.userCode,
- this.displayName,
- String? token,
- }) : super(
- token: token,
- );
- factory QueryBrowsedRecordRequest.fromJson(Map<String, dynamic> map) {
- return QueryBrowsedRecordRequest(
- relevanceCode: map['RelevanceCode'],
- userCode: map['UserCode'],
- displayName: map['DisplayName'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (relevanceCode != null)
- map['RelevanceCode'] = relevanceCode;
- if (userCode != null)
- map['UserCode'] = userCode;
- if (displayName != null)
- map['DisplayName'] = displayName;
- return map;
- }
- }
- class CourseLiveProhibitionRequest extends TokenRequest{
- String? code;
- bool isProhibition;
- CourseLiveProhibitionRequest({
- this.code,
- this.isProhibition = false,
- String? token,
- }) : super(
- token: token,
- );
- factory CourseLiveProhibitionRequest.fromJson(Map<String, dynamic> map) {
- return CourseLiveProhibitionRequest(
- code: map['Code'],
- isProhibition: map['IsProhibition'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- map['IsProhibition'] = isProhibition;
- return map;
- }
- }
- class CourseVisitorsStatisticResult {
- int onlineCount;
- int visitorCount;
- int maxOnlineCount;
- int signStudentCount;
- CourseVisitorsStatisticResult({
- this.onlineCount = 0,
- this.visitorCount = 0,
- this.maxOnlineCount = 0,
- this.signStudentCount = 0,
- });
- factory CourseVisitorsStatisticResult.fromJson(Map<String, dynamic> map) {
- return CourseVisitorsStatisticResult(
- onlineCount: map['OnlineCount'],
- visitorCount: map['VisitorCount'],
- maxOnlineCount: map['MaxOnlineCount'],
- signStudentCount: map['SignStudentCount'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['OnlineCount'] = onlineCount;
- map['VisitorCount'] = visitorCount;
- map['MaxOnlineCount'] = maxOnlineCount;
- map['SignStudentCount'] = signStudentCount;
- return map;
- }
- }
- class WXCarouselsResult {
- String? code;
- String? fileToken;
- String? transferUrl;
- WXCarouselsResult({
- this.code,
- this.fileToken,
- this.transferUrl,
- });
- factory WXCarouselsResult.fromJson(Map<String, dynamic> map) {
- return WXCarouselsResult(
- code: map['Code'],
- fileToken: map['FileToken'],
- transferUrl: map['TransferUrl'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if (code != null) {
- map['Code'] = code;
- }
- if (fileToken != null) {
- map['FileToken'] = fileToken;
- }
- if (transferUrl != null) {
- map['TransferUrl'] = transferUrl;
- }
- return map;
- }
- }
- class GetWXCarouselRequest extends TokenRequest{
- AnnouncementTypeEnum announcementType;
- GetWXCarouselRequest({
- this.announcementType = AnnouncementTypeEnum.Broadcast,
- String? token,
- }) : super(
- token: token,
- );
- factory GetWXCarouselRequest.fromJson(Map<String, dynamic> map) {
- return GetWXCarouselRequest(
- announcementType: AnnouncementTypeEnum.values.firstWhere((e) => e.index == map['AnnouncementType']),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- map['AnnouncementType'] = announcementType.index;
- return map;
- }
- }
|