12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904 |
- using System;
- using System.Collections.Generic;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata;
- using CodeFirstExistingDatabaseSample.ISMS_BASE.Models;
- using Abp.EntityFrameworkCore;
- using Microsoft.Extensions.Options;
- namespace CodeFirstExistingDatabaseSample.ISMS_BASE
- {
- public partial class ISMS_BASEContext : AbpDbContext
- {
- public ISMS_BASEContext(DbContextOptions<ISMS_BASEContext> options) : base(options)
- {
- }
- #region 实体类
- public virtual DbSet<IaFuncNameConst> IaFuncNameConsts { get; set; } = null!;
- public virtual DbSet<IaMaChannel> IaMaChannels { get; set; } = null!;
- public virtual DbSet<IaModule> IaModules { get; set; } = null!;
- public virtual DbSet<IaModuleDir> IaModuleDirs { get; set; } = null!;
- public virtual DbSet<IaMonitorArea> IaMonitorAreas { get; set; } = null!;
- public virtual DbSet<IaStatAccCtler> IaStatAccCtlers { get; set; } = null!;
- public virtual DbSet<IaStatAidVideoDev> IaStatAidVideoDevs { get; set; } = null!;
- public virtual DbSet<IaVAllChannel> IaVAllChannels { get; set; } = null!;
- public virtual DbSet<IaVAllFunc4Module> IaVAllFunc4Modules { get; set; } = null!;
- public virtual DbSet<IaVMaChannel> IaVMaChannels { get; set; } = null!;
- public virtual DbSet<IaVModule> IaVModules { get; set; } = null!;
- public virtual DbSet<IaVStatAidVideoDev> IaVStatAidVideoDevs { get; set; } = null!;
- public virtual DbSet<IaVVideoPatrolItemExecObj> IaVVideoPatrolItemExecObjs { get; set; } = null!;
- public virtual DbSet<IaVideoPatrol> IaVideoPatrols { get; set; } = null!;
- public virtual DbSet<IaVideoPatrolHi> IaVideoPatrolHis { get; set; } = null!;
- public virtual DbSet<IaVideoPatrolItem> IaVideoPatrolItems { get; set; } = null!;
- public virtual DbSet<IaVideoPatrolItemHi> IaVideoPatrolItemHis { get; set; } = null!;
- public virtual DbSet<Im3posSwitch> Im3posSwitches { get; set; } = null!;
- public virtual DbSet<ImAlert201310> ImAlert201310s { get; set; } = null!;
- public virtual DbSet<ImAlertLevel> ImAlertLevels { get; set; } = null!;
- public virtual DbSet<ImAlertState> ImAlertStates { get; set; } = null!;
- public virtual DbSet<ImAlertType> ImAlertTypes { get; set; } = null!;
- public virtual DbSet<ImAnalogData2010> ImAnalogData2010s { get; set; } = null!;
- public virtual DbSet<ImAnalogData20102> ImAnalogData20102s { get; set; } = null!;
- public virtual DbSet<ImAsdu140FltActType> ImAsdu140FltActTypes { get; set; } = null!;
- public virtual DbSet<ImAsdu140FltCurrInfo> ImAsdu140FltCurrInfos { get; set; } = null!;
- public virtual DbSet<ImAsdu142info> ImAsdu142infos { get; set; } = null!;
- public virtual DbSet<ImAutoReport> ImAutoReports { get; set; } = null!;
- public virtual DbSet<ImAutoReportItem> ImAutoReportItems { get; set; } = null!;
- public virtual DbSet<ImBreakerNoEnum> ImBreakerNoEnums { get; set; } = null!;
- public virtual DbSet<ImCtrlWordDef> ImCtrlWordDefs { get; set; } = null!;
- public virtual DbSet<ImCurve> ImCurves { get; set; } = null!;
- public virtual DbSet<ImCurveItem> ImCurveItems { get; set; } = null!;
- public virtual DbSet<ImCurveType> ImCurveTypes { get; set; } = null!;
- public virtual DbSet<ImDataViewer> ImDataViewers { get; set; } = null!;
- public virtual DbSet<ImDataViewerDatum> ImDataViewerData { get; set; } = null!;
- public virtual DbSet<ImDevCtgy> ImDevCtgies { get; set; } = null!;
- public virtual DbSet<ImDeviceActRule> ImDeviceActRules { get; set; } = null!;
- public virtual DbSet<ImDeviceActRuleTmp> ImDeviceActRuleTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceDataTmp> ImDeviceDataTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceDatum> ImDeviceData { get; set; } = null!;
- public virtual DbSet<ImDeviceDz> ImDeviceDzs { get; set; } = null!;
- public virtual DbSet<ImDeviceDzTmp> ImDeviceDzTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceDzenum> ImDeviceDzenums { get; set; } = null!;
- public virtual DbSet<ImDeviceDzenum2> ImDeviceDzenum2s { get; set; } = null!;
- public virtual DbSet<ImDeviceDzenumPu> ImDeviceDzenumPus { get; set; } = null!;
- public virtual DbSet<ImDeviceVa> ImDeviceVas { get; set; } = null!;
- public virtual DbSet<ImDeviceVaTmp> ImDeviceVaTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceYc> ImDeviceYcs { get; set; } = null!;
- public virtual DbSet<ImDeviceYcTmp> ImDeviceYcTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceYk> ImDeviceYks { get; set; } = null!;
- public virtual DbSet<ImDeviceYkTmp> ImDeviceYkTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceYm> ImDeviceYms { get; set; } = null!;
- public virtual DbSet<ImDeviceYmTmp> ImDeviceYmTmps { get; set; } = null!;
- public virtual DbSet<ImDeviceYx> ImDeviceYxes { get; set; } = null!;
- public virtual DbSet<ImDeviceYxSrcDevice> ImDeviceYxSrcDevices { get; set; } = null!;
- public virtual DbSet<ImDeviceYxTmp> ImDeviceYxTmps { get; set; } = null!;
- public virtual DbSet<ImDiagram> ImDiagrams { get; set; } = null!;
- public virtual DbSet<ImDztype> ImDztypes { get; set; } = null!;
- public virtual DbSet<ImEventFlag> ImEventFlags { get; set; } = null!;
- public virtual DbSet<ImEventParam> ImEventParams { get; set; } = null!;
- public virtual DbSet<ImEventType> ImEventTypes { get; set; } = null!;
- public virtual DbSet<ImEventType2010> ImEventType2010s { get; set; } = null!;
- public virtual DbSet<ImEventType2010DeviceYktmp> ImEventType2010DeviceYktmps { get; set; } = null!;
- public virtual DbSet<ImFaultActType> ImFaultActTypes { get; set; } = null!;
- public virtual DbSet<ImFaultActType2010> ImFaultActType2010s { get; set; } = null!;
- public virtual DbSet<ImFaultActType20102> ImFaultActType20102s { get; set; } = null!;
- public virtual DbSet<ImFaultActTypePd> ImFaultActTypePds { get; set; } = null!;
- public virtual DbSet<ImFaultParam> ImFaultParams { get; set; } = null!;
- public virtual DbSet<ImFaultParamPd> ImFaultParamPds { get; set; } = null!;
- public virtual DbSet<ImFaultReportItem> ImFaultReportItems { get; set; } = null!;
- public virtual DbSet<ImFaultType> ImFaultTypes { get; set; } = null!;
- public virtual DbSet<ImFaultType2010> ImFaultType2010s { get; set; } = null!;
- public virtual DbSet<ImFaultTypePd> ImFaultTypePds { get; set; } = null!;
- public virtual DbSet<ImFltDistDevGrp> ImFltDistDevGrps { get; set; } = null!;
- public virtual DbSet<ImFltDistDevice> ImFltDistDevices { get; set; } = null!;
- public virtual DbSet<ImFltDistParam> ImFltDistParams { get; set; } = null!;
- public virtual DbSet<ImFxcurrAbnormalSet> ImFxcurrAbnormalSets { get; set; } = null!;
- public virtual DbSet<ImGateWay> ImGateWays { get; set; } = null!;
- public virtual DbSet<ImGlyph> ImGlyphs { get; set; } = null!;
- public virtual DbSet<ImGlyphDefProp> ImGlyphDefProps { get; set; } = null!;
- public virtual DbSet<ImGlyphDevDatum> ImGlyphDevData { get; set; } = null!;
- public virtual DbSet<ImGlyphHot> ImGlyphHots { get; set; } = null!;
- public virtual DbSet<ImGrid> ImGrids { get; set; } = null!;
- public virtual DbSet<ImLabel> ImLabels { get; set; } = null!;
- public virtual DbSet<ImLinkage> ImLinkages { get; set; } = null!;
- public virtual DbSet<ImManufacturer> ImManufacturers { get; set; } = null!;
- public virtual DbSet<ImNoticeBoard> ImNoticeBoards { get; set; } = null!;
- public virtual DbSet<ImNotifyTask> ImNotifyTasks { get; set; } = null!;
- public virtual DbSet<ImNotifyTaskAlertObj> ImNotifyTaskAlertObjs { get; set; } = null!;
- public virtual DbSet<ImNotifyTaskPhone> ImNotifyTaskPhones { get; set; } = null!;
- public virtual DbSet<ImNotifyTaskTemplate> ImNotifyTaskTemplates { get; set; } = null!;
- public virtual DbSet<ImOnlineAnalysis> ImOnlineAnalyses { get; set; } = null!;
- public virtual DbSet<ImProgControl> ImProgControls { get; set; } = null!;
- public virtual DbSet<ImProgControlItem> ImProgControlItems { get; set; } = null!;
- public virtual DbSet<ImProject> ImProjects { get; set; } = null!;
- public virtual DbSet<ImProtectDevice> ImProtectDevices { get; set; } = null!;
- public virtual DbSet<ImProtectDeviceTmp> ImProtectDeviceTmps { get; set; } = null!;
- public virtual DbSet<ImPuCtgy> ImPuCtgies { get; set; } = null!;
- public virtual DbSet<ImPuUpdateLog> ImPuUpdateLogs { get; set; } = null!;
- public virtual DbSet<ImPuWaveChl> ImPuWaveChls { get; set; } = null!;
- public virtual DbSet<ImPuctgyFaultType> ImPuctgyFaultTypes { get; set; } = null!;
- public virtual DbSet<ImPuctgyFltRptItem> ImPuctgyFltRptItems { get; set; } = null!;
- public virtual DbSet<ImReportCfg> ImReportCfgs { get; set; } = null!;
- public virtual DbSet<ImReportCfgDatum> ImReportCfgData { get; set; } = null!;
- public virtual DbSet<ImReportType> ImReportTypes { get; set; } = null!;
- public virtual DbSet<ImSanBiZhiFaultDefine> ImSanBiZhiFaultDefines { get; set; } = null!;
- public virtual DbSet<ImSanBiZhiFaultType> ImSanBiZhiFaultTypes { get; set; } = null!;
- public virtual DbSet<ImSheBei> ImSheBeis { get; set; } = null!;
- public virtual DbSet<ImSheBeiDeviceDatum> ImSheBeiDeviceData { get; set; } = null!;
- public virtual DbSet<ImSheBeiLx> ImSheBeiLxes { get; set; } = null!;
- public virtual DbSet<ImSheBeiProtDevice> ImSheBeiProtDevices { get; set; } = null!;
- public virtual DbSet<ImSheBeiZt> ImSheBeiZts { get; set; } = null!;
- public virtual DbSet<ImStation> ImStations { get; set; } = null!;
- public virtual DbSet<ImSwitchState> ImSwitchStates { get; set; } = null!;
- public virtual DbSet<ImTimeSrc> ImTimeSrcs { get; set; } = null!;
- public virtual DbSet<ImVDevDataLinkage> ImVDevDataLinkages { get; set; } = null!;
- public virtual DbSet<ImVDeviceDatum> ImVDeviceData { get; set; } = null!;
- public virtual DbSet<ImVDeviceDz> ImVDeviceDzs { get; set; } = null!;
- public virtual DbSet<ImVDeviceYc> ImVDeviceYcs { get; set; } = null!;
- public virtual DbSet<ImVDeviceYk> ImVDeviceYks { get; set; } = null!;
- public virtual DbSet<ImVDeviceYm> ImVDeviceYms { get; set; } = null!;
- public virtual DbSet<ImVDeviceYx> ImVDeviceYxes { get; set; } = null!;
- public virtual DbSet<ImVDeviceYxSrcDevice> ImVDeviceYxSrcDevices { get; set; } = null!;
- public virtual DbSet<ImVDzdataDetail> ImVDzdataDetails { get; set; } = null!;
- public virtual DbSet<ImVDzdataMain> ImVDzdataMains { get; set; } = null!;
- public virtual DbSet<ImVEventType2010DeviceYktmp> ImVEventType2010DeviceYktmps { get; set; } = null!;
- public virtual DbSet<ImVFaultActType2010> ImVFaultActType2010s { get; set; } = null!;
- public virtual DbSet<ImVNotifyTask> ImVNotifyTasks { get; set; } = null!;
- public virtual DbSet<ImVNotifyTaskPhone> ImVNotifyTaskPhones { get; set; } = null!;
- public virtual DbSet<ImVOnlineAnalysis> ImVOnlineAnalyses { get; set; } = null!;
- public virtual DbSet<ImVProtectDevice> ImVProtectDevices { get; set; } = null!;
- public virtual DbSet<ImVProtectDeviceTmp> ImVProtectDeviceTmps { get; set; } = null!;
- public virtual DbSet<ImVSheBei> ImVSheBeis { get; set; } = null!;
- public virtual DbSet<ImVSheBeiDeviceDatum> ImVSheBeiDeviceData { get; set; } = null!;
- public virtual DbSet<ImVSheBeiProtDevice> ImVSheBeiProtDevices { get; set; } = null!;
- public virtual DbSet<ImVStation4SheBei> ImVStation4SheBeis { get; set; } = null!;
- public virtual DbSet<ImVariantBool> ImVariantBools { get; set; } = null!;
- public virtual DbSet<ImVariantBoolState> ImVariantBoolStates { get; set; } = null!;
- public virtual DbSet<ImVersion> ImVersions { get; set; } = null!;
- public virtual DbSet<ImVersionTypeEnum2010> ImVersionTypeEnum2010s { get; set; } = null!;
- public virtual DbSet<ImWatchdog> ImWatchdogs { get; set; } = null!;
- public virtual DbSet<ImYkType> ImYkTypes { get; set; } = null!;
- public virtual DbSet<ImYxType> ImYxTypes { get; set; } = null!;
- public virtual DbSet<TbAccessController> TbAccessControllers { get; set; } = null!;
- public virtual DbSet<TbAidPlatform> TbAidPlatforms { get; set; } = null!;
- public virtual DbSet<TbAidVideoChannel> TbAidVideoChannels { get; set; } = null!;
- public virtual DbSet<TbAidVideoDev> TbAidVideoDevs { get; set; } = null!;
- public virtual DbSet<TbAttachment> TbAttachments { get; set; } = null!;
- public virtual DbSet<TbBuMan> TbBuMen { get; set; } = null!;
- public virtual DbSet<TbBuMenLx> TbBuMenLxes { get; set; } = null!;
- public virtual DbSet<TbBusiHistory> TbBusiHistories { get; set; } = null!;
- public virtual DbSet<TbBusiness> TbBusinesses { get; set; } = null!;
- public virtual DbSet<TbDaTask> TbDaTasks { get; set; } = null!;
- public virtual DbSet<TbDataModiHi> TbDataModiHis { get; set; } = null!;
- public virtual DbSet<TbDataViewer> TbDataViewers { get; set; } = null!;
- public virtual DbSet<TbDataViewerBusiObj> TbDataViewerBusiObjs { get; set; } = null!;
- public virtual DbSet<TbDframeRevision> TbDframeRevisions { get; set; } = null!;
- public virtual DbSet<TbDiagram> TbDiagrams { get; set; } = null!;
- public virtual DbSet<TbEnvVar> TbEnvVars { get; set; } = null!;
- public virtual DbSet<TbExportTemplate> TbExportTemplates { get; set; } = null!;
- public virtual DbSet<TbExportTemplateCol> TbExportTemplateCols { get; set; } = null!;
- public virtual DbSet<TbField> TbFields { get; set; } = null!;
- public virtual DbSet<TbGlyph> TbGlyphs { get; set; } = null!;
- public virtual DbSet<TbGlyphHot> TbGlyphHots { get; set; } = null!;
- public virtual DbSet<TbGlyphLinkObj> TbGlyphLinkObjs { get; set; } = null!;
- public virtual DbSet<TbGrid> TbGrids { get; set; } = null!;
- public virtual DbSet<TbImage> TbImages { get; set; } = null!;
- public virtual DbSet<TbLabel> TbLabels { get; set; } = null!;
- public virtual DbSet<TbNotifySent> TbNotifySents { get; set; } = null!;
- public virtual DbSet<TbNotifyTask> TbNotifyTasks { get; set; } = null!;
- public virtual DbSet<TbPlanTask> TbPlanTasks { get; set; } = null!;
- public virtual DbSet<TbPlanTaskItem> TbPlanTaskItems { get; set; } = null!;
- public virtual DbSet<TbPresetPoint> TbPresetPoints { get; set; } = null!;
- public virtual DbSet<TbQuanXian> TbQuanXians { get; set; } = null!;
- public virtual DbSet<TbSession> TbSessions { get; set; } = null!;
- public virtual DbSet<TbSm> TbSms { get; set; } = null!;
- public virtual DbSet<TbSmsSent> TbSmsSents { get; set; } = null!;
- public virtual DbSet<TbTable> TbTables { get; set; } = null!;
- public virtual DbSet<TbTableDataDup> TbTableDataDups { get; set; } = null!;
- public virtual DbSet<TbTableMap> TbTableMaps { get; set; } = null!;
- public virtual DbSet<TbTreeNode> TbTreeNodes { get; set; } = null!;
- public virtual DbSet<TbUserCondition> TbUserConditions { get; set; } = null!;
- public virtual DbSet<TbVideoChannelRight> TbVideoChannelRights { get; set; } = null!;
- public virtual DbSet<TbVirtualTable> TbVirtualTables { get; set; } = null!;
- public virtual DbSet<TbWfStep> TbWfSteps { get; set; } = null!;
- public virtual DbSet<TbWfStepUser> TbWfStepUsers { get; set; } = null!;
- public virtual DbSet<TbWorkflow> TbWorkflows { get; set; } = null!;
- public virtual DbSet<TbXiTongMoKuai> TbXiTongMoKuais { get; set; } = null!;
- public virtual DbSet<TbXiTongRiZhi> TbXiTongRiZhis { get; set; } = null!;
- public virtual DbSet<TbYongHu> TbYongHus { get; set; } = null!;
- public virtual DbSet<VwAidVideoChannel> VwAidVideoChannels { get; set; } = null!;
- public virtual DbSet<VwPresetPoint> VwPresetPoints { get; set; } = null!;
- public virtual DbSet<VwTableDataDup> VwTableDataDups { get; set; } = null!;
- public virtual DbSet<VwTableMap> VwTableMaps { get; set; } = null!;
- public virtual DbSet<VwVideoChannelRight> VwVideoChannelRights { get; set; } = null!;
- #endregion
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
- {
- optionsBuilder
- .EnableSensitiveDataLogging(true);
- base.OnConfiguring(optionsBuilder);
- //if (!optionsBuilder.IsConfigured)
- //{
- // optionsBuilder.UseSqlServer("Server=192.168.110.161;User ID=sa;Password=sa;Database=ISMS_BASE;Trusted_Connection=False;");
- //}
- }
-
- partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- modelBuilder.Entity<IaFuncNameConst>(entity =>
- {
- entity.HasKey(e => e.FnameId)
- .HasName("PK_FuncNameConst");
- entity.ToTable("ia_FuncNameConst");
- entity.HasIndex(e => e.Fname, "UK_FuncNameConst_FName")
- .IsUnique();
- entity.Property(e => e.FnameId)
- .HasMaxLength(2)
- .IsUnicode(false)
- .HasColumnName("FNameID");
- entity.Property(e => e.Fname)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("FName");
- });
- modelBuilder.Entity<IaMaChannel>(entity =>
- {
- entity.HasKey(e => e.RecId)
- .HasName("PK_MA_Channel");
- entity.ToTable("ia_MA_Channel");
- entity.HasIndex(e => new { e.MaId, e.ChanId }, "UK_MA_Channel")
- .IsUnique();
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.MaId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("MA_ID");
- entity.HasOne(d => d.Ma)
- .WithMany(p => p.IaMaChannels)
- .HasForeignKey(d => d.MaId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_MAChan_MA");
- });
- modelBuilder.Entity<IaModule>(entity =>
- {
- entity.HasKey(e => e.ModuleId)
- .HasName("PK_Module");
- entity.ToTable("ia_Module");
- entity.HasIndex(e => new { e.DirId, e.ModuleName }, "UK_Module_Name")
- .IsUnique();
- entity.Property(e => e.ModuleId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ModuleID");
- entity.Property(e => e.DirId)
- .HasMaxLength(2)
- .IsUnicode(false)
- .HasColumnName("DirID");
- entity.Property(e => e.FuncId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("FuncID");
- entity.Property(e => e.ImgName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ModuleName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ModuleType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("State_");
- entity.HasOne(d => d.Dir)
- .WithMany(p => p.IaModules)
- .HasForeignKey(d => d.DirId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Module_Dir");
- });
- modelBuilder.Entity<IaModuleDir>(entity =>
- {
- entity.HasKey(e => e.DirId)
- .HasName("PK_ModuleDir");
- entity.ToTable("ia_ModuleDir");
- entity.HasIndex(e => e.DirName, "UK_ModuleDir_Name")
- .IsUnique();
- entity.Property(e => e.DirId)
- .HasMaxLength(2)
- .IsUnicode(false)
- .HasColumnName("DirID");
- entity.Property(e => e.DirName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<IaMonitorArea>(entity =>
- {
- entity.HasKey(e => e.MaId)
- .HasName("PK_MonitorArea");
- entity.ToTable("ia_MonitorArea");
- entity.HasIndex(e => new { e.Maname, e.StatCode }, "UK_MonitorArea")
- .IsUnique();
- entity.Property(e => e.MaId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("MA_ID");
- entity.Property(e => e.Maname)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("MAName");
- entity.Property(e => e.ParentId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("Parent_ID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.IaMonitorAreas)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_MonitorArea_Station");
- });
- modelBuilder.Entity<IaStatAccCtler>(entity =>
- {
- entity.HasKey(e => e.CtlerId)
- .HasName("PK_Stat_AccCtler");
- entity.ToTable("ia_Stat_AccCtler");
- entity.Property(e => e.CtlerId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("CtlerID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.HasOne(d => d.Ctler)
- .WithOne(p => p.IaStatAccCtler)
- .HasForeignKey<IaStatAccCtler>(d => d.CtlerId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_StatAccCtler_Ctler");
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.IaStatAccCtlers)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_StatAccCtler_Stat");
- });
- modelBuilder.Entity<IaStatAidVideoDev>(entity =>
- {
- entity.HasKey(e => e.RecId)
- .HasName("PK_Stat_VideoDev");
- entity.ToTable("ia_Stat_AidVideoDev");
- entity.HasIndex(e => new { e.StatCode, e.DevId }, "UK_Stat_VideoDev")
- .IsUnique();
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.HasOne(d => d.Dev)
- .WithMany(p => p.IaStatAidVideoDevs)
- .HasForeignKey(d => d.DevId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_StatVideoDev_Dev");
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.IaStatAidVideoDevs)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_StatVideoDev_Stat");
- });
- modelBuilder.Entity<IaVAllChannel>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("ia_v_AllChannel");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.ChanName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ChanType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<IaVAllFunc4Module>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("ia_v_AllFunc4Module");
- entity.Property(e => e.FuncId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("FuncID");
- entity.Property(e => e.FuncName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.FuncType)
- .HasMaxLength(8)
- .IsUnicode(false);
- entity.Property(e => e.OrderFld)
- .HasMaxLength(293)
- .IsUnicode(false);
- });
- modelBuilder.Entity<IaVMaChannel>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("ia_v_MA_Channel");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.ChanName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ChanType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.MaId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("MA_ID");
- entity.Property(e => e.Maname)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("MAName");
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<IaVModule>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("ia_v_Module");
- entity.Property(e => e.DirId)
- .HasMaxLength(2)
- .IsUnicode(false)
- .HasColumnName("DirID");
- entity.Property(e => e.DirName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.FuncId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("FuncID");
- entity.Property(e => e.FuncName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.FuncType)
- .HasMaxLength(8)
- .IsUnicode(false);
- entity.Property(e => e.ImgName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ModuleId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ModuleID");
- entity.Property(e => e.ModuleName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ModuleType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("State_");
- });
- modelBuilder.Entity<IaVStatAidVideoDev>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("ia_v_Stat_AidVideoDev");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Ip)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("IP");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PassEnc)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PlatId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PlatID");
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.UserName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<IaVVideoPatrolItemExecObj>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("ia_v_VideoPatrolItemExecObj");
- entity.Property(e => e.ExeObjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ExeObjID");
- entity.Property(e => e.ExeObjName)
- .HasMaxLength(357)
- .IsUnicode(false);
- entity.Property(e => e.ExeObjType)
- .HasMaxLength(8)
- .IsUnicode(false);
- });
- modelBuilder.Entity<IaVideoPatrol>(entity =>
- {
- entity.HasKey(e => e.PatId)
- .HasName("PK_VideoPatrol");
- entity.ToTable("ia_VideoPatrol");
- entity.HasIndex(e => e.PatName, "UK_VideoPatrol_Name")
- .IsUnique();
- entity.Property(e => e.PatId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PatID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CreTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.PatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.PatType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PrjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PrjID");
- entity.HasOne(d => d.Prj)
- .WithMany(p => p.IaVideoPatrols)
- .HasForeignKey(d => d.PrjId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_VideoPatrol_Project");
- });
- modelBuilder.Entity<IaVideoPatrolHi>(entity =>
- {
- entity.HasKey(e => e.PatHisId)
- .HasName("PK_VideoPatrolHis");
- entity.ToTable("ia_VideoPatrolHis");
- entity.Property(e => e.PatHisId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PatHisID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.EndTime).HasColumnType("datetime");
- entity.Property(e => e.PatId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PatID");
- entity.Property(e => e.PatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.PatType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PatUser)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Result)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.StartTime).HasColumnType("datetime");
- });
- modelBuilder.Entity<IaVideoPatrolItem>(entity =>
- {
- entity.HasKey(e => e.PiId)
- .HasName("PK_VPItem");
- entity.ToTable("ia_VideoPatrolItem");
- entity.HasIndex(e => new { e.PatId, e.PiseqNo }, "UK_VPItem_SeqNo")
- .IsUnique();
- entity.Property(e => e.PiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PI_ID");
- entity.Property(e => e.ActParam)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Action)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.BkimgPaths)
- .HasMaxLength(1000)
- .IsUnicode(false)
- .HasColumnName("BKImgPaths");
- entity.Property(e => e.ExeObjId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("ExeObjID");
- entity.Property(e => e.ExeObjType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.IsCompareDiff)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.PatId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PatID");
- entity.Property(e => e.Piname)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("PIName");
- entity.Property(e => e.PiseqNo).HasColumnName("PISeqNo");
- entity.HasOne(d => d.Pat)
- .WithMany(p => p.IaVideoPatrolItems)
- .HasForeignKey(d => d.PatId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_VPItem_VP");
- });
- modelBuilder.Entity<IaVideoPatrolItemHi>(entity =>
- {
- entity.HasKey(e => e.PatItemHisId)
- .HasName("PK_VideoPatrolItemHis");
- entity.ToTable("ia_VideoPatrolItemHis");
- entity.Property(e => e.PatItemHisId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PatItemHisID");
- entity.Property(e => e.CompareMsg)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CompareRet)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasDefaultValueSql("('尚未比较')");
- entity.Property(e => e.Description)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.EndTime).HasColumnType("datetime");
- entity.Property(e => e.PatHisId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PatHisID");
- entity.Property(e => e.PiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PI_ID");
- entity.Property(e => e.Piname)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("PIName");
- entity.Property(e => e.PiseqNo).HasColumnName("PISeqNo");
- entity.Property(e => e.StartTime).HasColumnType("datetime");
- entity.Property(e => e.State)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.HasOne(d => d.PatHis)
- .WithMany(p => p.IaVideoPatrolItemHis)
- .HasForeignKey(d => d.PatHisId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_VPHItem_VPH");
- });
- modelBuilder.Entity<Im3posSwitch>(entity =>
- {
- entity.ToTable("im_3PosSwitch");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.GndykdataId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("GNDYKDataID");
- entity.Property(e => e.GndykdataName)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("GNDYKDataName");
- entity.Property(e => e.GndyxdataId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("GNDYXDataID");
- entity.Property(e => e.GndyxdataName)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("GNDYXDataName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.Im3posSwitch)
- .HasForeignKey<Im3posSwitch>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_3PosSwitch_Glyph");
- });
- modelBuilder.Entity<ImAlert201310>(entity =>
- {
- entity.ToTable("im_Alert201310");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.AlertTime)
- .HasMaxLength(25)
- .IsUnicode(false);
- entity.Property(e => e.AlertType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Alerter)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.Content)
- .HasMaxLength(2500)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.RecTime).HasColumnType("datetime");
- entity.Property(e => e.StatCode)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.TimeSrc)
- .HasMaxLength(8)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImAlertLevel>(entity =>
- {
- entity.HasKey(e => e.AlertLevelCode)
- .HasName("pk_AlertLevel");
- entity.ToTable("im_AlertLevel");
- entity.Property(e => e.AlertLevelCode)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.AlertLevelName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImAlertState>(entity =>
- {
- entity.HasKey(e => e.StateCode)
- .HasName("pk_AlertState");
- entity.ToTable("im_AlertState");
- entity.Property(e => e.StateCode)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.StateName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImAlertType>(entity =>
- {
- entity.HasKey(e => e.AlertType)
- .HasName("PK_AlertType");
- entity.ToTable("im_AlertType");
- entity.Property(e => e.AlertType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.AlertTypeName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.AlertLevelNavigation)
- .WithMany(p => p.ImAlertTypes)
- .HasForeignKey(d => d.AlertLevel)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AltType_Level");
- });
- modelBuilder.Entity<ImAnalogData2010>(entity =>
- {
- entity.HasKey(e => new { e.DeviceCtgy, e.DataCode })
- .HasName("PK_AnalogData_2010");
- entity.ToTable("im_AnalogData_2010");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Cof1).HasDefaultValueSql("((1))");
- entity.Property(e => e.Cof2).HasDefaultValueSql("((1))");
- entity.Property(e => e.DataName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.EnumStr)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.Precise1).HasDefaultValueSql("((2))");
- entity.Property(e => e.Precise2).HasDefaultValueSql("((2))");
- entity.Property(e => e.Sym1)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Sym2)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.DeviceCtgyNavigation)
- .WithMany(p => p.ImAnalogData2010s)
- .HasForeignKey(d => d.DeviceCtgy)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AnalogData2010_DevCtgy");
- });
- modelBuilder.Entity<ImAnalogData20102>(entity =>
- {
- entity.HasKey(e => new { e.PuctgyCode, e.DataCode })
- .HasName("PK_AnalogData_2010_2");
- entity.ToTable("im_AnalogData_2010_2");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.Cof1).HasDefaultValueSql("((1))");
- entity.Property(e => e.Cof2).HasDefaultValueSql("((1))");
- entity.Property(e => e.DataName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.EnumStr)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.Precise1).HasDefaultValueSql("((2))");
- entity.Property(e => e.Precise2).HasDefaultValueSql("((2))");
- entity.Property(e => e.Sym1)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Sym2)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImAnalogData20102s)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AnalogData2_PUCtgy");
- });
- modelBuilder.Entity<ImAsdu140FltActType>(entity =>
- {
- entity.HasKey(e => new { e.PuctgyCode, e.ActCode })
- .HasName("PK_ASDU140FltActType");
- entity.ToTable("im_ASDU140_FltActType");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.ActName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.CompanyName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.CompanyNameNavigation)
- .WithMany(p => p.ImAsdu140FltActTypes)
- .HasForeignKey(d => d.CompanyName)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ASDU140FltActType_Manu");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImAsdu140FltActTypes)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ASDU140FltActType");
- });
- modelBuilder.Entity<ImAsdu140FltCurrInfo>(entity =>
- {
- entity.HasKey(e => new { e.CompanyName, e.CurrIndCode })
- .HasName("PK_ASDU140FltCurr");
- entity.ToTable("im_ASDU140_FltCurrInfo");
- entity.Property(e => e.CompanyName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Coeff).HasDefaultValueSql("((1))");
- entity.Property(e => e.CurrName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Precise).HasDefaultValueSql("((2))");
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.CompanyNameNavigation)
- .WithMany(p => p.ImAsdu140FltCurrInfos)
- .HasForeignKey(d => d.CompanyName)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ASDU140FltCurr_Manu");
- });
- modelBuilder.Entity<ImAsdu142info>(entity =>
- {
- entity.HasKey(e => new { e.CompanyName, e.ValueType, e.ValueIndex })
- .HasName("PK_ASDU142Info");
- entity.ToTable("im_ASDU142Info");
- entity.Property(e => e.CompanyName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.ValueType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Coeff).HasDefaultValueSql("((1))");
- entity.Property(e => e.ParseFormat)
- .HasMaxLength(1000)
- .IsUnicode(false);
- entity.Property(e => e.ParseMode)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('一般数字')");
- entity.Property(e => e.Precise).HasDefaultValueSql("((2))");
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.ValueName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.CompanyNameNavigation)
- .WithMany(p => p.ImAsdu142infos)
- .HasForeignKey(d => d.CompanyName)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ASDU142Info_Manu");
- });
- modelBuilder.Entity<ImAutoReport>(entity =>
- {
- entity.HasKey(e => e.RptId)
- .HasName("PK_AutoReport");
- entity.ToTable("im_AutoReport");
- entity.HasIndex(e => e.RptName, "UK_AutoReport")
- .IsUnique();
- entity.Property(e => e.RptId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RptID");
- entity.Property(e => e.CreateTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.RptName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.RptType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.SavePath)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("State_")
- .HasDefaultValueSql("('在用')");
- entity.Property(e => e.TempFileObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("TempFileObjID");
- });
- modelBuilder.Entity<ImAutoReportItem>(entity =>
- {
- entity.HasKey(e => e.ItemId)
- .HasName("PK_AutoReportItem");
- entity.ToTable("im_AutoReportItem");
- entity.HasIndex(e => new { e.RptId, e.RowNo, e.ColNo }, "UK_AutoReportItem")
- .IsUnique();
- entity.Property(e => e.ItemId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ItemID");
- entity.Property(e => e.DataId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.Property(e => e.DataName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.ItemType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.RptId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RptID");
- entity.Property(e => e.ShowUnit)
- .HasMaxLength(5)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.Time1)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Time2)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.TimeCell)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Unit)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.HasOne(d => d.Rpt)
- .WithMany(p => p.ImAutoReportItems)
- .HasForeignKey(d => d.RptId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AutoReportItem_Report");
- });
- modelBuilder.Entity<ImBreakerNoEnum>(entity =>
- {
- entity.HasKey(e => new { e.PuctgyCode, e.EnumIndex })
- .HasName("PK_BreakerNoEnum");
- entity.ToTable("im_BreakerNoEnum");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.EnumName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImBreakerNoEnums)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BreakerNoEnum");
- });
- modelBuilder.Entity<ImCtrlWordDef>(entity =>
- {
- entity.HasKey(e => e.TypeId)
- .HasName("PK_CtrlWordDef");
- entity.ToTable("im_CtrlWordDef");
- entity.Property(e => e.TypeId).ValueGeneratedNever();
- entity.Property(e => e.Bit10Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit10_Meanings");
- entity.Property(e => e.Bit11Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit11_Meanings");
- entity.Property(e => e.Bit12Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit12_Meanings");
- entity.Property(e => e.Bit13Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit13_Meanings");
- entity.Property(e => e.Bit14Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit14_Meanings");
- entity.Property(e => e.Bit15Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit15_Meanings");
- entity.Property(e => e.Bit16Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit16_Meanings");
- entity.Property(e => e.Bit17Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit17_Meanings");
- entity.Property(e => e.Bit18Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit18_Meanings");
- entity.Property(e => e.Bit19Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit19_Meanings");
- entity.Property(e => e.Bit1Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit1_Meanings");
- entity.Property(e => e.Bit20Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit20_Meanings");
- entity.Property(e => e.Bit21Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit21_Meanings");
- entity.Property(e => e.Bit22Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit22_Meanings");
- entity.Property(e => e.Bit23Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit23_Meanings");
- entity.Property(e => e.Bit24Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit24_Meanings");
- entity.Property(e => e.Bit25Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit25_Meanings");
- entity.Property(e => e.Bit26Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit26_Meanings");
- entity.Property(e => e.Bit27Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit27_Meanings");
- entity.Property(e => e.Bit28Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit28_Meanings");
- entity.Property(e => e.Bit29Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit29_Meanings");
- entity.Property(e => e.Bit2Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit2_Meanings");
- entity.Property(e => e.Bit30Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit30_Meanings");
- entity.Property(e => e.Bit31Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit31_Meanings");
- entity.Property(e => e.Bit32Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit32_Meanings");
- entity.Property(e => e.Bit3Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit3_Meanings");
- entity.Property(e => e.Bit4Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit4_Meanings");
- entity.Property(e => e.Bit5Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit5_Meanings");
- entity.Property(e => e.Bit6Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit6_Meanings");
- entity.Property(e => e.Bit7Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit7_Meanings");
- entity.Property(e => e.Bit8Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit8_Meanings");
- entity.Property(e => e.Bit9Meanings)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Bit9_Meanings");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasDefaultValueSql("('交大运达电气')");
- entity.Property(e => e.TypeComment)
- .HasMaxLength(180)
- .IsUnicode(false)
- .HasColumnName("Type_Comment");
- entity.HasOne(d => d.ManufacturerNavigation)
- .WithMany(p => p.ImCtrlWordDefs)
- .HasForeignKey(d => d.Manufacturer)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_CtrlWordDef_Manu");
- });
- modelBuilder.Entity<ImCurve>(entity =>
- {
- entity.ToTable("im_Curve");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreTime).HasColumnType("datetime");
- entity.Property(e => e.CurveName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CurveType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Ymax).HasColumnName("YMax");
- entity.Property(e => e.Ymin).HasColumnName("YMin");
- entity.HasOne(d => d.CurveTypeNavigation)
- .WithMany(p => p.ImCurves)
- .HasForeignKey(d => d.CurveType)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Curve_Type");
- });
- modelBuilder.Entity<ImCurveItem>(entity =>
- {
- entity.HasKey(e => new { e.CurveId, e.DataId })
- .HasName("PK_CurveItem");
- entity.ToTable("im_CurveItem");
- entity.Property(e => e.CurveId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("CurveID");
- entity.Property(e => e.DataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.HasOne(d => d.Curve)
- .WithMany(p => p.ImCurveItems)
- .HasForeignKey(d => d.CurveId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_CurveItem_Curve");
- entity.HasOne(d => d.Data)
- .WithMany(p => p.ImCurveItems)
- .HasForeignKey(d => d.DataId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_CurveItem_DeviceData");
- });
- modelBuilder.Entity<ImCurveType>(entity =>
- {
- entity.HasKey(e => e.CveTypeCode)
- .HasName("pk_curve_type");
- entity.ToTable("im_Curve_Type");
- entity.Property(e => e.CveTypeCode)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.CveTypeName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImDataViewer>(entity =>
- {
- entity.ToTable("im_DataViewer");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.NameFontName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ValueFontName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDataViewer)
- .HasForeignKey<ImDataViewer>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DataViewer_Glyph");
- });
- modelBuilder.Entity<ImDataViewerDatum>(entity =>
- {
- entity.HasKey(e => new { e.DataViewerId, e.DataId })
- .HasName("PK_DataViewerData");
- entity.ToTable("im_DataViewer_Data");
- entity.Property(e => e.DataViewerId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DataViewerID");
- entity.Property(e => e.DataId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.HasOne(d => d.DataViewer)
- .WithMany(p => p.ImDataViewerData)
- .HasForeignKey(d => d.DataViewerId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DVD_DV");
- });
- modelBuilder.Entity<ImDevCtgy>(entity =>
- {
- entity.HasKey(e => e.DevCtgyCode)
- .HasName("pk_DevCtgy");
- entity.ToTable("im_DevCtgy");
- entity.Property(e => e.DevCtgyCode)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.DevCtgyName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImDeviceActRule>(entity =>
- {
- entity.HasKey(e => e.RuleId)
- .HasName("PK_DevActRule");
- entity.ToTable("im_DeviceActRule");
- entity.Property(e => e.RuleId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RuleID");
- entity.Property(e => e.ActParam)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ActType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.DataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.Property(e => e.LogicExpr)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.LogicValue)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.Data)
- .WithMany(p => p.ImDeviceActRules)
- .HasForeignKey(d => d.DataId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DevActRule_DeviceData");
- });
- modelBuilder.Entity<ImDeviceActRuleTmp>(entity =>
- {
- entity.HasKey(e => e.RuleId)
- .HasName("PK_DevActRule_Tmp");
- entity.ToTable("im_DeviceActRule_Tmp");
- entity.Property(e => e.RuleId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RuleID");
- entity.Property(e => e.ActParam)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ActType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.DataId)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.Property(e => e.LogicExpr)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.LogicValue)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.Data)
- .WithMany(p => p.ImDeviceActRuleTmps)
- .HasForeignKey(d => d.DataId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DevActRuleTmp_DeviceDataTmp");
- });
- modelBuilder.Entity<ImDeviceDataTmp>(entity =>
- {
- entity.ToTable("im_DeviceData_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CfgFileBz)
- .HasColumnName("CfgFile_BZ")
- .HasDefaultValueSql("((0))");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.Domain)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('综自')");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.SecAddr101).HasDefaultValueSql("((1))");
- entity.Property(e => e.ToScada)
- .HasColumnName("ToSCADA")
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.Visible).HasDefaultValueSql("((1))");
- entity.HasOne(d => d.Device)
- .WithMany(p => p.ImDeviceDataTmps)
- .HasForeignKey(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceDataTmp_DeviceTmp");
- });
- modelBuilder.Entity<ImDeviceDatum>(entity =>
- {
- entity.ToTable("im_DeviceData");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.Domain)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('综自')");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.SrcTempDataId)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("SrcTempDataID");
- entity.Property(e => e.Visible).HasDefaultValueSql("((1))");
- entity.HasOne(d => d.Device)
- .WithMany(p => p.ImDeviceData)
- .HasForeignKey(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceData_ProtDevice");
- });
- modelBuilder.Entity<ImDeviceDz>(entity =>
- {
- entity.ToTable("im_DeviceDZ");
- entity.Property(e => e.Id)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.CtrlWordTypeId).HasColumnName("CtrlWord_TypeId");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DzCoeff).HasColumnName("DZ_Coeff");
- entity.Property(e => e.DzCoeff1).HasColumnName("DZ_Coeff_1");
- entity.Property(e => e.DzComment)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Comment");
- entity.Property(e => e.DzIndex).HasColumnName("DZ_Index");
- entity.Property(e => e.DzMax).HasColumnName("DZ_Max");
- entity.Property(e => e.DzMin).HasColumnName("DZ_Min");
- entity.Property(e => e.DzName)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Name");
- entity.Property(e => e.DzPrecise).HasColumnName("DZ_Precise");
- entity.Property(e => e.DzPrecise1).HasColumnName("DZ_Precise_1");
- entity.Property(e => e.DzRange)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("DZ_Range");
- entity.Property(e => e.DzType).HasColumnName("DZ_Type");
- entity.Property(e => e.DzUnit)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit");
- entity.Property(e => e.DzUnit1)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit_1");
- entity.Property(e => e.DzUnitCvtCoeff).HasColumnName("DZ_UnitCvt_Coeff");
- entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
- entity.Property(e => e.Hidden)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.RelateCtId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("RelateCT_ID");
- entity.Property(e => e.RelatePtId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("RelatePT_ID");
- entity.HasOne(d => d.Device)
- .WithMany(p => p.ImDeviceDzs)
- .HasForeignKey(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceDZ_ProtDevice");
- entity.HasOne(d => d.DzTypeNavigation)
- .WithMany(p => p.ImDeviceDzs)
- .HasForeignKey(d => d.DzType)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceDZ_DZType");
- });
- modelBuilder.Entity<ImDeviceDzTmp>(entity =>
- {
- entity.ToTable("im_DeviceDZ_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.CtrlWordTypeId).HasColumnName("CtrlWord_TypeId");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DzCoeff).HasColumnName("DZ_Coeff");
- entity.Property(e => e.DzCoeff1).HasColumnName("DZ_Coeff_1");
- entity.Property(e => e.DzComment)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Comment");
- entity.Property(e => e.DzIndex).HasColumnName("DZ_Index");
- entity.Property(e => e.DzMax).HasColumnName("DZ_Max");
- entity.Property(e => e.DzMin).HasColumnName("DZ_Min");
- entity.Property(e => e.DzName)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Name");
- entity.Property(e => e.DzPrecise).HasColumnName("DZ_Precise");
- entity.Property(e => e.DzPrecise1).HasColumnName("DZ_Precise_1");
- entity.Property(e => e.DzRange)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("DZ_Range");
- entity.Property(e => e.DzType).HasColumnName("DZ_Type");
- entity.Property(e => e.DzUnit)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit");
- entity.Property(e => e.DzUnit1)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit_1");
- entity.Property(e => e.DzUnitCvtCoeff).HasColumnName("DZ_UnitCvt_Coeff");
- entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
- entity.Property(e => e.Hidden)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.RelateCtId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("RelateCT_ID");
- entity.Property(e => e.RelatePtId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("RelatePT_ID");
- entity.HasOne(d => d.Device)
- .WithMany(p => p.ImDeviceDzTmps)
- .HasForeignKey(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceDZTmp_ProtDeviceTmp");
- entity.HasOne(d => d.DzTypeNavigation)
- .WithMany(p => p.ImDeviceDzTmps)
- .HasForeignKey(d => d.DzType)
- .HasConstraintName("FK_DeviceDZTmp_DZType");
- });
- modelBuilder.Entity<ImDeviceDzenum>(entity =>
- {
- entity.HasKey(e => new { e.EnumTypeId, e.EnumIndex })
- .HasName("PK_DeviceDZEnum");
- entity.ToTable("im_DeviceDZEnum");
- entity.HasIndex(e => new { e.EnumTypeId, e.EnumComment }, "UK_DeviceDZEnum")
- .IsUnique();
- entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
- entity.Property(e => e.EnumIndex).HasColumnName("Enum_Index");
- entity.Property(e => e.EnumComment)
- .HasMaxLength(200)
- .IsUnicode(false)
- .HasColumnName("Enum_Comment");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasDefaultValueSql("('交大运达电气')");
- entity.HasOne(d => d.ManufacturerNavigation)
- .WithMany(p => p.ImDeviceDzenums)
- .HasForeignKey(d => d.Manufacturer)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceDZEnum_Manu");
- });
- modelBuilder.Entity<ImDeviceDzenum2>(entity =>
- {
- entity.HasKey(e => new { e.EnumTypeId, e.EnumByte, e.EnumIndex })
- .HasName("PK_DeviceDZEnum2");
- entity.ToTable("im_DeviceDZEnum2");
- entity.HasIndex(e => new { e.EnumTypeId, e.EnumByte, e.EnumComment }, "UK_DeviceDZEnum2")
- .IsUnique();
- entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
- entity.Property(e => e.EnumByte)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("Enum_Byte");
- entity.Property(e => e.EnumIndex).HasColumnName("Enum_Index");
- entity.Property(e => e.EnumComment)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("Enum_Comment");
- });
- modelBuilder.Entity<ImDeviceDzenumPu>(entity =>
- {
- entity.HasKey(e => new { e.PuctgyCode, e.EnumTypeId, e.EnumIndex })
- .HasName("PK_DeviceDZEnumPU");
- entity.ToTable("im_DeviceDZEnumPU");
- entity.HasIndex(e => new { e.PuctgyCode, e.EnumTypeId, e.EnumComment }, "UK_DeviceDZEnumPU")
- .IsUnique();
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
- entity.Property(e => e.EnumIndex).HasColumnName("Enum_Index");
- entity.Property(e => e.EnumComment)
- .HasMaxLength(200)
- .IsUnicode(false)
- .HasColumnName("Enum_Comment");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImDeviceDzenumPus)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceDZEnumPU_PUCtgy");
- });
- modelBuilder.Entity<ImDeviceVa>(entity =>
- {
- entity.ToTable("im_DeviceVA");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Expr)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Vaname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("VAName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceVa)
- .HasForeignKey<ImDeviceVa>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceVA_DeviceData");
- });
- modelBuilder.Entity<ImDeviceVaTmp>(entity =>
- {
- entity.ToTable("im_DeviceVA_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Expr)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Vaname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("VAName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceVaTmp)
- .HasForeignKey<ImDeviceVaTmp>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceVATmp_DeviceDataTmp");
- });
- modelBuilder.Entity<ImDeviceYc>(entity =>
- {
- entity.ToTable("im_DeviceYC");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Intl4Save).HasDefaultValueSql("((5))");
- entity.Property(e => e.Precise).HasDefaultValueSql("((2))");
- entity.Property(e => e.Precise2).HasDefaultValueSql("((2))");
- entity.Property(e => e.SaveMode)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('绝对值变化')");
- entity.Property(e => e.Unit)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Unit2)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YCName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYc)
- .HasForeignKey<ImDeviceYc>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYC_DeviceData");
- });
- modelBuilder.Entity<ImDeviceYcTmp>(entity =>
- {
- entity.ToTable("im_DeviceYC_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Intl4Save).HasDefaultValueSql("((5))");
- entity.Property(e => e.Precise).HasDefaultValueSql("((2))");
- entity.Property(e => e.Precise2).HasDefaultValueSql("((2))");
- entity.Property(e => e.SaveMode)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('绝对值变化')");
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Unit2)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YCName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYcTmp)
- .HasForeignKey<ImDeviceYcTmp>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYCTmp_DeviceDataTmp");
- });
- modelBuilder.Entity<ImDeviceYk>(entity =>
- {
- entity.ToTable("im_DeviceYK");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.IsResetCmd)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.LockMode)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('按遥信状态')");
- entity.Property(e => e.LockModeOff)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("LockMode_Off")
- .HasDefaultValueSql("('按遥信状态')");
- entity.Property(e => e.PreState4Yk).HasColumnName("PreState4YK");
- entity.Property(e => e.PreState4YkOff).HasColumnName("PreState4YK_Off");
- entity.Property(e => e.PreYxId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("PreYX_ID");
- entity.Property(e => e.PreYxIdOff)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("PreYX_ID_Off");
- entity.Property(e => e.RelatedYxId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("RelatedYX_ID");
- entity.Property(e => e.SwOffStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwOnStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwUncertStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YkType)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("YK_Type");
- entity.Property(e => e.Ykname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YKName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYk)
- .HasForeignKey<ImDeviceYk>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYK_DeviceData");
- });
- modelBuilder.Entity<ImDeviceYkTmp>(entity =>
- {
- entity.ToTable("im_DeviceYK_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.IsResetCmd)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.LockMode)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('按遥信状态')");
- entity.Property(e => e.LockModeOff)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("LockMode_Off")
- .HasDefaultValueSql("('按遥信状态')");
- entity.Property(e => e.PreState4Yk).HasColumnName("PreState4YK");
- entity.Property(e => e.PreState4YkOff).HasColumnName("PreState4YK_Off");
- entity.Property(e => e.PreYxId)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("PreYX_ID");
- entity.Property(e => e.PreYxIdOff)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("PreYX_ID_Off");
- entity.Property(e => e.RelatedYxId)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("RelatedYX_ID");
- entity.Property(e => e.SwOffStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwOnStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwUncertStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YkType)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("YK_Type");
- entity.Property(e => e.Ykname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YKName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYkTmp)
- .HasForeignKey<ImDeviceYkTmp>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYKTmp_DeviceDataTmp");
- });
- modelBuilder.Entity<ImDeviceYm>(entity =>
- {
- entity.ToTable("im_DeviceYM");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Ymname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YMName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYm)
- .HasForeignKey<ImDeviceYm>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYM_DeviceData");
- });
- modelBuilder.Entity<ImDeviceYmTmp>(entity =>
- {
- entity.ToTable("im_DeviceYM_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Ymname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YMName");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYmTmp)
- .HasForeignKey<ImDeviceYmTmp>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYMTmp_DeviceDataTmp");
- });
- modelBuilder.Entity<ImDeviceYx>(entity =>
- {
- entity.ToTable("im_DeviceYX");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.NormalState)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('忽略')");
- entity.Property(e => e.SwOffStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwOnStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwUncertStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YxType)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("YX_Type");
- entity.Property(e => e.Yxname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YXName");
- entity.HasOne(d => d.AlertLevelNavigation)
- .WithMany(p => p.ImDeviceYxes)
- .HasForeignKey(d => d.AlertLevel)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYX_Level");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYx)
- .HasForeignKey<ImDeviceYx>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYX_DeviceData");
- });
- modelBuilder.Entity<ImDeviceYxSrcDevice>(entity =>
- {
- entity.ToTable("im_DeviceYX_SrcDevice");
- entity.HasIndex(e => new { e.YxdataId, e.SrcDevId }, "UK_DeviceYXSrcDevice")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.SrcDevId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("SrcDevID");
- entity.Property(e => e.YxdataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("YXDataID");
- });
- modelBuilder.Entity<ImDeviceYxTmp>(entity =>
- {
- entity.ToTable("im_DeviceYX_Tmp");
- entity.Property(e => e.Id)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.NormalState)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('忽略')");
- entity.Property(e => e.SwOffStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwOnStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwUncertStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YxType)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("YX_Type");
- entity.Property(e => e.Yxname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YXName");
- entity.HasOne(d => d.AlertLevelNavigation)
- .WithMany(p => p.ImDeviceYxTmps)
- .HasForeignKey(d => d.AlertLevel)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYXTmp_Level");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDeviceYxTmp)
- .HasForeignKey<ImDeviceYxTmp>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DeviceYXTmp_DeviceDataTmp");
- });
- modelBuilder.Entity<ImDiagram>(entity =>
- {
- entity.ToTable("im_Diagram");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.Creator)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.PrjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PrjID");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImDiagram)
- .HasForeignKey<ImDiagram>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_imDiagram_Glyph");
- entity.HasOne(d => d.Prj)
- .WithMany(p => p.ImDiagrams)
- .HasForeignKey(d => d.PrjId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_imDiagram_Project");
- });
- modelBuilder.Entity<ImDztype>(entity =>
- {
- entity.HasKey(e => e.DztypeId)
- .HasName("PK_DZType");
- entity.ToTable("im_DZType");
- entity.Property(e => e.DztypeId)
- .ValueGeneratedNever()
- .HasColumnName("DZTypeID");
- entity.Property(e => e.Dztype)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("DZType");
- });
- modelBuilder.Entity<ImEventFlag>(entity =>
- {
- entity.HasKey(e => new { e.DeviceCtgy, e.EvtFlagCode })
- .HasName("PK_EventFlag");
- entity.ToTable("im_EventFlag");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Param1Mean)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Param1Sym)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Param1ValueType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Param2Mean)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Param2Sym)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Param2ValueType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Param3Mean)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Param3Sym)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Param3ValueType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.DeviceCtgyNavigation)
- .WithMany(p => p.ImEventFlags)
- .HasForeignKey(d => d.DeviceCtgy)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_EvengFlag_DevCtgy");
- });
- modelBuilder.Entity<ImEventParam>(entity =>
- {
- entity.HasKey(e => new { e.DeviceCtgy, e.ParamValue })
- .HasName("PK_EventParam");
- entity.ToTable("im_EventParam");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.ParamDesc)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.HasOne(d => d.DeviceCtgyNavigation)
- .WithMany(p => p.ImEventParams)
- .HasForeignKey(d => d.DeviceCtgy)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_EventParam_DevCtgy");
- });
- modelBuilder.Entity<ImEventType>(entity =>
- {
- entity.HasKey(e => new { e.EvtCode, e.PuctgyCode })
- .HasName("PK_EventType");
- entity.ToTable("im_EventType");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('级别1')");
- entity.Property(e => e.EvtName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.IsYiCiSb)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasColumnName("IsYiCiSB")
- .HasDefaultValueSql("('否')");
- entity.HasOne(d => d.AlertLevelNavigation)
- .WithMany(p => p.ImEventTypes)
- .HasForeignKey(d => d.AlertLevel)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_EventType_Level");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImEventTypes)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_EventType_PUCtgy");
- });
- modelBuilder.Entity<ImEventType2010>(entity =>
- {
- entity.HasKey(e => new { e.DeviceCtgy, e.EvtCode })
- .HasName("PK_EventType_2010");
- entity.ToTable("im_EventType_2010");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('级别1')");
- entity.Property(e => e.EvtName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.HasOne(d => d.AlertLevelNavigation)
- .WithMany(p => p.ImEventType2010s)
- .HasForeignKey(d => d.AlertLevel)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_EventType2010_Level");
- entity.HasOne(d => d.DeviceCtgyNavigation)
- .WithMany(p => p.ImEventType2010s)
- .HasForeignKey(d => d.DeviceCtgy)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_EventType2010_DevCtgy");
- });
- modelBuilder.Entity<ImEventType2010DeviceYktmp>(entity =>
- {
- entity.HasKey(e => e.RecId)
- .HasName("PK_EventType2010_DeviceYKTmp");
- entity.ToTable("im_EventType2010_DeviceYKTmp");
- entity.HasIndex(e => new { e.DeviceCtgy, e.EvtCode, e.YktmpId }, "UK_EventType2010_DeviceYKTmp")
- .IsUnique();
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.YktmpId)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("YKTmp_ID");
- });
- modelBuilder.Entity<ImFaultActType>(entity =>
- {
- entity.HasKey(e => new { e.ActCode, e.FaultCode })
- .HasName("PK_FaultActType");
- entity.ToTable("im_FaultActType");
- entity.Property(e => e.ActName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.FaultCodeNavigation)
- .WithMany(p => p.ImFaultActTypes)
- .HasForeignKey(d => d.FaultCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FaultActType_FaultType");
- });
- modelBuilder.Entity<ImFaultActType2010>(entity =>
- {
- entity.HasKey(e => new { e.FltTypeId, e.ActCode })
- .HasName("PK_FaultActType2010");
- entity.ToTable("im_FaultActType_2010");
- entity.Property(e => e.FltTypeId)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("FltTypeID");
- entity.Property(e => e.ActName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.FltType)
- .WithMany(p => p.ImFaultActType2010s)
- .HasForeignKey(d => d.FltTypeId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FaultActType_FaultType2010");
- });
- modelBuilder.Entity<ImFaultActType20102>(entity =>
- {
- entity.HasKey(e => new { e.PuctgyCode, e.ActCode })
- .HasName("PK_FaultActType2010_2");
- entity.ToTable("im_FaultActType_2010_2");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.ActName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImFaultActType20102s)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FaultActType2010_2_PUCtgy");
- });
- modelBuilder.Entity<ImFaultActTypePd>(entity =>
- {
- entity.HasKey(e => new { e.ActCode, e.FaultCode })
- .HasName("PK_FaultActTypePD");
- entity.ToTable("im_FaultActType_PD");
- entity.Property(e => e.ActName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.FaultCodeNavigation)
- .WithMany(p => p.ImFaultActTypePds)
- .HasForeignKey(d => d.FaultCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FaultActTypePD_FaultTypePD");
- });
- modelBuilder.Entity<ImFaultParam>(entity =>
- {
- entity.HasKey(e => e.ParamCode)
- .HasName("PK_FaultParam");
- entity.ToTable("im_FaultParam");
- entity.Property(e => e.ParamCode).ValueGeneratedNever();
- entity.Property(e => e.ParamName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.ParamSym1)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.ParamSym2)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImFaultParamPd>(entity =>
- {
- entity.HasKey(e => new { e.ParamCode, e.FaultCode })
- .HasName("PK_FaultParam_PD");
- entity.ToTable("im_FaultParam_PD");
- entity.Property(e => e.ParamName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.ParamSym1)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.ParamSym2)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.FaultCodeNavigation)
- .WithMany(p => p.ImFaultParamPds)
- .HasForeignKey(d => d.FaultCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FaultParamPD_FaultTypePD");
- });
- modelBuilder.Entity<ImFaultReportItem>(entity =>
- {
- entity.HasKey(e => e.ItemName)
- .HasName("PK_FaultReportItem");
- entity.ToTable("im_FaultReportItem");
- entity.Property(e => e.ItemName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImFaultType>(entity =>
- {
- entity.HasKey(e => e.FaultCode)
- .HasName("PK_FaultType");
- entity.ToTable("im_FaultType");
- entity.Property(e => e.FaultCode).ValueGeneratedNever();
- entity.Property(e => e.FaultName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImFaultType2010>(entity =>
- {
- entity.ToTable("im_FaultType_2010");
- entity.HasIndex(e => new { e.DeviceCtgy, e.FaultCode }, "UK_FaultType_2010_1")
- .IsUnique();
- entity.HasIndex(e => new { e.DeviceCtgy, e.FaultName }, "UK_FaultType_2010_2")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.FaultName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.DeviceCtgyNavigation)
- .WithMany(p => p.ImFaultType2010s)
- .HasForeignKey(d => d.DeviceCtgy)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FaultType_2010_DevCtgy");
- });
- modelBuilder.Entity<ImFaultTypePd>(entity =>
- {
- entity.HasKey(e => e.FaultCode)
- .HasName("PK_FaultType_PD");
- entity.ToTable("im_FaultType_PD");
- entity.Property(e => e.FaultCode).ValueGeneratedNever();
- entity.Property(e => e.FaultName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImFltDistDevGrp>(entity =>
- {
- entity.ToTable("im_FltDistDevGrp");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.GrpName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PrjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PrjID");
- entity.HasOne(d => d.Prj)
- .WithMany(p => p.ImFltDistDevGrps)
- .HasForeignKey(d => d.PrjId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FltDistDevGrp_Project");
- });
- modelBuilder.Entity<ImFltDistDevice>(entity =>
- {
- entity.HasKey(e => e.DeviceId)
- .HasName("PK_FltDistDev");
- entity.ToTable("im_FltDistDevice");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.GrpId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("GrpID");
- entity.Property(e => e.TypeInGrp)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('测距装置')");
- entity.HasOne(d => d.Device)
- .WithOne(p => p.ImFltDistDevice)
- .HasForeignKey<ImFltDistDevice>(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FltDistDev_ProtDevice");
- entity.HasOne(d => d.Grp)
- .WithMany(p => p.ImFltDistDevices)
- .HasForeignKey(d => d.GrpId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FltDistDev_DevGroup");
- });
- modelBuilder.Entity<ImFltDistParam>(entity =>
- {
- entity.ToTable("im_FltDistParam");
- entity.HasIndex(e => new { e.GrpId, e.ParamType, e.SectionNo, e.NodeNo }, "UK_FltDistParam")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.GrpId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("GrpID");
- entity.Property(e => e.ParamType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.Grp)
- .WithMany(p => p.ImFltDistParams)
- .HasForeignKey(d => d.GrpId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FltDistParam_DevGroup");
- });
- modelBuilder.Entity<ImFxcurrAbnormalSet>(entity =>
- {
- entity.HasKey(e => new { e.YcdataId1, e.YcdataId2 })
- .HasName("PK_FXCurrAbnormal_Set");
- entity.ToTable("im_FXCurrAbnormal_Set");
- entity.Property(e => e.YcdataId1)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("YCDataID1");
- entity.Property(e => e.YcdataId2)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("YCDataID2");
- entity.Property(e => e.DeltaTofYc).HasColumnName("DeltaTOfYC");
- });
- modelBuilder.Entity<ImGateWay>(entity =>
- {
- entity.HasKey(e => e.GateWayId)
- .HasName("PK_GateWay");
- entity.ToTable("im_GateWay");
- entity.HasIndex(e => new { e.PhyAddr, e.StatCode }, "UK_GateWay")
- .IsUnique();
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.GateWayName)
- .HasMaxLength(200)
- .IsUnicode(false);
- entity.Property(e => e.GatewayIp1)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("GatewayIP1");
- entity.Property(e => e.GatewayIp2)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("GatewayIP2");
- entity.Property(e => e.Protocol)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.ImGateWays)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_GateWay_Station");
- });
- modelBuilder.Entity<ImGlyph>(entity =>
- {
- entity.ToTable("im_Glyph");
- entity.HasIndex(e => e.DiagId, "IX_imGlyph_DiagID");
- entity.HasIndex(e => e.ParentId, "IX_imGlyph_ParentID");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.DiagId)
- .HasMaxLength(38)
- .IsUnicode(false);
- entity.Property(e => e.LinkDiagId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("LinkDiagID");
- entity.Property(e => e.Locked).HasDefaultValueSql("((0))");
- entity.Property(e => e.Name)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ParentId)
- .HasMaxLength(38)
- .IsUnicode(false);
- entity.Property(e => e.PwrOnThreshold).HasDefaultValueSql("((0))");
- entity.Property(e => e.Reserved1).IsUnicode(false);
- entity.Property(e => e.Reserved2).IsUnicode(false);
- entity.Property(e => e.ZOrder).HasColumnName("Z_order");
- });
- modelBuilder.Entity<ImGlyphDefProp>(entity =>
- {
- entity.HasKey(e => e.GlyphType)
- .HasName("PK_imGlyphDefProp");
- entity.ToTable("im_GlyphDefProp");
- entity.Property(e => e.GlyphType).ValueGeneratedNever();
- entity.Property(e => e.GlyphName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImGlyphDevDatum>(entity =>
- {
- entity.HasKey(e => e.GlyphId)
- .HasName("PK_GlyphDevData");
- entity.ToTable("im_GlyphDevData");
- entity.Property(e => e.GlyphId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("GlyphID");
- entity.Property(e => e.ControlDataId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("ControlDataID");
- entity.Property(e => e.ControlDataName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.MeasureDataId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("MeasureDataID");
- entity.Property(e => e.MeasureDataName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.HasOne(d => d.Glyph)
- .WithOne(p => p.ImGlyphDevDatum)
- .HasForeignKey<ImGlyphDevDatum>(d => d.GlyphId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_GlyphDevData_Glyph");
- });
- modelBuilder.Entity<ImGlyphHot>(entity =>
- {
- entity.HasKey(e => new { e.GlyphId, e.HotIndex })
- .HasName("PK_imGlyphHots");
- entity.ToTable("im_GlyphHots");
- entity.Property(e => e.GlyphId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("GlyphID");
- entity.Property(e => e.ConnectedGlyph)
- .HasMaxLength(38)
- .IsUnicode(false);
- entity.HasOne(d => d.Glyph)
- .WithMany(p => p.ImGlyphHots)
- .HasForeignKey(d => d.GlyphId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_imGlyphHots_Glyph");
- });
- modelBuilder.Entity<ImGrid>(entity =>
- {
- entity.ToTable("im_Grid");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImGrid)
- .HasForeignKey<ImGrid>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_imGrid_Glyph");
- });
- modelBuilder.Entity<ImLabel>(entity =>
- {
- entity.ToTable("im_Label");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Caption)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.FBold).HasColumnName("F_Bold");
- entity.Property(e => e.FCharSet).HasColumnName("F_CharSet");
- entity.Property(e => e.FColor).HasColumnName("F_Color");
- entity.Property(e => e.FItalic).HasColumnName("F_Italic");
- entity.Property(e => e.FName)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("F_Name");
- entity.Property(e => e.FSize).HasColumnName("F_Size");
- entity.Property(e => e.FStrikeout).HasColumnName("F_Strikeout");
- entity.Property(e => e.FUnderLine).HasColumnName("F_UnderLine");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.ImLabel)
- .HasForeignKey<ImLabel>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_imLabel_Glyph");
- });
- modelBuilder.Entity<ImLinkage>(entity =>
- {
- entity.HasKey(e => e.LnkId)
- .HasName("PK_Linkage");
- entity.ToTable("im_Linkage");
- entity.HasIndex(e => new { e.SrcObjId, e.LnkType }, "UK_Linkage")
- .IsUnique();
- entity.Property(e => e.LnkId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("LnkID");
- entity.Property(e => e.ActParam)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Action)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.LnkType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Resource)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.SrcObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SrcObjID");
- entity.Property(e => e.SrcObjType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasDefaultValueSql("('在用')");
- });
- modelBuilder.Entity<ImManufacturer>(entity =>
- {
- entity.HasKey(e => e.ManuCode)
- .HasName("PK_Manufacturer");
- entity.ToTable("im_Manufacturer");
- entity.Property(e => e.ManuCode)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.ManuName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImNoticeBoard>(entity =>
- {
- entity.HasKey(e => e.NbId)
- .HasName("PK_NoticeBoard");
- entity.ToTable("im_NoticeBoard");
- entity.HasIndex(e => e.YkId, "UK_NoticeBoard_YK")
- .IsUnique();
- entity.Property(e => e.NbId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("NB_ID");
- entity.Property(e => e.Description)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ExecuteTime).HasColumnType("datetime");
- entity.Property(e => e.OperUserName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.OperWholeName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.YkId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("YK_ID");
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.ImNoticeBoards)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_NB_Station");
- entity.HasOne(d => d.Yk)
- .WithOne(p => p.ImNoticeBoard)
- .HasForeignKey<ImNoticeBoard>(d => d.YkId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_NB_DeviceYK");
- });
- modelBuilder.Entity<ImNotifyTask>(entity =>
- {
- entity.HasKey(e => e.TaskId);
- entity.ToTable("im_NotifyTask");
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.Property(e => e.AlertType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.TaskDesc)
- .HasMaxLength(1000)
- .IsUnicode(false);
- entity.HasOne(d => d.Task)
- .WithOne(p => p.ImNotifyTask)
- .HasForeignKey<ImNotifyTask>(d => d.TaskId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_IMNotify_DFrameNotify");
- });
- modelBuilder.Entity<ImNotifyTaskAlertObj>(entity =>
- {
- entity.ToTable("im_NotifyTaskAlertObj");
- entity.Property(e => e.Id)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.AlertObjId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("AlertObjID");
- entity.Property(e => e.AlertObjName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.HasOne(d => d.Task)
- .WithMany(p => p.ImNotifyTaskAlertObjs)
- .HasForeignKey(d => d.TaskId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AlertObj_Notify");
- });
- modelBuilder.Entity<ImNotifyTaskPhone>(entity =>
- {
- entity.ToTable("im_NotifyTaskPhone");
- entity.Property(e => e.Id)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.FullName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.PhoneNo)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.HasOne(d => d.Task)
- .WithMany(p => p.ImNotifyTaskPhones)
- .HasForeignKey(d => d.TaskId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Phone_Notify");
- });
- modelBuilder.Entity<ImNotifyTaskTemplate>(entity =>
- {
- entity.HasKey(e => e.AlertType)
- .HasName("PK_NotifyTaskTemplate");
- entity.ToTable("im_NotifyTaskTemplate");
- entity.Property(e => e.AlertType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.BusiTabName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PkfldName)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("PKFldName");
- entity.Property(e => e.Sql4msg)
- .HasMaxLength(1000)
- .IsUnicode(false)
- .HasColumnName("SQL4Msg");
- entity.Property(e => e.Sql4notify)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4Notify");
- entity.Property(e => e.Sql4phoneNo)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4PhoneNo");
- });
- modelBuilder.Entity<ImOnlineAnalysis>(entity =>
- {
- entity.ToTable("im_OnlineAnalysis");
- entity.HasIndex(e => new { e.Method, e.DataIdofC2h2, e.DataIdofC2h4, e.DataIdofC2h6, e.DataIdofCh4, e.DataIdofH2 }, "UK_OnlineAnalysis")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.DataIdofC2h2)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofC2H2");
- entity.Property(e => e.DataIdofC2h4)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofC2H4");
- entity.Property(e => e.DataIdofC2h6)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofC2H6");
- entity.Property(e => e.DataIdofCh4)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofCH4");
- entity.Property(e => e.DataIdofH2)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofH2");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.IsAlert)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.Method)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasDefaultValueSql("('在用')");
- entity.HasOne(d => d.Device)
- .WithMany(p => p.ImOnlineAnalyses)
- .HasForeignKey(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_OnlineAnalysis_Device");
- });
- modelBuilder.Entity<ImProgControl>(entity =>
- {
- entity.ToTable("im_ProgControl");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.PrjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PrjID");
- entity.Property(e => e.ProgCtlName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.HasOne(d => d.Prj)
- .WithMany(p => p.ImProgControls)
- .HasForeignKey(d => d.PrjId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ProgControl_Project");
- });
- modelBuilder.Entity<ImProgControlItem>(entity =>
- {
- entity.ToTable("im_ProgControlItem");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.ProgCtlId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ProgCtlID");
- entity.Property(e => e.WaitYxtimeout).HasColumnName("WaitYXTimeout");
- entity.Property(e => e.YkdataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("YKDataID");
- entity.Property(e => e.Ykstate).HasColumnName("YKState");
- entity.HasOne(d => d.ProgCtl)
- .WithMany(p => p.ImProgControlItems)
- .HasForeignKey(d => d.ProgCtlId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PCItem_ProgControl");
- entity.HasOne(d => d.Ykdata)
- .WithMany(p => p.ImProgControlItems)
- .HasForeignKey(d => d.YkdataId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PCItem_DeviceYK");
- });
- modelBuilder.Entity<ImProject>(entity =>
- {
- entity.ToTable("im_Project");
- entity.HasIndex(e => e.Name, "IX_Project_Name")
- .IsUnique();
- entity.HasIndex(e => e.Name, "UK_Project")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.Creator)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Name)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ProtCommMgrIp)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasColumnName("ProtCommMgrIP");
- });
- modelBuilder.Entity<ImProtectDevice>(entity =>
- {
- entity.HasKey(e => e.DeviceId)
- .HasName("PK_ProtDevice");
- entity.ToTable("im_ProtectDevice");
- entity.HasIndex(e => new { e.DeviceAddr, e.GateWayId }, "UK_ProtDevice")
- .IsUnique();
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.BayName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.CanSwDzzone).HasColumnName("CanSwDZZone");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DeviceType)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasDefaultValueSql("('综自设备')");
- entity.Property(e => e.EndOfDkjl).HasColumnName("EndOfDKJL");
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.StartOfDkjl).HasColumnName("StartOfDKJL");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.Support12yc).HasColumnName("Support1_2YC");
- entity.Property(e => e.SupportDkjl).HasColumnName("SupportDKJL");
- entity.HasOne(d => d.GateWay)
- .WithMany(p => p.ImProtectDevices)
- .HasForeignKey(d => d.GateWayId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ProtDevice_GateWay");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImProtectDevices)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ProtDevice_PUCtgy");
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.ImProtectDevices)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ProtDevice_Station");
- });
- modelBuilder.Entity<ImProtectDeviceTmp>(entity =>
- {
- entity.ToTable("im_ProtectDevice_Tmp");
- entity.HasIndex(e => e.PuctgyCode, "UK_ProtDevice_Tmp")
- .IsUnique();
- entity.HasIndex(e => e.DeviceName, "UK_ProtDevice_Tmp_Name")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithOne(p => p.ImProtectDeviceTmp)
- .HasForeignKey<ImProtectDeviceTmp>(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ProtDeviceTmp_PUCtgy");
- });
- modelBuilder.Entity<ImPuCtgy>(entity =>
- {
- entity.HasKey(e => e.PuctgyCode)
- .HasName("PK_PU_ctgy");
- entity.ToTable("im_PU_Ctgy");
- entity.HasIndex(e => e.PuctgyName, "UK_PU_Ctgy_Name")
- .IsUnique();
- entity.Property(e => e.PuctgyCode)
- .ValueGeneratedNever()
- .HasColumnName("PUCtgyCode");
- entity.Property(e => e.AnalogParseMode)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('按装置大类')");
- entity.Property(e => e.CanSwDzzone).HasColumnName("CanSwDZZone");
- entity.Property(e => e.DevCtgy)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('牵引')");
- entity.Property(e => e.DzreadOnly).HasColumnName("DZReadOnly");
- entity.Property(e => e.DzzoneCount)
- .HasColumnName("DZZoneCount")
- .HasDefaultValueSql("((4))");
- entity.Property(e => e.EndOfDkjl).HasColumnName("EndOfDKJL");
- entity.Property(e => e.EventParseMode)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('按装置大类')");
- entity.Property(e => e.Generation)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.IsCrcc)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasColumnName("IsCRCC")
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PuctgyName)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("PUCtgyName");
- entity.Property(e => e.StartOfDkjl).HasColumnName("StartOfDKJL");
- entity.Property(e => e.Support12yc).HasColumnName("Support1_2YC");
- entity.Property(e => e.SupportDkjl).HasColumnName("SupportDKJL");
- entity.Property(e => e.SupportDz)
- .HasColumnName("SupportDZ")
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.SupportFhluBo).HasColumnName("SupportFHLuBo");
- entity.Property(e => e.SupportGuZhangBg)
- .HasColumnName("SupportGuZhangBG")
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.SupportLuBoWj)
- .HasColumnName("SupportLuBoWJ")
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.SupportShiJianBg)
- .HasColumnName("SupportShiJianBG")
- .HasDefaultValueSql("((1))");
- entity.Property(e => e.SupportZiJianBg)
- .HasColumnName("SupportZiJianBG")
- .HasDefaultValueSql("((1))");
- entity.HasOne(d => d.DevCtgyNavigation)
- .WithMany(p => p.ImPuCtgies)
- .HasForeignKey(d => d.DevCtgy)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PUCtgy_DevCtgy");
- entity.HasOne(d => d.ManufacturerNavigation)
- .WithMany(p => p.ImPuCtgies)
- .HasForeignKey(d => d.Manufacturer)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PUCtgy_Manu");
- });
- modelBuilder.Entity<ImPuUpdateLog>(entity =>
- {
- entity.ToTable("im_PU_UpdateLog");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreateTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.Editor)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.UpdDate)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.UpdDesc).IsUnicode(false);
- });
- modelBuilder.Entity<ImPuWaveChl>(entity =>
- {
- entity.ToTable("im_PU_WaveChl");
- entity.HasIndex(e => new { e.PuctgyCode, e.ChlType, e.ChlNum }, "UK_im_PU_WaveChl")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.ChlName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ChlType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.ChlUnit1)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.ChlUnit2)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImPuWaveChls)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PUWaveChl_PUCtgy");
- });
- modelBuilder.Entity<ImPuctgyFaultType>(entity =>
- {
- entity.ToTable("im_PUCtgy_FaultType");
- entity.HasIndex(e => new { e.PuctgyCode, e.FaultTypeId }, "UK_PUCtgy_FaultType")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.FaultTypeId)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("FaultTypeID");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- });
- modelBuilder.Entity<ImPuctgyFltRptItem>(entity =>
- {
- entity.HasKey(e => new { e.PuctgyCode, e.ItemName })
- .HasName("PK_PUCtgy_FltRptItem");
- entity.ToTable("im_PUCtgy_FltRptItem");
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.ItemName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.ShowLabel)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.ItemNameNavigation)
- .WithMany(p => p.ImPuctgyFltRptItems)
- .HasForeignKey(d => d.ItemName)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PUCtgy_FltRptItem2");
- entity.HasOne(d => d.PuctgyCodeNavigation)
- .WithMany(p => p.ImPuctgyFltRptItems)
- .HasForeignKey(d => d.PuctgyCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_PUCtgy_FltRptItem1");
- });
- modelBuilder.Entity<ImReportCfg>(entity =>
- {
- entity.ToTable("im_ReportCfg");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.ExpStartCol).HasDefaultValueSql("((-1))");
- entity.Property(e => e.ExpStartRow).HasDefaultValueSql("((-1))");
- entity.Property(e => e.RptName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.RptType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.TemplateName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.HasOne(d => d.RptTypeNavigation)
- .WithMany(p => p.ImReportCfgs)
- .HasForeignKey(d => d.RptType)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ReportCfg_RptType");
- });
- modelBuilder.Entity<ImReportCfgDatum>(entity =>
- {
- entity.ToTable("im_ReportCfgData");
- entity.HasIndex(e => new { e.RptCfgId, e.DataId }, "UK_ReportCfgData")
- .IsUnique();
- entity.Property(e => e.Id).HasColumnName("ID");
- entity.Property(e => e.DataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.Property(e => e.Reserved).IsUnicode(false);
- entity.Property(e => e.RptCfgId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RptCfgID");
- entity.Property(e => e.ShowIntl).HasDefaultValueSql("((0))");
- entity.Property(e => e.Title)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.HasOne(d => d.Data)
- .WithMany(p => p.ImReportCfgData)
- .HasForeignKey(d => d.DataId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ReportCfgData_DeviceData");
- entity.HasOne(d => d.RptCfg)
- .WithMany(p => p.ImReportCfgData)
- .HasForeignKey(d => d.RptCfgId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ReportCfgData_ReportCfg");
- });
- modelBuilder.Entity<ImReportType>(entity =>
- {
- entity.HasKey(e => e.RptTypeCode)
- .HasName("pk_report_type");
- entity.ToTable("im_Report_Type");
- entity.Property(e => e.RptTypeCode)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.RptTypeName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImSanBiZhiFaultDefine>(entity =>
- {
- entity.ToTable("im_SanBiZhi_FaultDefine");
- entity.HasIndex(e => new { e.C2h2C2h4, e.Ch4H2, e.C2h4C2h6 }, "UK_FltDefine")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.C2h2C2h4).HasColumnName("C2H2_C2H4");
- entity.Property(e => e.C2h4C2h6).HasColumnName("C2H4_C2H6");
- entity.Property(e => e.Ch4H2).HasColumnName("CH4_H2");
- entity.HasOne(d => d.FltTypeCodeNavigation)
- .WithMany(p => p.ImSanBiZhiFaultDefines)
- .HasForeignKey(d => d.FltTypeCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_FltDefine_FltType");
- });
- modelBuilder.Entity<ImSanBiZhiFaultType>(entity =>
- {
- entity.HasKey(e => e.FltTypeCode)
- .HasName("PK_SanBiZhi_FaultType");
- entity.ToTable("im_SanBiZhi_FaultType");
- entity.Property(e => e.FltTypeCode).ValueGeneratedNever();
- entity.Property(e => e.FltTypeExam).IsUnicode(false);
- entity.Property(e => e.FltTypeName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImSheBei>(entity =>
- {
- entity.HasKey(e => e.SheBeiId)
- .HasName("PK_BianDianSB");
- entity.ToTable("im_SheBei");
- entity.HasIndex(e => e.YunXingBh, "UK_BianDianSB")
- .IsUnique();
- entity.Property(e => e.SheBeiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("SheBeiID");
- entity.Property(e => e.AnZhuangRq)
- .HasColumnType("datetime")
- .HasColumnName("AnZhuangRQ");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(1000)
- .IsUnicode(false);
- entity.Property(e => e.ChuChangRq)
- .HasColumnType("datetime")
- .HasColumnName("ChuChangRQ");
- entity.Property(e => e.DaXiuZhouQi)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.GuZiBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("GuZiBH");
- entity.Property(e => e.Sblxbm).HasColumnName("SBLXBM");
- entity.Property(e => e.SheBeiBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SheBeiBH");
- entity.Property(e => e.SheBeiXh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SheBeiXH");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.TouYunRq)
- .HasColumnType("datetime")
- .HasColumnName("TouYunRQ");
- entity.Property(e => e.XiaoXiuZhouQi)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.YunXingBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("YunXingBH");
- entity.Property(e => e.ZhiZaoChang)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ZhongXiuZhouQi)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.HasOne(d => d.SblxbmNavigation)
- .WithMany(p => p.ImSheBeis)
- .HasForeignKey(d => d.Sblxbm)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BianDianSB_SBLX");
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.ImSheBeis)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BianDianSB_Station");
- });
- modelBuilder.Entity<ImSheBeiDeviceDatum>(entity =>
- {
- entity.HasKey(e => e.RecId)
- .HasName("PK_SheBeiDeviceData");
- entity.ToTable("im_SheBei_DeviceData");
- entity.HasIndex(e => e.DataId, "UK_SheBeiDeviceData")
- .IsUnique();
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.DataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.Property(e => e.SheBeiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("SheBeiID");
- entity.HasOne(d => d.Data)
- .WithOne(p => p.ImSheBeiDeviceDatum)
- .HasForeignKey<ImSheBeiDeviceDatum>(d => d.DataId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_SBDevData_DevData");
- entity.HasOne(d => d.SheBei)
- .WithMany(p => p.ImSheBeiDeviceData)
- .HasForeignKey(d => d.SheBeiId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_SBDevData_SheBei");
- });
- modelBuilder.Entity<ImSheBeiLx>(entity =>
- {
- entity.HasKey(e => e.Sblxbm)
- .HasName("PK_SheBeiLX");
- entity.ToTable("im_SheBeiLX");
- entity.Property(e => e.Sblxbm)
- .ValueGeneratedNever()
- .HasColumnName("SBLXBM");
- entity.Property(e => e.Sblxmc)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SBLXMC");
- entity.Property(e => e.Sblxxh).HasColumnName("SBLXXH");
- });
- modelBuilder.Entity<ImSheBeiProtDevice>(entity =>
- {
- entity.HasKey(e => e.RecId)
- .HasName("PK_SheBeiProtDevice");
- entity.ToTable("im_SheBei_ProtDevice");
- entity.HasIndex(e => e.DeviceId, "UK_SheBeiProtDevice")
- .IsUnique();
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.SheBeiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("SheBeiID");
- entity.HasOne(d => d.Device)
- .WithOne(p => p.ImSheBeiProtDevice)
- .HasForeignKey<ImSheBeiProtDevice>(d => d.DeviceId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_SBDevice_Device");
- entity.HasOne(d => d.SheBei)
- .WithMany(p => p.ImSheBeiProtDevices)
- .HasForeignKey(d => d.SheBeiId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_SBDevice_SheBei");
- });
- modelBuilder.Entity<ImSheBeiZt>(entity =>
- {
- entity.HasKey(e => e.Sbztbm)
- .HasName("PK_SheBeiZT");
- entity.ToTable("im_SheBeiZT");
- entity.Property(e => e.Sbztbm)
- .ValueGeneratedNever()
- .HasColumnName("SBZTBM");
- entity.Property(e => e.Sbztmc)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SBZTMC");
- entity.Property(e => e.Sbztxh).HasColumnName("SBZTXH");
- });
- modelBuilder.Entity<ImStation>(entity =>
- {
- entity.HasKey(e => e.StatCode)
- .HasName("PK_Station");
- entity.ToTable("im_Station");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.PrjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PrjID");
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.HasOne(d => d.Prj)
- .WithMany(p => p.ImStations)
- .HasForeignKey(d => d.PrjId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Station_Project");
- });
- modelBuilder.Entity<ImSwitchState>(entity =>
- {
- entity.HasKey(e => e.SwStateCode)
- .HasName("PK_SwitchState");
- entity.ToTable("im_SwitchState");
- entity.Property(e => e.SwStateCode).ValueGeneratedNever();
- entity.Property(e => e.SwStateStr)
- .HasMaxLength(20)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImTimeSrc>(entity =>
- {
- entity.HasKey(e => e.TimeSrcCode)
- .HasName("pk_TimeSrc");
- entity.ToTable("im_TimeSrc");
- entity.Property(e => e.TimeSrcCode)
- .HasMaxLength(8)
- .IsUnicode(false);
- entity.Property(e => e.TimeSrcName)
- .HasMaxLength(20)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVDevDataLinkage>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DevDataLinkage");
- entity.Property(e => e.ActParam)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Action)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Domain)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.LnkId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("LnkID");
- entity.Property(e => e.LnkType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Resource)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.SrcObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SrcObjID");
- entity.Property(e => e.SrcObjType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.SrcTempDataId)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("SrcTempDataID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(6)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVDeviceDatum>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceData");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Domain)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.SrcTempDataId)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("SrcTempDataID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVDeviceDz>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceDZ");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.CtrlWordTypeId).HasColumnName("CtrlWord_TypeId");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DzCoeff).HasColumnName("DZ_Coeff");
- entity.Property(e => e.DzCoeff1).HasColumnName("DZ_Coeff_1");
- entity.Property(e => e.DzComment)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Comment");
- entity.Property(e => e.DzIndex).HasColumnName("DZ_Index");
- entity.Property(e => e.DzMax).HasColumnName("DZ_Max");
- entity.Property(e => e.DzMin).HasColumnName("DZ_Min");
- entity.Property(e => e.DzName)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Name");
- entity.Property(e => e.DzPrecise).HasColumnName("DZ_Precise");
- entity.Property(e => e.DzPrecise1).HasColumnName("DZ_Precise_1");
- entity.Property(e => e.DzRange)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("DZ_Range");
- entity.Property(e => e.DzType).HasColumnName("DZ_Type");
- entity.Property(e => e.DzUnit)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit");
- entity.Property(e => e.DzUnit1)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit_1");
- entity.Property(e => e.DzUnitCvtCoeff).HasColumnName("DZ_UnitCvt_Coeff");
- entity.Property(e => e.DztypeName)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("DZTypeName");
- entity.Property(e => e.EnumTypeId).HasColumnName("Enum_TypeId");
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Hidden)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Id)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.RelateCtId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("RelateCT_ID");
- entity.Property(e => e.RelatePtId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("RelatePT_ID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVDeviceYc>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceYC");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.SaveMode)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.Unit)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Unit2)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YCName");
- });
- modelBuilder.Entity<ImVDeviceYk>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceYK");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.IsResetCmd)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.LockMode)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.LockModeOff)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("LockMode_Off");
- entity.Property(e => e.PreState4Yk).HasColumnName("PreState4YK");
- entity.Property(e => e.PreState4YkOff).HasColumnName("PreState4YK_Off");
- entity.Property(e => e.PreYxId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("PreYX_ID");
- entity.Property(e => e.PreYxIdOff)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("PreYX_ID_Off");
- entity.Property(e => e.RelatedYxId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("RelatedYX_ID");
- entity.Property(e => e.RelatedYxName)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("RelatedYX_Name");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.SwOffStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwOnStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwUncertStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YkType)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("YK_Type");
- entity.Property(e => e.Ykname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YKName");
- });
- modelBuilder.Entity<ImVDeviceYm>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceYM");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.Unit)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Ymname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YMName");
- });
- modelBuilder.Entity<ImVDeviceYx>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceYX");
- entity.Property(e => e.AlertLevel)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.Id)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.InfoAddr).HasColumnName("Info_Addr");
- entity.Property(e => e.NormalState)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.SwOffStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwOnStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SwUncertStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YxType)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("YX_Type");
- entity.Property(e => e.Yxname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YXName");
- });
- modelBuilder.Entity<ImVDeviceYxSrcDevice>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DeviceYX_SrcDevice");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevNameOfYx)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("DevNameOfYX");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.SrcDevId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("SrcDevID");
- entity.Property(e => e.SrcDevName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.YxdataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("YXDataID");
- });
- modelBuilder.Entity<ImVDzdataDetail>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DZData_Detail");
- entity.Property(e => e.DzComment)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DZ_Comment");
- entity.Property(e => e.DzId)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("DZ_ID");
- entity.Property(e => e.DzIndex).HasColumnName("DZ_Index");
- entity.Property(e => e.DzUnit)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DZ_Unit");
- entity.Property(e => e.DzValue)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("DZ_Value");
- entity.Property(e => e.DzdataDetailId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DZDataDetailID");
- entity.Property(e => e.DzdataMainId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DZDataMainID");
- });
- modelBuilder.Entity<ImVDzdataMain>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_DZData_Main");
- entity.Property(e => e.CpuIndex).HasColumnName("CPU_Index");
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.DataType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DzdataMainId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DZDataMainID");
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.UserName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVEventType2010DeviceYktmp>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_EventType2010_DeviceYKTmp");
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.DeviceName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.EvtName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.Ykname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("YKName");
- entity.Property(e => e.YktmpId)
- .HasMaxLength(8)
- .IsUnicode(false)
- .HasColumnName("YKTmp_ID");
- });
- modelBuilder.Entity<ImVFaultActType2010>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_FaultActType_2010");
- entity.Property(e => e.ActName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DeviceCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.FaultName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.FltTypeId)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("FltTypeID");
- });
- modelBuilder.Entity<ImVNotifyTask>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_NotifyTask");
- entity.Property(e => e.AlertType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.BusiTabName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.EndTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.PkfldName)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("PKFldName");
- entity.Property(e => e.Sql4msg)
- .HasMaxLength(1000)
- .IsUnicode(false)
- .HasColumnName("SQL4Msg");
- entity.Property(e => e.Sql4notify)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4Notify");
- entity.Property(e => e.Sql4phoneNo)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4PhoneNo");
- entity.Property(e => e.StartTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.TaskDesc)
- .HasMaxLength(1000)
- .IsUnicode(false);
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.Property(e => e.TaskName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVNotifyTaskPhone>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_NotifyTaskPhone");
- entity.Property(e => e.FullName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Id)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.PhoneNo)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.Property(e => e.TaskName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVOnlineAnalysis>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_OnlineAnalysis");
- entity.Property(e => e.C2h2Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("c2h2_YCName");
- entity.Property(e => e.C2h4Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("c2h4_YCName");
- entity.Property(e => e.C2h6Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("c2h6_YCName");
- entity.Property(e => e.Ch4Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("ch4_YCName");
- entity.Property(e => e.DataIdofC2h2)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofC2H2");
- entity.Property(e => e.DataIdofC2h4)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofC2H4");
- entity.Property(e => e.DataIdofC2h6)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofC2H6");
- entity.Property(e => e.DataIdofCh4)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofCH4");
- entity.Property(e => e.DataIdofH2)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("DataIDofH2");
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.H2Ycname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("h2_YCName");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.IsAlert)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Method)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVProtectDevice>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_ProtectDevice");
- entity.Property(e => e.AnalogParseMode)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.BayName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.CanSwDzzone).HasColumnName("CanSwDZZone");
- entity.Property(e => e.DevCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DeviceType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.DzreadOnly).HasColumnName("DZReadOnly");
- entity.Property(e => e.DzzoneCount).HasColumnName("DZZoneCount");
- entity.Property(e => e.EndOfDkjl).HasColumnName("EndOfDKJL");
- entity.Property(e => e.EventParseMode)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.GateWayId)
- .HasMaxLength(6)
- .IsUnicode(false)
- .HasColumnName("GateWayID");
- entity.Property(e => e.GateWayName)
- .HasMaxLength(200)
- .IsUnicode(false);
- entity.Property(e => e.GatewayIp1)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("GatewayIP1");
- entity.Property(e => e.GatewayIp2)
- .HasMaxLength(15)
- .IsUnicode(false)
- .HasColumnName("GatewayIP2");
- entity.Property(e => e.Generation)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.StartOfDkjl).HasColumnName("StartOfDKJL");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Support12yc).HasColumnName("Support1_2YC");
- entity.Property(e => e.SupportDkjl).HasColumnName("SupportDKJL");
- entity.Property(e => e.SupportDz).HasColumnName("SupportDZ");
- entity.Property(e => e.SupportFhluBo).HasColumnName("SupportFHLuBo");
- entity.Property(e => e.SupportGuZhangBg).HasColumnName("SupportGuZhangBG");
- entity.Property(e => e.SupportLuBoWj).HasColumnName("SupportLuBoWJ");
- entity.Property(e => e.SupportShiJianBg).HasColumnName("SupportShiJianBG");
- entity.Property(e => e.SupportZiJianBg).HasColumnName("SupportZiJianBG");
- });
- modelBuilder.Entity<ImVProtectDeviceTmp>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_ProtectDevice_Tmp");
- entity.Property(e => e.AnalogParseMode)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.CanSwDzzone).HasColumnName("CanSwDZZone");
- entity.Property(e => e.DevCtgy)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.DeviceName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.DzreadOnly).HasColumnName("DZReadOnly");
- entity.Property(e => e.DzzoneCount).HasColumnName("DZZoneCount");
- entity.Property(e => e.EndOfDkjl).HasColumnName("EndOfDKJL");
- entity.Property(e => e.EventParseMode)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.Generation)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Id)
- .HasMaxLength(3)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PuctgyCode).HasColumnName("PUCtgyCode");
- entity.Property(e => e.PuctgyName)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("PUCtgyName");
- entity.Property(e => e.StartOfDkjl).HasColumnName("StartOfDKJL");
- entity.Property(e => e.Support12yc).HasColumnName("Support1_2YC");
- entity.Property(e => e.SupportDkjl).HasColumnName("SupportDKJL");
- entity.Property(e => e.SupportDz).HasColumnName("SupportDZ");
- entity.Property(e => e.SupportFhluBo).HasColumnName("SupportFHLuBo");
- entity.Property(e => e.SupportGuZhangBg).HasColumnName("SupportGuZhangBG");
- entity.Property(e => e.SupportLuBoWj).HasColumnName("SupportLuBoWJ");
- entity.Property(e => e.SupportShiJianBg).HasColumnName("SupportShiJianBG");
- entity.Property(e => e.SupportZiJianBg).HasColumnName("SupportZiJianBG");
- });
- modelBuilder.Entity<ImVSheBei>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_SheBei");
- entity.Property(e => e.AnZhuangRq)
- .HasColumnType("datetime")
- .HasColumnName("AnZhuangRQ");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(1000)
- .IsUnicode(false);
- entity.Property(e => e.ChuChangRq)
- .HasColumnType("datetime")
- .HasColumnName("ChuChangRQ");
- entity.Property(e => e.DaXiuZhouQi)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.GuZiBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("GuZiBH");
- entity.Property(e => e.Sblxbm).HasColumnName("SBLXBM");
- entity.Property(e => e.Sblxmc)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SBLXMC");
- entity.Property(e => e.Sblxxh).HasColumnName("SBLXXH");
- entity.Property(e => e.SheBeiBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SheBeiBH");
- entity.Property(e => e.SheBeiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("SheBeiID");
- entity.Property(e => e.SheBeiXh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("SheBeiXH");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.TouYunRq)
- .HasColumnType("datetime")
- .HasColumnName("TouYunRQ");
- entity.Property(e => e.XiaoXiuZhouQi)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.YunXingBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("YunXingBH");
- entity.Property(e => e.ZhiZaoChang)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ZhongXiuZhouQi)
- .HasMaxLength(20)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVSheBeiDeviceDatum>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_SheBei_DeviceData");
- entity.Property(e => e.DataFullName)
- .HasMaxLength(319)
- .IsUnicode(false);
- entity.Property(e => e.DataId)
- .HasMaxLength(12)
- .IsUnicode(false)
- .HasColumnName("DataID");
- entity.Property(e => e.DataName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DataType)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.SheBeiFullName)
- .HasMaxLength(152)
- .IsUnicode(false);
- entity.Property(e => e.SheBeiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("SheBeiID");
- entity.Property(e => e.SheBeiStatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.YunXingBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("YunXingBH");
- });
- modelBuilder.Entity<ImVSheBeiProtDevice>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_SheBei_ProtDevice");
- entity.Property(e => e.DeviceFullName)
- .HasMaxLength(152)
- .IsUnicode(false);
- entity.Property(e => e.DeviceId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("DeviceID");
- entity.Property(e => e.DeviceName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DeviceStatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.SheBeiFullName)
- .HasMaxLength(152)
- .IsUnicode(false);
- entity.Property(e => e.SheBeiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("SheBeiID");
- entity.Property(e => e.SheBeiStatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.YunXingBh)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("YunXingBH");
- });
- modelBuilder.Entity<ImVStation4SheBei>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("im_v_Station4SheBei");
- entity.Property(e => e.PrjId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PrjID");
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.StatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVariantBool>(entity =>
- {
- entity.HasKey(e => e.VaId)
- .HasName("PK_Variant_Bool");
- entity.ToTable("im_Variant_Bool");
- entity.HasIndex(e => e.Expr, "UK_Variant_Bool_Expr")
- .IsUnique();
- entity.HasIndex(e => new { e.StatCode, e.Vaname }, "UK_Variant_Bool_Name")
- .IsUnique();
- entity.Property(e => e.VaId)
- .HasMaxLength(7)
- .IsUnicode(false)
- .HasColumnName("VA_ID");
- entity.Property(e => e.AlertMsg)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.AlertType)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasDefaultValueSql("('不报警')");
- entity.Property(e => e.Expr)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.ExprDataIds)
- .HasMaxLength(500)
- .IsUnicode(false)
- .HasColumnName("ExprDataIDs");
- entity.Property(e => e.ExprDesc)
- .HasMaxLength(2000)
- .IsUnicode(false);
- entity.Property(e => e.FalseStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.IsFibre)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.Memo)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.StatCode)
- .HasMaxLength(4)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(6)
- .IsUnicode(false);
- entity.Property(e => e.TrueStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Vaname)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("VAName");
- entity.HasOne(d => d.StatCodeNavigation)
- .WithMany(p => p.ImVariantBools)
- .HasForeignKey(d => d.StatCode)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_VABool_Station");
- });
- modelBuilder.Entity<ImVariantBoolState>(entity =>
- {
- entity.HasKey(e => e.VarBoolStateCode)
- .HasName("PK_VariantBoolState");
- entity.ToTable("im_VariantBoolState");
- entity.Property(e => e.VarBoolStateCode).ValueGeneratedNever();
- entity.Property(e => e.VarBoolStateStr)
- .HasMaxLength(20)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVersion>(entity =>
- {
- entity.HasKey(e => e.LastModified);
- entity.ToTable("im_Version");
- entity.Property(e => e.LastModified)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Desc)
- .HasMaxLength(255)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImVersionTypeEnum2010>(entity =>
- {
- entity.HasKey(e => e.EnumIndex)
- .HasName("PK_VersionTypeEnum2010");
- entity.ToTable("im_VersionTypeEnum_2010");
- entity.Property(e => e.EnumIndex).ValueGeneratedNever();
- entity.Property(e => e.EnumName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImWatchdog>(entity =>
- {
- entity.HasKey(e => e.ExeName)
- .HasName("PK_Watchdog");
- entity.ToTable("im_Watchdog");
- entity.Property(e => e.ExeName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.LastTime).HasColumnType("datetime");
- });
- modelBuilder.Entity<ImYkType>(entity =>
- {
- entity.HasKey(e => e.TypeCode)
- .HasName("pk_YK_Type");
- entity.ToTable("im_YK_Type");
- entity.Property(e => e.TypeCode)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.TypeName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<ImYxType>(entity =>
- {
- entity.HasKey(e => e.TypeCode)
- .HasName("pk_YXtype");
- entity.ToTable("im_YX_Type");
- entity.Property(e => e.TypeCode)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.TypeName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbAccessController>(entity =>
- {
- entity.HasKey(e => e.CtlerId)
- .HasName("PK_AccessCtler");
- entity.ToTable("tb_AccessController");
- entity.Property(e => e.CtlerId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("CtlerID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.CtlerName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.CtlerType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.DoorNames)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.NetAddr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Passowrd)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.UserName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbAidPlatform>(entity =>
- {
- entity.HasKey(e => e.PlatId)
- .HasName("PK_AidPlatform");
- entity.ToTable("tb_AidPlatform");
- entity.HasIndex(e => e.PlatName, "PK_AidPlatform_Name")
- .IsUnique();
- entity.Property(e => e.PlatId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PlatID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.Ip)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("IP");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PassEnc)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PlatImpl)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PlatName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.PlatType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.UserName)
- .HasMaxLength(30)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbAidVideoChannel>(entity =>
- {
- entity.HasKey(e => e.ChanId)
- .HasName("PK_AidVideoChan");
- entity.ToTable("tb_AidVideoChannel");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.ChanName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ChanType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.IdinPlat)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("IDinPlat");
- entity.Property(e => e.IsPtz)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("IsPTZ");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.Dev)
- .WithMany(p => p.TbAidVideoChannels)
- .HasForeignKey(d => d.DevId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AidVideoChan_Dev");
- });
- modelBuilder.Entity<TbAidVideoDev>(entity =>
- {
- entity.HasKey(e => e.DevId)
- .HasName("PK_AidVideoDev");
- entity.ToTable("tb_AidVideoDev");
- entity.HasIndex(e => e.DevName, "UK_AidVideoDev_Name")
- .IsUnique();
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Ip)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("IP");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PassEnc)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PlatId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PlatID");
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.UserName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.HasOne(d => d.Plat)
- .WithMany(p => p.TbAidVideoDevs)
- .HasForeignKey(d => d.PlatId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_AidVideoDev_Plat");
- });
- modelBuilder.Entity<TbAttachment>(entity =>
- {
- entity.ToTable("tb_Attachment");
- entity.HasIndex(e => e.DuiXiangBm, "IND_Attachment_DXBM");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DuiXiangBm)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("DuiXiangBM");
- entity.Property(e => e.FaBuRen)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.FaBuSj)
- .HasColumnType("datetime")
- .HasColumnName("FaBuSJ");
- entity.Property(e => e.FuJianMc)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("FuJianMC");
- entity.Property(e => e.WenJianCd).HasColumnName("WenJianCD");
- entity.Property(e => e.WenJianLj)
- .HasMaxLength(500)
- .IsUnicode(false)
- .HasColumnName("WenJianLJ");
- entity.Property(e => e.WenJianLx)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasColumnName("WenJianLX");
- });
- modelBuilder.Entity<TbBuMan>(entity =>
- {
- entity.ToTable("tb_BuMen");
- entity.HasIndex(e => e.BuMenMc, "UK_BuMen")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Bmlxbm)
- .HasMaxLength(2)
- .IsUnicode(false)
- .HasColumnName("BMLXBM");
- entity.Property(e => e.BuMenBm)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BuMenBM");
- entity.Property(e => e.BuMenMc)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BuMenMC");
- entity.HasOne(d => d.BmlxbmNavigation)
- .WithMany(p => p.TbBuMen)
- .HasForeignKey(d => d.Bmlxbm)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BM_BMLX");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.TbBuMan)
- .HasForeignKey<TbBuMan>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BM_TreeNode");
- });
- modelBuilder.Entity<TbBuMenLx>(entity =>
- {
- entity.HasKey(e => e.Bmlxbm)
- .HasName("PK_BuMenLX");
- entity.ToTable("tb_BuMenLX");
- entity.HasIndex(e => e.Bmlxmc, "UK_BuMenLX")
- .IsUnique();
- entity.Property(e => e.Bmlxbm)
- .HasMaxLength(2)
- .IsUnicode(false)
- .HasColumnName("BMLXBM");
- entity.Property(e => e.Bmlxmc)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BMLXMC");
- });
- modelBuilder.Entity<TbBusiHistory>(entity =>
- {
- entity.ToTable("tb_BusiHistory");
- entity.Property(e => e.Id).HasColumnName("ID");
- entity.Property(e => e.BusiId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("BusiID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.OperDesc)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.OperTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.OperUser)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.WfStepId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("WfStepID");
- entity.HasOne(d => d.Busi)
- .WithMany(p => p.TbBusiHistories)
- .HasForeignKey(d => d.BusiId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BusiHis_Busi");
- entity.HasOne(d => d.WfStep)
- .WithMany(p => p.TbBusiHistories)
- .HasForeignKey(d => d.WfStepId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_BusiHis_WfStep");
- });
- modelBuilder.Entity<TbBusiness>(entity =>
- {
- entity.ToTable("tb_Business");
- entity.HasIndex(e => new { e.WfId, e.BusiName }, "UK_Business")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.ApplyTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.ApplyUser)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.BusiName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.WfId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("WfID");
- entity.Property(e => e.WfStepId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("WfStepID");
- entity.HasOne(d => d.Wf)
- .WithMany(p => p.TbBusinesses)
- .HasForeignKey(d => d.WfId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Business_Wf");
- entity.HasOne(d => d.WfStep)
- .WithMany(p => p.TbBusinesses)
- .HasForeignKey(d => d.WfStepId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Business_WfStep");
- });
- modelBuilder.Entity<TbDaTask>(entity =>
- {
- entity.HasKey(e => e.TaskId)
- .HasName("PK_DA_Task");
- entity.ToTable("tb_DA_Task");
- entity.HasIndex(e => e.TaskName, "UK_DATaskName")
- .IsUnique();
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.Property(e => e.CreateTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.EndTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.Memo)
- .HasMaxLength(2000)
- .IsUnicode(false);
- entity.Property(e => e.Sql4acquisition)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4Acquisition");
- entity.Property(e => e.Sql4record)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4Record");
- entity.Property(e => e.SrcDatabase)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.SrcServer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.SrcTable)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.StartTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.TaskName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbDataModiHi>(entity =>
- {
- entity.ToTable("tb_DataModiHis");
- entity.HasIndex(e => e.DstObjId, "Ind_DataModiHis");
- entity.Property(e => e.Id).HasColumnName("ID");
- entity.Property(e => e.Content)
- .HasMaxLength(4000)
- .IsUnicode(false);
- entity.Property(e => e.DstObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("DstObjID");
- entity.Property(e => e.DstObjName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DstTable)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.EditTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.Editor)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Type)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbDataViewer>(entity =>
- {
- entity.ToTable("tb_DataViewer");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.NameFontName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ValueFontName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.TbDataViewer)
- .HasForeignKey<TbDataViewer>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_tb_DataViewer_Glyph");
- });
- modelBuilder.Entity<TbDataViewerBusiObj>(entity =>
- {
- entity.HasKey(e => new { e.DataViewerId, e.BusiObjId })
- .HasName("PK_DataViewerBusiObj");
- entity.ToTable("tb_DataViewer_BusiObj");
- entity.Property(e => e.DataViewerId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DataViewerID");
- entity.Property(e => e.BusiObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BusiObjID");
- entity.Property(e => e.BusiObjName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.HasOne(d => d.DataViewer)
- .WithMany(p => p.TbDataViewerBusiObjs)
- .HasForeignKey(d => d.DataViewerId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DataViewerBusiObj_DataViewer");
- });
- modelBuilder.Entity<TbDframeRevision>(entity =>
- {
- entity.HasKey(e => e.OccurTime);
- entity.ToTable("tb_DFrameRevision");
- entity.Property(e => e.OccurTime).HasColumnType("datetime");
- entity.Property(e => e.Content)
- .HasMaxLength(255)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbDiagram>(entity =>
- {
- entity.ToTable("tb_Diagram");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.CreateTime).HasColumnType("datetime");
- entity.Property(e => e.Creator)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.TbDiagram)
- .HasForeignKey<TbDiagram>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Diagram_Glyph");
- });
- modelBuilder.Entity<TbEnvVar>(entity =>
- {
- entity.HasKey(e => e.EnvVarName)
- .HasName("PK_EnvVar");
- entity.ToTable("tb_EnvVar");
- entity.Property(e => e.EnvVarName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.EnvVarUnit)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.EnvVarValue)
- .HasMaxLength(255)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbExportTemplate>(entity =>
- {
- entity.HasKey(e => e.TempId)
- .HasName("PK_ExportTemplate");
- entity.ToTable("tb_ExportTemplate");
- entity.HasIndex(e => e.TempFileName, "UK_ExportTemplate")
- .IsUnique();
- entity.Property(e => e.TempId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("TempID");
- entity.Property(e => e.DataTag4Filter)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DefFileName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.FilterCond)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.Property(e => e.FilterValue)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.FilterValueType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.RelateDir)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.TempFileName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbExportTemplateCol>(entity =>
- {
- entity.ToTable("tb_ExportTemplateCol");
- entity.HasIndex(e => new { e.TempId, e.ColSeqNo }, "UK_ExpTempCol")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.DataTag)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Expression)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.TempId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("TempID");
- entity.HasOne(d => d.Temp)
- .WithMany(p => p.TbExportTemplateCols)
- .HasForeignKey(d => d.TempId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ExpTempCol_Temp");
- });
- modelBuilder.Entity<TbField>(entity =>
- {
- entity.HasKey(e => e.FieldId)
- .HasName("PK_Field");
- entity.ToTable("tb_Field");
- entity.HasIndex(e => new { e.FieldName, e.TableId }, "UK_Field")
- .IsUnique();
- entity.Property(e => e.FieldId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("FieldID");
- entity.Property(e => e.CheckValue)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ColorMode)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DefaultValue)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.FieldName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.FieldType)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasDefaultValueSql("('Str')");
- entity.Property(e => e.FormatStr)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.GroupName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Hint)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.Prcname)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("PRCName");
- entity.Property(e => e.ReadOnly).HasDefaultValueSql("((0))");
- entity.Property(e => e.RefCodeField)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.RefNameField)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.RefTable)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.RefTableAlias)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ShowOnAdd).HasDefaultValueSql("((1))");
- entity.Property(e => e.ShowOnBrw).HasDefaultValueSql("((1))");
- entity.Property(e => e.ShowOnEdit).HasDefaultValueSql("((1))");
- entity.Property(e => e.ShowOnQry).HasDefaultValueSql("((1))");
- entity.Property(e => e.TableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TableID");
- entity.HasOne(d => d.Table)
- .WithMany(p => p.TbFields)
- .HasForeignKey(d => d.TableId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Field_Table");
- });
- modelBuilder.Entity<TbGlyph>(entity =>
- {
- entity.ToTable("tb_Glyph");
- entity.HasIndex(e => e.DiagId, "IX_Glyph_DiagID");
- entity.HasIndex(e => e.ParentId, "IX_Glyph_ParentID");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.BusiObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BusiObjID");
- entity.Property(e => e.BusiObjName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.DiagId)
- .HasMaxLength(38)
- .IsUnicode(false);
- entity.Property(e => e.Hide).HasDefaultValueSql("((0))");
- entity.Property(e => e.Locked).HasDefaultValueSql("((0))");
- entity.Property(e => e.Name)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ParentId)
- .HasMaxLength(38)
- .IsUnicode(false);
- entity.Property(e => e.Reserved1)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Reserved2)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.ZOrder).HasColumnName("Z_order");
- });
- modelBuilder.Entity<TbGlyphHot>(entity =>
- {
- entity.HasKey(e => new { e.GlyphId, e.HotIndex })
- .HasName("PK_GlyphHots");
- entity.ToTable("tb_GlyphHots");
- entity.Property(e => e.GlyphId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("GlyphID");
- entity.Property(e => e.ConnectedGlyph)
- .HasMaxLength(38)
- .IsUnicode(false);
- entity.HasOne(d => d.Glyph)
- .WithMany(p => p.TbGlyphHots)
- .HasForeignKey(d => d.GlyphId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_GlyphHots_Glyph");
- });
- modelBuilder.Entity<TbGlyphLinkObj>(entity =>
- {
- entity.ToTable("tb_GlyphLinkObj");
- entity.HasIndex(e => new { e.GlyphId, e.LinkObjName, e.LinkObjType }, "UK_GlyphLinkObj")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.GlyphId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("GlyphID");
- entity.Property(e => e.LinkObjName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.LinkObjParam)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.LinkObjPortal)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.LinkObjPos)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.LinkObjType)
- .HasMaxLength(20)
- .IsUnicode(false);
- entity.HasOne(d => d.Glyph)
- .WithMany(p => p.TbGlyphLinkObjs)
- .HasForeignKey(d => d.GlyphId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_GlyphLinkObj_Glyph");
- });
- modelBuilder.Entity<TbGrid>(entity =>
- {
- entity.ToTable("tb_Grid");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.TbGrid)
- .HasForeignKey<TbGrid>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Grid_Glyph");
- });
- modelBuilder.Entity<TbImage>(entity =>
- {
- entity.HasKey(e => e.ObjId)
- .HasName("PK_Image");
- entity.ToTable("tb_Image");
- entity.Property(e => e.ObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("ObjID");
- entity.Property(e => e.Data).HasColumnType("image");
- entity.Property(e => e.Format)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("Format_");
- });
- modelBuilder.Entity<TbLabel>(entity =>
- {
- entity.ToTable("tb_Label");
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Caption)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.FBold).HasColumnName("F_Bold");
- entity.Property(e => e.FCharSet).HasColumnName("F_CharSet");
- entity.Property(e => e.FColor).HasColumnName("F_Color");
- entity.Property(e => e.FItalic).HasColumnName("F_Italic");
- entity.Property(e => e.FName)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("F_Name");
- entity.Property(e => e.FSize).HasColumnName("F_Size");
- entity.Property(e => e.FStrikeout).HasColumnName("F_Strikeout");
- entity.Property(e => e.FUnderLine).HasColumnName("F_UnderLine");
- entity.HasOne(d => d.IdNavigation)
- .WithOne(p => p.TbLabel)
- .HasForeignKey<TbLabel>(d => d.Id)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Label_Glyph");
- });
- modelBuilder.Entity<TbNotifySent>(entity =>
- {
- entity.HasKey(e => new { e.BusiTabName, e.PkfldValue })
- .HasName("PK_NotifySent");
- entity.ToTable("tb_NotifySent");
- entity.Property(e => e.BusiTabName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.PkfldValue)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("PKFldValue");
- entity.Property(e => e.SentTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- });
- modelBuilder.Entity<TbNotifyTask>(entity =>
- {
- entity.HasKey(e => e.TaskId)
- .HasName("PK_Notify");
- entity.ToTable("tb_NotifyTask");
- entity.HasIndex(e => e.TaskName, "UK_Notify_Name")
- .IsUnique();
- entity.Property(e => e.TaskId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TaskID");
- entity.Property(e => e.BusiTabName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.CreateTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.EndTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.PkfldName)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("PKFldName");
- entity.Property(e => e.Sql4msg)
- .HasMaxLength(1000)
- .IsUnicode(false)
- .HasColumnName("SQL4Msg");
- entity.Property(e => e.Sql4notify)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4Notify");
- entity.Property(e => e.Sql4phoneNo)
- .HasMaxLength(2000)
- .IsUnicode(false)
- .HasColumnName("SQL4PhoneNo");
- entity.Property(e => e.StartTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.TaskName)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbPlanTask>(entity =>
- {
- entity.HasKey(e => e.BusiObjId)
- .HasName("PK_PlanTask");
- entity.ToTable("tb_PlanTask");
- entity.HasIndex(e => new { e.BusiObjType, e.BusiObjName }, "UK_PlanTask_BusiObjName")
- .IsUnique();
- entity.Property(e => e.BusiObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BusiObjID");
- entity.Property(e => e.BusiObjName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.BusiObjType)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.CreateTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbPlanTaskItem>(entity =>
- {
- entity.ToTable("tb_PlanTaskItem");
- entity.HasIndex(e => new { e.BusiObjId, e.DayOfWeek, e.ExecTime }, "UK_PlanTaskItem")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.BusiObjId)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("BusiObjID");
- entity.Property(e => e.DayOfWeek)
- .HasMaxLength(20)
- .IsUnicode(false)
- .HasColumnName("DayOfWeek_");
- entity.Property(e => e.ExecTime)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasOne(d => d.BusiObj)
- .WithMany(p => p.TbPlanTaskItems)
- .HasForeignKey(d => d.BusiObjId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Item_PlanTask");
- });
- modelBuilder.Entity<TbPresetPoint>(entity =>
- {
- entity.HasKey(e => e.PointId)
- .HasName("PK_PresetPoint");
- entity.ToTable("tb_PresetPoint");
- entity.HasIndex(e => new { e.DevId, e.Number }, "UK_Point_Number")
- .IsUnique();
- entity.Property(e => e.PointId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PointID");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.HasOne(d => d.Chan)
- .WithMany(p => p.TbPresetPoints)
- .HasForeignKey(d => d.ChanId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Point_Chan");
- entity.HasOne(d => d.Dev)
- .WithMany(p => p.TbPresetPoints)
- .HasForeignKey(d => d.DevId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_Point_Dev");
- });
- modelBuilder.Entity<TbQuanXian>(entity =>
- {
- entity.HasKey(e => new { e.YongHuMing, e.MoKuaiBianHao })
- .HasName("PK_QuanXian");
- entity.ToTable("tb_QuanXian");
- entity.Property(e => e.YongHuMing)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.MoKuaiBianHao)
- .HasMaxLength(8)
- .IsUnicode(false);
- entity.HasOne(d => d.YongHuMingNavigation)
- .WithMany(p => p.TbQuanXians)
- .HasForeignKey(d => d.YongHuMing)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_QuanXian_YongHu");
- });
- modelBuilder.Entity<TbSession>(entity =>
- {
- entity.HasKey(e => e.SessionId)
- .HasName("PK_Session");
- entity.ToTable("tb_Session");
- entity.Property(e => e.SessionId)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ClientIp)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("ClientIP");
- entity.Property(e => e.LastTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.SoftInfo)
- .HasMaxLength(2000)
- .IsUnicode(false);
- entity.Property(e => e.UserName)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbSm>(entity =>
- {
- entity.HasKey(e => e.MsgId)
- .HasName("PK_SMS");
- entity.ToTable("tb_SMS");
- entity.Property(e => e.MsgId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("MsgID");
- entity.Property(e => e.Content)
- .HasMaxLength(1000)
- .IsUnicode(false);
- entity.Property(e => e.CreateTime)
- .HasColumnType("datetime")
- .HasDefaultValueSql("(getdate())");
- });
- modelBuilder.Entity<TbSmsSent>(entity =>
- {
- entity.ToTable("tb_SMS_Sent");
- entity.Property(e => e.Id)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("ID")
- .HasDefaultValueSql("(newid())");
- entity.Property(e => e.FullName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.IsSent)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.MsgId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("MsgID");
- entity.Property(e => e.PhoneNo)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.SentTime).HasColumnType("datetime");
- entity.HasOne(d => d.Msg)
- .WithMany(p => p.TbSmsSents)
- .HasForeignKey(d => d.MsgId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_SMSSent_SMS");
- });
- modelBuilder.Entity<TbTable>(entity =>
- {
- entity.HasKey(e => e.TableId)
- .HasName("PK_Table");
- entity.ToTable("tb_Table");
- entity.HasIndex(e => e.TableName, "UK_Table")
- .IsUnique();
- entity.Property(e => e.TableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TableID");
- entity.Property(e => e.Ctgy)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DbconnName)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("DBConnName");
- entity.Property(e => e.IsView)
- .HasMaxLength(4)
- .IsUnicode(false)
- .HasDefaultValueSql("('否')");
- entity.Property(e => e.OrderBy)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Prcname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("PRCName");
- entity.Property(e => e.TableName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.TblName4View)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbTableDataDup>(entity =>
- {
- entity.HasKey(e => e.DataDupId)
- .HasName("PK_TableDataDup");
- entity.ToTable("tb_TableDataDup");
- entity.HasIndex(e => new { e.DataDupCtgy, e.TableMapId }, "UK_TableDataDup")
- .IsUnique();
- entity.Property(e => e.DataDupId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DataDupID");
- entity.Property(e => e.DataDupCtgy)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SrcWhereClause)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.TableMapId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TableMapID");
- entity.HasOne(d => d.TableMap)
- .WithMany(p => p.TbTableDataDups)
- .HasForeignKey(d => d.TableMapId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DataDup_TableMap");
- });
- modelBuilder.Entity<TbTableMap>(entity =>
- {
- entity.HasKey(e => e.TableMapId)
- .HasName("PK_TableMap");
- entity.ToTable("tb_TableMap");
- entity.HasIndex(e => new { e.SrcTableId, e.DstTableId, e.MapCtgy }, "UK_TableMap")
- .IsUnique();
- entity.Property(e => e.TableMapId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TableMapID");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DstTableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DstTableID");
- entity.Property(e => e.MapCtgy)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SrcTableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("SrcTableID");
- entity.HasOne(d => d.DstTable)
- .WithMany(p => p.TbTableMapDstTables)
- .HasForeignKey(d => d.DstTableId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_DstTable_Table");
- entity.HasOne(d => d.SrcTable)
- .WithMany(p => p.TbTableMapSrcTables)
- .HasForeignKey(d => d.SrcTableId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_SrcTable_Table");
- });
- modelBuilder.Entity<TbTreeNode>(entity =>
- {
- entity.HasKey(e => e.NodeId)
- .HasName("PK_TreeNode");
- entity.ToTable("tb_TreeNode");
- entity.Property(e => e.NodeId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("NodeID");
- entity.Property(e => e.Ctgy)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.Desc)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("Desc_");
- entity.Property(e => e.NodeName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ParentId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ParentID");
- });
- modelBuilder.Entity<TbUserCondition>(entity =>
- {
- entity.ToTable("tb_UserCondition");
- entity.HasIndex(e => new { e.YongHuMing, e.TiaoJianLx, e.TiaoJianMc }, "UK_UserCondition")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.MiaoShu)
- .HasMaxLength(3000)
- .IsUnicode(false);
- entity.Property(e => e.ShiJian).HasColumnType("datetime");
- entity.Property(e => e.TiaoJian)
- .HasMaxLength(2000)
- .IsUnicode(false);
- entity.Property(e => e.TiaoJianLx)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("TiaoJianLX");
- entity.Property(e => e.TiaoJianMc)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("TiaoJianMC");
- entity.Property(e => e.YongHuMing)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbVideoChannelRight>(entity =>
- {
- entity.HasKey(e => e.RecId)
- .HasName("PK_VideoChannelRight");
- entity.ToTable("tb_VideoChannelRight");
- entity.HasIndex(e => new { e.YongHuMing, e.ChanId, e.RightName }, "UK_VideoChannelRight")
- .IsUnique();
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.RightName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YongHuMing)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.Chan)
- .WithMany(p => p.TbVideoChannelRights)
- .HasForeignKey(d => d.ChanId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ChanRight_Chan");
- entity.HasOne(d => d.YongHuMingNavigation)
- .WithMany(p => p.TbVideoChannelRights)
- .HasForeignKey(d => d.YongHuMing)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_ChanRight_YongHu");
- });
- modelBuilder.Entity<TbVirtualTable>(entity =>
- {
- entity.HasKey(e => e.TableName)
- .HasName("PK_VirtualTable");
- entity.ToTable("tb_VirtualTable");
- entity.HasIndex(e => new { e.BaseTableId, e.DeriveTableId }, "UK_VTable")
- .IsUnique();
- entity.Property(e => e.TableName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.BaseTableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("BaseTableID");
- entity.Property(e => e.CtgyFldInBaseTable)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.CtgyInBaseTable)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.DeriveTableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DeriveTableID");
- entity.Property(e => e.OrderBy)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.HasOne(d => d.BaseTable)
- .WithMany(p => p.TbVirtualTableBaseTables)
- .HasForeignKey(d => d.BaseTableId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_VirtualTable_Table1");
- entity.HasOne(d => d.DeriveTable)
- .WithMany(p => p.TbVirtualTableDeriveTables)
- .HasForeignKey(d => d.DeriveTableId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_VirtualTable_Table2");
- });
- modelBuilder.Entity<TbWfStep>(entity =>
- {
- entity.ToTable("tb_WfStep");
- entity.HasIndex(e => new { e.WfId, e.StepName }, "UK_WfStep1")
- .IsUnique();
- entity.HasIndex(e => new { e.WfId, e.SeqNo }, "UK_WfStep2")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Dllfunc)
- .HasMaxLength(100)
- .IsUnicode(false)
- .HasColumnName("DLLFunc");
- entity.Property(e => e.Dllname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DLLName");
- entity.Property(e => e.StatName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.StepName)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.WfId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("WfID");
- entity.HasOne(d => d.Wf)
- .WithMany(p => p.TbWfSteps)
- .HasForeignKey(d => d.WfId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_WfStep_Wf");
- });
- modelBuilder.Entity<TbWfStepUser>(entity =>
- {
- entity.HasKey(e => e.WfStepId)
- .HasName("PK_WfStepUser");
- entity.ToTable("tb_WfStepUser");
- entity.Property(e => e.WfStepId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("WfStepID");
- entity.Property(e => e.UserName)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.HasOne(d => d.WfStep)
- .WithOne(p => p.TbWfStepUser)
- .HasForeignKey<TbWfStepUser>(d => d.WfStepId)
- .OnDelete(DeleteBehavior.ClientSetNull)
- .HasConstraintName("FK_WfStepUser_WfStep");
- });
- modelBuilder.Entity<TbWorkflow>(entity =>
- {
- entity.ToTable("tb_Workflow");
- entity.HasIndex(e => e.Name, "UK_Workflow")
- .IsUnique();
- entity.Property(e => e.Id)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ID");
- entity.Property(e => e.Name)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.State)
- .HasMaxLength(20)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbXiTongMoKuai>(entity =>
- {
- entity.HasKey(e => e.MoKuaiBianHao)
- .HasName("PK_XiTongMoKuai");
- entity.ToTable("tb_XiTongMoKuai");
- entity.HasIndex(e => new { e.FuMoKuai, e.MoKuaiXuHao }, "UK_FoMoKuai_MoKuaiXuHao")
- .IsUnique();
- entity.Property(e => e.MoKuaiBianHao)
- .HasMaxLength(8)
- .IsUnicode(false);
- entity.Property(e => e.FuMoKuai)
- .HasMaxLength(8)
- .IsUnicode(false);
- entity.Property(e => e.MoKuaiLeiXing)
- .HasMaxLength(1)
- .IsUnicode(false);
- entity.Property(e => e.MoKuaiLuJing)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.MoKuaiMc)
- .HasMaxLength(50)
- .IsUnicode(false)
- .HasColumnName("MoKuaiMC");
- entity.Property(e => e.MoKuaiMiaoShu)
- .HasMaxLength(100)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbXiTongRiZhi>(entity =>
- {
- entity.ToTable("tb_XiTongRiZhi");
- entity.Property(e => e.Id).HasColumnName("ID");
- entity.Property(e => e.FaShengRiQi)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.Property(e => e.FaShengShiJian)
- .HasMaxLength(5)
- .IsUnicode(false);
- entity.Property(e => e.MiaoShu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.YongHu)
- .HasMaxLength(20)
- .IsUnicode(false);
- });
- modelBuilder.Entity<TbYongHu>(entity =>
- {
- entity.HasKey(e => e.YongHuMing)
- .HasName("PK_YongHu");
- entity.ToTable("tb_YongHu");
- entity.Property(e => e.YongHuMing)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.BuMenId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("BuMenID");
- entity.Property(e => e.ChuangJianSj)
- .HasColumnType("datetime")
- .HasColumnName("ChuangJianSJ")
- .HasDefaultValueSql("(getdate())");
- entity.Property(e => e.KouLing)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.LastErrTime).HasColumnType("datetime");
- entity.Property(e => e.LeiXing)
- .HasMaxLength(1)
- .IsUnicode(false)
- .IsFixedLength();
- entity.Property(e => e.QuanMing)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.YongHuMiaoShu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ZhuYe)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.ZhuangTai)
- .HasMaxLength(10)
- .IsUnicode(false);
- entity.HasMany(d => d.YongHuZus)
- .WithMany(p => p.YongHus)
- .UsingEntity<Dictionary<string, object>>(
- "TbYongHuGuanXi",
- l => l.HasOne<TbYongHu>().WithMany().HasForeignKey("YongHuZu").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FK_YongHuGuanXi1_YongHu"),
- r => r.HasOne<TbYongHu>().WithMany().HasForeignKey("YongHu").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FK_YongHuGuanXi2_YongHu"),
- j =>
- {
- j.HasKey("YongHuZu", "YongHu").HasName("PK_YongHuGuanXi");
- j.ToTable("tb_YongHuGuanXi");
- j.IndexerProperty<string>("YongHuZu").HasMaxLength(50).IsUnicode(false);
- j.IndexerProperty<string>("YongHu").HasMaxLength(50).IsUnicode(false);
- });
- entity.HasMany(d => d.YongHus)
- .WithMany(p => p.YongHuZus)
- .UsingEntity<Dictionary<string, object>>(
- "TbYongHuGuanXi",
- l => l.HasOne<TbYongHu>().WithMany().HasForeignKey("YongHu").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FK_YongHuGuanXi2_YongHu"),
- r => r.HasOne<TbYongHu>().WithMany().HasForeignKey("YongHuZu").OnDelete(DeleteBehavior.ClientSetNull).HasConstraintName("FK_YongHuGuanXi1_YongHu"),
- j =>
- {
- j.HasKey("YongHuZu", "YongHu").HasName("PK_YongHuGuanXi");
- j.ToTable("tb_YongHuGuanXi");
- j.IndexerProperty<string>("YongHuZu").HasMaxLength(50).IsUnicode(false);
- j.IndexerProperty<string>("YongHu").HasMaxLength(50).IsUnicode(false);
- });
- });
- modelBuilder.Entity<VwAidVideoChannel>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("vw_AidVideoChannel");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.ChanName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.ChanType)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.IdinPlat)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("IDinPlat");
- entity.Property(e => e.Ip)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("IP");
- entity.Property(e => e.IsPtz)
- .HasMaxLength(10)
- .IsUnicode(false)
- .HasColumnName("IsPTZ");
- entity.Property(e => e.Manufacturer)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.Model)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.UseState)
- .HasMaxLength(10)
- .IsUnicode(false);
- });
- modelBuilder.Entity<VwPresetPoint>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("vw_PresetPoint");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.ChanName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Comment)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DevId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("DevID");
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Ip)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("IP");
- entity.Property(e => e.PointId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("PointID");
- });
- modelBuilder.Entity<VwTableDataDup>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("vw_TableDataDup");
- entity.Property(e => e.DataDupCtgy)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.DataDupId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DataDupID");
- entity.Property(e => e.DstFullName)
- .HasMaxLength(408)
- .IsUnicode(false);
- entity.Property(e => e.DstTableName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.MapBeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.SrcFullName)
- .HasMaxLength(408)
- .IsUnicode(false);
- entity.Property(e => e.SrcTableName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.SrcWhereClause)
- .HasMaxLength(500)
- .IsUnicode(false);
- entity.Property(e => e.TableMapId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TableMapID");
- });
- modelBuilder.Entity<VwTableMap>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("vw_TableMap");
- entity.Property(e => e.BeiZhu)
- .HasMaxLength(255)
- .IsUnicode(false);
- entity.Property(e => e.DstFullName)
- .HasMaxLength(408)
- .IsUnicode(false);
- entity.Property(e => e.DstPrcname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("DstPRCName");
- entity.Property(e => e.DstTableCtgy)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.DstTableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("DstTableID");
- entity.Property(e => e.DstTableName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.MapCtgy)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.SrcFullName)
- .HasMaxLength(408)
- .IsUnicode(false);
- entity.Property(e => e.SrcPrcname)
- .HasMaxLength(255)
- .IsUnicode(false)
- .HasColumnName("SrcPRCName");
- entity.Property(e => e.SrcTableCtgy)
- .HasMaxLength(50)
- .IsUnicode(false);
- entity.Property(e => e.SrcTableId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("SrcTableID");
- entity.Property(e => e.SrcTableName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.TableMapId)
- .HasMaxLength(40)
- .IsUnicode(false)
- .HasColumnName("TableMapID");
- });
- modelBuilder.Entity<VwVideoChannelRight>(entity =>
- {
- entity.HasNoKey();
- entity.ToView("vw_VideoChannelRight");
- entity.Property(e => e.ChanId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("ChanID");
- entity.Property(e => e.ChanName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.DevName)
- .HasMaxLength(100)
- .IsUnicode(false);
- entity.Property(e => e.Ip)
- .HasMaxLength(30)
- .IsUnicode(false)
- .HasColumnName("IP");
- entity.Property(e => e.RecId)
- .HasMaxLength(38)
- .IsUnicode(false)
- .HasColumnName("RecID");
- entity.Property(e => e.RightName)
- .HasMaxLength(30)
- .IsUnicode(false);
- entity.Property(e => e.YongHuMing)
- .HasMaxLength(50)
- .IsUnicode(false);
- });
- OnModelCreatingPartial(modelBuilder);
- }
- }
- }
|