20211130071124_Init03.Designer.cs 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329
  1. // <auto-generated />
  2. using System;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore.Infrastructure;
  5. using Microsoft.EntityFrameworkCore.Migrations;
  6. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  7. using Ropin.Inspection.Model.Entities;
  8. namespace Ropin.Inspection.Model.Migrations
  9. {
  10. [DbContext(typeof(InspectionDbContext))]
  11. [Migration("20211130071124_Init03")]
  12. partial class Init03
  13. {
  14. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  15. {
  16. #pragma warning disable 612, 618
  17. modelBuilder
  18. .HasAnnotation("Relational:MaxIdentifierLength", 64)
  19. .HasAnnotation("ProductVersion", "5.0.4");
  20. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_Area", b =>
  21. {
  22. b.Property<string>("C_Code")
  23. .HasMaxLength(20)
  24. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  25. b.Property<string>("C_CityCode")
  26. .IsRequired()
  27. .HasMaxLength(20)
  28. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  29. b.Property<string>("C_Name")
  30. .IsRequired()
  31. .HasMaxLength(50)
  32. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  33. b.Property<string>("C_Status")
  34. .IsRequired()
  35. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  36. b.Property<int?>("I_Sort")
  37. .HasColumnType("int");
  38. b.HasKey("C_Code");
  39. b.HasIndex("C_CityCode");
  40. b.ToTable("TBDM_Area");
  41. });
  42. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_City", b =>
  43. {
  44. b.Property<string>("C_Code")
  45. .HasMaxLength(20)
  46. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  47. b.Property<string>("C_Name")
  48. .IsRequired()
  49. .HasMaxLength(50)
  50. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  51. b.Property<string>("C_ProvCode")
  52. .IsRequired()
  53. .HasMaxLength(20)
  54. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  55. b.Property<string>("C_Status")
  56. .IsRequired()
  57. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  58. b.Property<int?>("I_Sort")
  59. .HasColumnType("int");
  60. b.HasKey("C_Code");
  61. b.HasIndex("C_ProvCode");
  62. b.ToTable("TBDM_City");
  63. });
  64. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_CodeDetail", b =>
  65. {
  66. b.Property<string>("C_Code")
  67. .HasMaxLength(50)
  68. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  69. b.Property<Guid>("C_CreateBy")
  70. .HasColumnType("char(36)");
  71. b.Property<string>("C_Default")
  72. .IsRequired()
  73. .HasMaxLength(1)
  74. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  75. b.Property<string>("C_IsSys")
  76. .IsRequired()
  77. .HasMaxLength(1)
  78. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  79. b.Property<Guid?>("C_LastUpdatedBy")
  80. .HasColumnType("char(36)");
  81. b.Property<string>("C_MainCode")
  82. .IsRequired()
  83. .HasMaxLength(50)
  84. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  85. b.Property<string>("C_Name")
  86. .IsRequired()
  87. .HasMaxLength(50)
  88. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  89. b.Property<string>("C_Remark")
  90. .HasMaxLength(500)
  91. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  92. b.Property<string>("C_Status")
  93. .IsRequired()
  94. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  95. b.Property<string>("C_Value")
  96. .IsRequired()
  97. .HasMaxLength(255)
  98. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  99. b.Property<DateTime>("D_CreateOn")
  100. .HasColumnType("datetime(6)");
  101. b.Property<DateTime?>("D_LastUpdatedOn")
  102. .HasColumnType("datetime(6)");
  103. b.Property<int?>("I_Sort")
  104. .HasColumnType("int");
  105. b.HasKey("C_Code");
  106. b.HasIndex("C_CreateBy");
  107. b.HasIndex("C_LastUpdatedBy");
  108. b.ToTable("TBDM_CodeDetail");
  109. });
  110. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_CodeMain", b =>
  111. {
  112. b.Property<string>("C_Code")
  113. .HasMaxLength(50)
  114. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  115. b.Property<Guid>("C_CreateBy")
  116. .HasColumnType("char(36)");
  117. b.Property<Guid?>("C_LastUpdatedBy")
  118. .HasColumnType("char(36)");
  119. b.Property<string>("C_Name")
  120. .IsRequired()
  121. .HasMaxLength(50)
  122. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  123. b.Property<string>("C_Remark")
  124. .HasMaxLength(500)
  125. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  126. b.Property<string>("C_Status")
  127. .IsRequired()
  128. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  129. b.Property<DateTime>("D_CreateOn")
  130. .HasColumnType("datetime(6)");
  131. b.Property<DateTime?>("D_LastUpdatedOn")
  132. .HasColumnType("datetime(6)");
  133. b.Property<int?>("I_Sort")
  134. .HasColumnType("int");
  135. b.HasKey("C_Code");
  136. b.HasIndex("C_CreateBy");
  137. b.HasIndex("C_LastUpdatedBy");
  138. b.ToTable("TBDM_CodeMain");
  139. });
  140. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_Prov", b =>
  141. {
  142. b.Property<string>("C_Code")
  143. .HasMaxLength(20)
  144. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  145. b.Property<string>("C_Name")
  146. .IsRequired()
  147. .HasMaxLength(50)
  148. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  149. b.Property<string>("C_Status")
  150. .IsRequired()
  151. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  152. b.Property<int?>("I_Sort")
  153. .HasColumnType("int");
  154. b.HasKey("C_Code");
  155. b.ToTable("TBDM_Prov");
  156. });
  157. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevAlert", b =>
  158. {
  159. b.Property<Guid>("C_ID")
  160. .ValueGeneratedOnAdd()
  161. .HasColumnType("char(36)");
  162. b.Property<string>("C_ConfigCode")
  163. .IsRequired()
  164. .HasMaxLength(50)
  165. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  166. b.Property<string>("C_DeviceCode")
  167. .IsRequired()
  168. .HasMaxLength(50)
  169. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  170. b.Property<string>("C_Value")
  171. .IsRequired()
  172. .HasMaxLength(100)
  173. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  174. b.Property<DateTime>("D_CreateOn")
  175. .HasColumnType("datetime(6)");
  176. b.HasKey("C_ID");
  177. b.ToTable("TDEV_DevAlert");
  178. });
  179. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevAlertConfig", b =>
  180. {
  181. b.Property<string>("C_Code")
  182. .HasMaxLength(50)
  183. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  184. b.Property<Guid>("C_CreateBy")
  185. .HasColumnType("char(36)");
  186. b.Property<Guid?>("C_LastUpdatedBy")
  187. .HasColumnType("char(36)");
  188. b.Property<string>("C_Name")
  189. .IsRequired()
  190. .HasMaxLength(50)
  191. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  192. b.Property<string>("C_Remark")
  193. .HasMaxLength(1024)
  194. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  195. b.Property<string>("C_Status")
  196. .IsRequired()
  197. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  198. b.Property<DateTime>("D_CreateOn")
  199. .HasColumnType("datetime(6)");
  200. b.Property<DateTime?>("D_LastUpdatedOn")
  201. .HasColumnType("datetime(6)");
  202. b.HasKey("C_Code");
  203. b.HasIndex("C_CreateBy");
  204. b.HasIndex("C_LastUpdatedBy");
  205. b.ToTable("TDEV_DevAlertConfig");
  206. });
  207. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevData", b =>
  208. {
  209. b.Property<Guid>("C_ID")
  210. .ValueGeneratedOnAdd()
  211. .HasColumnType("char(36)");
  212. b.Property<string>("C_ConfigCode")
  213. .IsRequired()
  214. .HasMaxLength(50)
  215. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  216. b.Property<string>("C_DeviceCode")
  217. .IsRequired()
  218. .HasMaxLength(50)
  219. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  220. b.Property<string>("C_Value")
  221. .IsRequired()
  222. .HasMaxLength(50)
  223. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  224. b.Property<DateTime>("D_CreateOn")
  225. .HasColumnType("datetime(6)");
  226. b.HasKey("C_ID");
  227. b.ToTable("TDEV_DevData");
  228. });
  229. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevDataConfig", b =>
  230. {
  231. b.Property<string>("C_Code")
  232. .HasMaxLength(50)
  233. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  234. b.Property<Guid>("C_CreateBy")
  235. .HasColumnType("char(36)");
  236. b.Property<Guid?>("C_LastUpdatedBy")
  237. .HasColumnType("char(36)");
  238. b.Property<string>("C_Name")
  239. .IsRequired()
  240. .HasMaxLength(50)
  241. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  242. b.Property<string>("C_Remark")
  243. .HasMaxLength(1024)
  244. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  245. b.Property<string>("C_Status")
  246. .IsRequired()
  247. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  248. b.Property<DateTime>("D_CreateOn")
  249. .HasColumnType("datetime(6)");
  250. b.Property<DateTime?>("D_LastUpdatedOn")
  251. .HasColumnType("datetime(6)");
  252. b.Property<int>("I_Interval")
  253. .HasColumnType("int");
  254. b.HasKey("C_Code");
  255. b.HasIndex("C_CreateBy");
  256. b.HasIndex("C_LastUpdatedBy");
  257. b.ToTable("TDEV_DevDataConfig");
  258. });
  259. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_Device", b =>
  260. {
  261. b.Property<Guid>("C_Code")
  262. .ValueGeneratedOnAdd()
  263. .HasColumnType("char(36)");
  264. b.Property<Guid>("C_CreateBy")
  265. .HasColumnType("char(36)");
  266. b.Property<Guid?>("C_LastUpdatedBy")
  267. .HasColumnType("char(36)");
  268. b.Property<string>("C_MachineCode")
  269. .HasMaxLength(255)
  270. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  271. b.Property<Guid>("C_ProductCode")
  272. .HasColumnType("char(36)");
  273. b.Property<string>("C_Remark")
  274. .HasMaxLength(1024)
  275. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  276. b.Property<string>("C_Status")
  277. .IsRequired()
  278. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  279. b.Property<DateTime>("D_CreateOn")
  280. .HasColumnType("datetime(6)");
  281. b.Property<DateTime?>("D_LastUpdatedOn")
  282. .HasColumnType("datetime(6)");
  283. b.HasKey("C_Code");
  284. b.HasIndex("C_CreateBy");
  285. b.HasIndex("C_LastUpdatedBy");
  286. b.HasIndex("C_ProductCode");
  287. b.ToTable("TDEV_Device");
  288. });
  289. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Content", b =>
  290. {
  291. b.Property<Guid>("C_ID")
  292. .ValueGeneratedOnAdd()
  293. .HasColumnType("char(36)");
  294. b.Property<string>("C_AlarmLevel")
  295. .IsRequired()
  296. .HasMaxLength(1)
  297. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  298. b.Property<Guid>("C_CreateBy")
  299. .HasColumnType("char(36)");
  300. b.Property<Guid?>("C_LastUpdatedBy")
  301. .HasColumnType("char(36)");
  302. b.Property<string>("C_Name")
  303. .IsRequired()
  304. .HasMaxLength(50)
  305. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  306. b.Property<string>("C_Remark")
  307. .HasMaxLength(500)
  308. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  309. b.Property<string>("C_Status")
  310. .IsRequired()
  311. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  312. b.Property<string>("C_StoreCode")
  313. .IsRequired()
  314. .HasMaxLength(50)
  315. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  316. b.Property<DateTime>("D_CreateOn")
  317. .HasColumnType("datetime(6)");
  318. b.Property<DateTime?>("D_LastUpdatedOn")
  319. .HasColumnType("datetime(6)");
  320. b.HasKey("C_ID");
  321. b.HasIndex("C_CreateBy");
  322. b.HasIndex("C_LastUpdatedBy");
  323. b.ToTable("TISP_Content");
  324. });
  325. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroup", b =>
  326. {
  327. b.Property<Guid>("G_ID")
  328. .ValueGeneratedOnAdd()
  329. .HasColumnType("char(36)");
  330. b.Property<string>("C_Name")
  331. .IsRequired()
  332. .HasMaxLength(50)
  333. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  334. b.Property<string>("C_PatrolItem")
  335. .HasMaxLength(50)
  336. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  337. b.Property<string>("C_Remark")
  338. .HasMaxLength(500)
  339. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  340. b.Property<string>("C_Status")
  341. .IsRequired()
  342. .HasMaxLength(1)
  343. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  344. b.Property<string>("C_StoreCode")
  345. .IsRequired()
  346. .HasMaxLength(50)
  347. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  348. b.Property<DateTime>("D_CreateOn")
  349. .HasColumnType("datetime(6)");
  350. b.Property<DateTime?>("D_LastUpdatedOn")
  351. .HasColumnType("datetime(6)");
  352. b.Property<Guid>("G_CreateBy")
  353. .HasColumnType("char(36)");
  354. b.Property<Guid?>("G_LastUpdatedBy")
  355. .HasColumnType("char(36)");
  356. b.Property<int>("I_Sort")
  357. .HasColumnType("int");
  358. b.Property<int>("I_Type")
  359. .HasColumnType("int");
  360. b.HasKey("G_ID");
  361. b.HasIndex("G_CreateBy");
  362. b.HasIndex("G_LastUpdatedBy");
  363. b.ToTable("TISP_ContentGroup");
  364. });
  365. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroupItem", b =>
  366. {
  367. b.Property<Guid>("G_ID")
  368. .ValueGeneratedOnAdd()
  369. .HasColumnType("char(36)");
  370. b.Property<Guid>("G_ContentCode")
  371. .HasColumnType("char(36)");
  372. b.Property<Guid>("G_ContentGroupCode")
  373. .HasColumnType("char(36)");
  374. b.HasKey("G_ID");
  375. b.HasIndex("G_ContentCode");
  376. b.HasIndex("G_ContentGroupCode");
  377. b.ToTable("TISP_ContentGroupItem");
  378. });
  379. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Record", b =>
  380. {
  381. b.Property<Guid>("C_ID")
  382. .ValueGeneratedOnAdd()
  383. .HasColumnType("char(36)");
  384. b.Property<Guid>("C_CreateBy")
  385. .HasColumnType("char(36)");
  386. b.Property<Guid>("C_LastUpdatedBy")
  387. .HasColumnType("char(36)");
  388. b.Property<Guid>("C_SpotCode")
  389. .HasColumnType("char(36)");
  390. b.Property<string>("C_Status")
  391. .IsRequired()
  392. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  393. b.Property<DateTime>("D_CreateOn")
  394. .HasColumnType("datetime(6)");
  395. b.Property<DateTime>("D_LastUpdatedOn")
  396. .HasColumnType("datetime(6)");
  397. b.HasKey("C_ID");
  398. b.HasIndex("C_CreateBy");
  399. b.HasIndex("C_LastUpdatedBy");
  400. b.HasIndex("C_SpotCode");
  401. b.ToTable("TISP_Record");
  402. });
  403. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordAlarm", b =>
  404. {
  405. b.Property<Guid>("C_ID")
  406. .ValueGeneratedOnAdd()
  407. .HasColumnType("char(36)");
  408. b.Property<Guid>("C_InspectionRecordCode")
  409. .HasColumnType("char(36)");
  410. b.Property<Guid>("C_SpotContentCode")
  411. .HasColumnType("char(36)");
  412. b.Property<string>("C_Status")
  413. .IsRequired()
  414. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  415. b.HasKey("C_ID");
  416. b.ToTable("TISP_RecordAlarm");
  417. });
  418. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordImage", b =>
  419. {
  420. b.Property<Guid>("C_ID")
  421. .ValueGeneratedOnAdd()
  422. .HasColumnType("char(36)");
  423. b.Property<string>("C_ImageURL")
  424. .IsRequired()
  425. .HasMaxLength(200)
  426. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  427. b.Property<Guid>("C_RecordItemCode")
  428. .HasColumnType("char(36)");
  429. b.Property<string>("C_Status")
  430. .IsRequired()
  431. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  432. b.HasKey("C_ID");
  433. b.HasIndex("C_RecordItemCode");
  434. b.ToTable("TISP_RecordImage");
  435. });
  436. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordItem", b =>
  437. {
  438. b.Property<Guid>("C_ID")
  439. .ValueGeneratedOnAdd()
  440. .HasColumnType("char(36)");
  441. b.Property<Guid>("C_ContentCode")
  442. .HasColumnType("char(36)");
  443. b.Property<Guid>("C_CreateBy")
  444. .HasMaxLength(50)
  445. .HasColumnType("char(50)");
  446. b.Property<string>("C_InspectionContent")
  447. .HasColumnType("longtext CHARACTER SET utf8mb4");
  448. b.Property<Guid>("C_LastUpdatedBy")
  449. .HasMaxLength(50)
  450. .HasColumnType("char(50)");
  451. b.Property<Guid>("C_RecordCode")
  452. .HasColumnType("char(36)");
  453. b.Property<string>("C_Remark")
  454. .HasColumnType("longtext CHARACTER SET utf8mb4");
  455. b.Property<string>("C_Status")
  456. .IsRequired()
  457. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  458. b.Property<DateTime>("D_CreateOn")
  459. .HasColumnType("datetime(6)");
  460. b.Property<DateTime>("D_LastUpdatedOn")
  461. .HasColumnType("datetime(6)");
  462. b.HasKey("C_ID");
  463. b.HasIndex("C_ContentCode");
  464. b.HasIndex("C_CreateBy");
  465. b.HasIndex("C_LastUpdatedBy");
  466. b.HasIndex("C_RecordCode");
  467. b.ToTable("TISP_RecordItem");
  468. });
  469. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Region", b =>
  470. {
  471. b.Property<Guid>("C_ID")
  472. .ValueGeneratedOnAdd()
  473. .HasColumnType("char(36)");
  474. b.Property<Guid>("C_CreateBy")
  475. .HasMaxLength(50)
  476. .HasColumnType("char(50)");
  477. b.Property<string>("C_ImageUrl")
  478. .HasMaxLength(100)
  479. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  480. b.Property<Guid>("C_LastUpdatedBy")
  481. .HasMaxLength(50)
  482. .HasColumnType("char(50)");
  483. b.Property<string>("C_Name")
  484. .IsRequired()
  485. .HasMaxLength(50)
  486. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  487. b.Property<string>("C_Remark")
  488. .HasMaxLength(500)
  489. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  490. b.Property<string>("C_Status")
  491. .IsRequired()
  492. .HasMaxLength(1)
  493. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  494. b.Property<DateTime>("D_CreateOn")
  495. .HasColumnType("datetime(6)");
  496. b.Property<DateTime>("D_LastUpdatedOn")
  497. .HasColumnType("datetime(6)");
  498. b.HasKey("C_ID");
  499. b.HasIndex("C_CreateBy");
  500. b.HasIndex("C_LastUpdatedBy");
  501. b.ToTable("TISP_Region");
  502. });
  503. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Report", b =>
  504. {
  505. b.Property<Guid>("G_ID")
  506. .ValueGeneratedOnAdd()
  507. .HasColumnType("char(36)");
  508. b.Property<string>("C_Data")
  509. .HasColumnType("longtext CHARACTER SET utf8mb4");
  510. b.Property<string>("C_GroupName")
  511. .HasMaxLength(50)
  512. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  513. b.Property<string>("C_Name")
  514. .IsRequired()
  515. .HasMaxLength(50)
  516. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  517. b.Property<string>("C_Remark")
  518. .HasMaxLength(500)
  519. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  520. b.Property<string>("C_Status")
  521. .IsRequired()
  522. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  523. b.Property<Guid>("C_StoreCode")
  524. .HasColumnType("char(36)");
  525. b.Property<DateTime?>("D_CreateTime")
  526. .HasColumnType("datetime(6)");
  527. b.Property<DateTime?>("D_End")
  528. .HasColumnType("datetime(6)");
  529. b.Property<DateTime?>("D_Start")
  530. .HasColumnType("datetime(6)");
  531. b.Property<int>("I_Type")
  532. .HasColumnType("int");
  533. b.HasKey("G_ID");
  534. b.ToTable("Report");
  535. });
  536. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Route", b =>
  537. {
  538. b.Property<Guid>("C_ID")
  539. .ValueGeneratedOnAdd()
  540. .HasColumnType("char(36)");
  541. b.Property<Guid>("C_CreateBy")
  542. .HasMaxLength(50)
  543. .HasColumnType("char(50)");
  544. b.Property<string>("C_ImageUrl")
  545. .HasMaxLength(100)
  546. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  547. b.Property<Guid>("C_LastUpdatedBy")
  548. .HasMaxLength(50)
  549. .HasColumnType("char(50)");
  550. b.Property<string>("C_Name")
  551. .IsRequired()
  552. .HasMaxLength(50)
  553. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  554. b.Property<string>("C_Remark")
  555. .HasMaxLength(500)
  556. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  557. b.Property<string>("C_Status")
  558. .IsRequired()
  559. .HasMaxLength(1)
  560. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  561. b.Property<DateTime>("D_CreateOn")
  562. .HasColumnType("datetime(6)");
  563. b.Property<DateTime>("D_LastUpdatedOn")
  564. .HasColumnType("datetime(6)");
  565. b.HasKey("C_ID");
  566. b.HasIndex("C_CreateBy");
  567. b.HasIndex("C_LastUpdatedBy");
  568. b.ToTable("TISP_Route");
  569. });
  570. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Spot", b =>
  571. {
  572. b.Property<Guid>("C_Code")
  573. .ValueGeneratedOnAdd()
  574. .HasColumnType("char(36)");
  575. b.Property<string>("C_AreaCode")
  576. .HasMaxLength(50)
  577. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  578. b.Property<Guid>("C_CreateBy")
  579. .HasMaxLength(50)
  580. .HasColumnType("char(50)");
  581. b.Property<string>("C_GPS")
  582. .HasMaxLength(50)
  583. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  584. b.Property<string>("C_ImageUrl")
  585. .HasMaxLength(100)
  586. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  587. b.Property<Guid>("C_LastUpdatedBy")
  588. .HasMaxLength(50)
  589. .HasColumnType("char(50)");
  590. b.Property<string>("C_Name")
  591. .IsRequired()
  592. .HasMaxLength(50)
  593. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  594. b.Property<string>("C_Number")
  595. .IsRequired()
  596. .HasMaxLength(50)
  597. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  598. b.Property<string>("C_Position")
  599. .HasMaxLength(100)
  600. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  601. b.Property<string>("C_QRCode")
  602. .HasMaxLength(100)
  603. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  604. b.Property<string>("C_Remark")
  605. .HasMaxLength(500)
  606. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  607. b.Property<string>("C_Status")
  608. .IsRequired()
  609. .HasMaxLength(1)
  610. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  611. b.Property<string>("C_StoreCode")
  612. .IsRequired()
  613. .HasMaxLength(50)
  614. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  615. b.Property<DateTime>("D_CreateOn")
  616. .HasColumnType("datetime(6)");
  617. b.Property<DateTime>("D_LastUpdatedOn")
  618. .HasColumnType("datetime(6)");
  619. b.Property<decimal?>("F_Map_X")
  620. .HasColumnType("decimal(12,2)");
  621. b.Property<decimal?>("F_Map_Y")
  622. .HasColumnType("decimal(12,2)");
  623. b.Property<int>("I_Offset")
  624. .HasColumnType("int");
  625. b.HasKey("C_Code");
  626. b.HasIndex("C_CreateBy");
  627. b.HasIndex("C_LastUpdatedBy");
  628. b.ToTable("TISP_Spot");
  629. });
  630. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotContent", b =>
  631. {
  632. b.Property<Guid>("C_ID")
  633. .ValueGeneratedOnAdd()
  634. .HasColumnType("char(36)");
  635. b.Property<Guid>("C_ContentCode")
  636. .HasColumnType("char(36)");
  637. b.Property<Guid>("C_CreateBy")
  638. .HasColumnType("char(36)");
  639. b.Property<string>("C_Remark")
  640. .HasMaxLength(500)
  641. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  642. b.Property<Guid>("C_SpotCode")
  643. .HasColumnType("char(36)");
  644. b.Property<DateTime>("D_CreateOn")
  645. .HasColumnType("datetime(6)");
  646. b.HasKey("C_ID");
  647. b.HasIndex("C_CreateBy");
  648. b.HasIndex("C_ContentCode", "C_SpotCode")
  649. .IsUnique();
  650. b.ToTable("TISP_SpotContent");
  651. });
  652. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRegion", b =>
  653. {
  654. b.Property<Guid>("C_ID")
  655. .ValueGeneratedOnAdd()
  656. .HasColumnType("char(36)");
  657. b.Property<Guid>("C_CreateBy")
  658. .HasColumnType("char(36)");
  659. b.Property<Guid>("C_LastUpdatedBy")
  660. .HasColumnType("char(36)");
  661. b.Property<Guid>("C_RegionCode")
  662. .HasColumnType("char(36)");
  663. b.Property<string>("C_Remark")
  664. .HasMaxLength(500)
  665. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  666. b.Property<Guid>("C_SpotCode")
  667. .HasColumnType("char(36)");
  668. b.Property<string>("C_Status")
  669. .IsRequired()
  670. .HasMaxLength(1)
  671. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  672. b.Property<DateTime>("D_CreateOn")
  673. .HasColumnType("datetime(6)");
  674. b.Property<DateTime>("D_LastUpdatedOn")
  675. .HasColumnType("datetime(6)");
  676. b.HasKey("C_ID");
  677. b.HasIndex("C_CreateBy");
  678. b.HasIndex("C_LastUpdatedBy");
  679. b.HasIndex("C_RegionCode");
  680. b.HasIndex("C_SpotCode");
  681. b.ToTable("TISP_SpotRegion");
  682. });
  683. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRoute", b =>
  684. {
  685. b.Property<Guid>("C_ID")
  686. .ValueGeneratedOnAdd()
  687. .HasColumnType("char(36)");
  688. b.Property<Guid>("C_CreateBy")
  689. .HasColumnType("char(36)");
  690. b.Property<Guid>("C_LastUpdatedBy")
  691. .HasColumnType("char(36)");
  692. b.Property<string>("C_Remark")
  693. .HasMaxLength(500)
  694. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  695. b.Property<Guid>("C_RouteCode")
  696. .HasColumnType("char(36)");
  697. b.Property<Guid>("C_SpotCode")
  698. .HasColumnType("char(36)");
  699. b.Property<string>("C_Status")
  700. .IsRequired()
  701. .HasMaxLength(1)
  702. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  703. b.Property<DateTime>("D_CreateOn")
  704. .HasColumnType("datetime(6)");
  705. b.Property<DateTime>("D_LastUpdatedOn")
  706. .HasColumnType("datetime(6)");
  707. b.HasKey("C_ID");
  708. b.HasIndex("C_CreateBy");
  709. b.HasIndex("C_LastUpdatedBy");
  710. b.HasIndex("C_RouteCode");
  711. b.HasIndex("C_SpotCode");
  712. b.ToTable("TISP_SpotRoute");
  713. });
  714. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotUser", b =>
  715. {
  716. b.Property<Guid>("C_ID")
  717. .ValueGeneratedOnAdd()
  718. .HasColumnType("char(36)");
  719. b.Property<Guid>("C_CreateBy")
  720. .HasColumnType("char(36)");
  721. b.Property<string>("C_Remark")
  722. .HasMaxLength(500)
  723. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  724. b.Property<Guid>("C_SpotCode")
  725. .HasColumnType("char(36)");
  726. b.Property<Guid>("C_UserCode")
  727. .HasColumnType("char(36)");
  728. b.Property<DateTime>("D_CreateOn")
  729. .HasColumnType("datetime(6)");
  730. b.HasKey("C_ID");
  731. b.HasIndex("C_CreateBy");
  732. b.HasIndex("C_SpotCode");
  733. b.HasIndex("C_UserCode", "C_SpotCode")
  734. .IsUnique();
  735. b.ToTable("TISP_SpotUser");
  736. });
  737. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Area", b =>
  738. {
  739. b.Property<Guid>("C_Code")
  740. .ValueGeneratedOnAdd()
  741. .HasColumnType("char(36)");
  742. b.Property<Guid>("C_CreateBy")
  743. .HasColumnType("char(36)");
  744. b.Property<string>("C_ImageUrl")
  745. .HasMaxLength(255)
  746. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  747. b.Property<Guid?>("C_LastUpdatedBy")
  748. .HasColumnType("char(36)");
  749. b.Property<string>("C_Name")
  750. .IsRequired()
  751. .HasMaxLength(255)
  752. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  753. b.Property<string>("C_Remark")
  754. .HasMaxLength(1024)
  755. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  756. b.Property<string>("C_SName")
  757. .HasMaxLength(16)
  758. .HasColumnType("varchar(16) CHARACTER SET utf8mb4");
  759. b.Property<string>("C_Status")
  760. .IsRequired()
  761. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  762. b.Property<Guid>("C_StoreCode")
  763. .HasColumnType("char(36)");
  764. b.Property<DateTime>("D_CreateOn")
  765. .HasColumnType("datetime(6)");
  766. b.Property<DateTime?>("D_LastUpdatedOn")
  767. .HasColumnType("datetime(6)");
  768. b.Property<int?>("I_Sort")
  769. .HasColumnType("int");
  770. b.HasKey("C_Code");
  771. b.HasIndex("C_CreateBy");
  772. b.HasIndex("C_LastUpdatedBy");
  773. b.HasIndex("C_StoreCode");
  774. b.ToTable("TPNT_Area");
  775. });
  776. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Store", b =>
  777. {
  778. b.Property<Guid>("C_ID")
  779. .ValueGeneratedOnAdd()
  780. .HasColumnType("char(36)");
  781. b.Property<string>("C_Address")
  782. .HasMaxLength(500)
  783. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  784. b.Property<string>("C_AreaCode")
  785. .HasMaxLength(50)
  786. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  787. b.Property<string>("C_Code")
  788. .IsRequired()
  789. .HasMaxLength(50)
  790. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  791. b.Property<Guid>("C_CreateBy")
  792. .HasColumnType("char(36)");
  793. b.Property<string>("C_GPS")
  794. .HasMaxLength(500)
  795. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  796. b.Property<Guid?>("C_LastUpdatedBy")
  797. .HasColumnType("char(36)");
  798. b.Property<string>("C_LicenseCode")
  799. .IsRequired()
  800. .HasMaxLength(50)
  801. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  802. b.Property<string>("C_Name")
  803. .IsRequired()
  804. .HasMaxLength(255)
  805. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  806. b.Property<string>("C_Remark")
  807. .HasMaxLength(1024)
  808. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  809. b.Property<string>("C_SName")
  810. .HasMaxLength(16)
  811. .HasColumnType("varchar(16) CHARACTER SET utf8mb4");
  812. b.Property<string>("C_Status")
  813. .IsRequired()
  814. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  815. b.Property<Guid>("C_TypeCode")
  816. .HasColumnType("char(36)");
  817. b.Property<DateTime>("D_CreateOn")
  818. .HasColumnType("datetime(6)");
  819. b.Property<DateTime?>("D_LastUpdatedOn")
  820. .HasColumnType("datetime(6)");
  821. b.Property<int>("I_Sort")
  822. .HasColumnType("int");
  823. b.Property<Guid?>("LicenseC_ID")
  824. .HasColumnType("char(36)");
  825. b.Property<Guid?>("StoreOrgC_OrgCode")
  826. .HasColumnType("char(36)");
  827. b.Property<string>("StoreOrgC_StoreCode")
  828. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  829. b.HasKey("C_ID");
  830. b.HasIndex("C_AreaCode");
  831. b.HasIndex("C_Code")
  832. .IsUnique();
  833. b.HasIndex("C_CreateBy");
  834. b.HasIndex("C_LastUpdatedBy");
  835. b.HasIndex("C_TypeCode");
  836. b.HasIndex("LicenseC_ID");
  837. b.HasIndex("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");
  838. b.ToTable("TPNT_Store");
  839. });
  840. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", b =>
  841. {
  842. b.Property<string>("C_StoreCode")
  843. .HasMaxLength(50)
  844. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  845. b.Property<Guid>("C_OrgCode")
  846. .HasColumnType("char(36)");
  847. b.Property<Guid>("C_CreateBy")
  848. .HasColumnType("char(36)");
  849. b.Property<DateTime>("D_CreateOn")
  850. .HasColumnType("datetime(6)");
  851. b.HasKey("C_StoreCode", "C_OrgCode");
  852. b.HasIndex("C_CreateBy");
  853. b.ToTable("TPNT_StoreOrg");
  854. });
  855. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Type", b =>
  856. {
  857. b.Property<Guid>("C_Code")
  858. .ValueGeneratedOnAdd()
  859. .HasColumnType("char(36)");
  860. b.Property<string>("C_Name")
  861. .IsRequired()
  862. .HasMaxLength(50)
  863. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  864. b.Property<string>("C_Status")
  865. .IsRequired()
  866. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  867. b.Property<int?>("I_Sort")
  868. .HasColumnType("int");
  869. b.HasKey("C_Code");
  870. b.ToTable("TPNT_Type");
  871. });
  872. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Log", b =>
  873. {
  874. b.Property<Guid>("C_Code")
  875. .ValueGeneratedOnAdd()
  876. .HasColumnType("char(36)");
  877. b.Property<string>("C_AlarmMsg")
  878. .HasMaxLength(1024)
  879. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  880. b.Property<Guid>("C_CreateBy")
  881. .HasColumnType("char(36)");
  882. b.Property<string>("C_DeviceCode")
  883. .HasMaxLength(50)
  884. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  885. b.Property<Guid>("C_ProductCode")
  886. .HasColumnType("char(36)");
  887. b.Property<string>("C_Remark")
  888. .HasMaxLength(1024)
  889. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  890. b.Property<string>("C_SpotCode")
  891. .HasMaxLength(50)
  892. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  893. b.Property<string>("C_StoreCode")
  894. .IsRequired()
  895. .HasMaxLength(50)
  896. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  897. b.Property<DateTime>("D_CreateOn")
  898. .HasColumnType("datetime(6)");
  899. b.Property<int>("I_Type")
  900. .HasColumnType("int");
  901. b.HasKey("C_Code");
  902. b.HasIndex("C_CreateBy");
  903. b.HasIndex("C_ProductCode");
  904. b.ToTable("TPRD_Log");
  905. });
  906. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_ProdSKU", b =>
  907. {
  908. b.Property<string>("C_SKUCode")
  909. .HasMaxLength(100)
  910. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  911. b.Property<string>("C_Brand")
  912. .HasMaxLength(100)
  913. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  914. b.Property<Guid>("C_CreateBy")
  915. .HasColumnType("char(36)");
  916. b.Property<string>("C_IconPath")
  917. .HasMaxLength(500)
  918. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  919. b.Property<string>("C_ImagePath")
  920. .HasMaxLength(500)
  921. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  922. b.Property<Guid?>("C_LastUpdatedBy")
  923. .HasColumnType("char(36)");
  924. b.Property<string>("C_Name")
  925. .IsRequired()
  926. .HasMaxLength(255)
  927. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  928. b.Property<string>("C_ProdArea")
  929. .HasMaxLength(50)
  930. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  931. b.Property<string>("C_Remark")
  932. .HasMaxLength(1024)
  933. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  934. b.Property<string>("C_Spec")
  935. .HasMaxLength(500)
  936. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  937. b.Property<string>("C_Status")
  938. .IsRequired()
  939. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  940. b.Property<Guid>("C_TypeCode")
  941. .HasColumnType("char(36)");
  942. b.Property<string>("C_Unit")
  943. .HasMaxLength(50)
  944. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  945. b.Property<string>("C_Vender")
  946. .HasMaxLength(255)
  947. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  948. b.Property<DateTime>("D_CreateOn")
  949. .HasColumnType("datetime(6)");
  950. b.Property<DateTime?>("D_LastUpdatedOn")
  951. .HasColumnType("datetime(6)");
  952. b.Property<int?>("I_AlarmDays")
  953. .HasColumnType("int");
  954. b.Property<int>("I_MinStock")
  955. .HasColumnType("int");
  956. b.Property<int?>("I_Sort")
  957. .HasColumnType("int");
  958. b.Property<int?>("I_ValiDays")
  959. .HasColumnType("int");
  960. b.HasKey("C_SKUCode");
  961. b.HasIndex("C_CreateBy");
  962. b.HasIndex("C_LastUpdatedBy");
  963. b.HasIndex("C_TypeCode");
  964. b.ToTable("TPRD_ProdSKU");
  965. });
  966. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Product", b =>
  967. {
  968. b.Property<Guid>("C_Code")
  969. .ValueGeneratedOnAdd()
  970. .HasColumnType("char(36)");
  971. b.Property<string>("C_AlarmMsg")
  972. .HasMaxLength(1024)
  973. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  974. b.Property<string>("C_AreaCode")
  975. .HasMaxLength(50)
  976. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  977. b.Property<Guid>("C_CreateBy")
  978. .HasColumnType("char(36)");
  979. b.Property<Guid>("C_DeviceCode")
  980. .HasColumnType("char(36)");
  981. b.Property<string>("C_ImageUrl")
  982. .HasMaxLength(255)
  983. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  984. b.Property<Guid?>("C_LastUpdatedBy")
  985. .HasColumnType("char(36)");
  986. b.Property<string>("C_QRCode")
  987. .IsRequired()
  988. .HasMaxLength(255)
  989. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  990. b.Property<string>("C_Remark")
  991. .HasMaxLength(1024)
  992. .HasColumnType("varchar(1024) CHARACTER SET utf8mb4");
  993. b.Property<string>("C_SKUCode")
  994. .IsRequired()
  995. .HasMaxLength(100)
  996. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  997. b.Property<string>("C_SpotCode")
  998. .HasMaxLength(50)
  999. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1000. b.Property<string>("C_StoreCode")
  1001. .IsRequired()
  1002. .HasMaxLength(50)
  1003. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1004. b.Property<DateTime>("D_CreateOn")
  1005. .HasColumnType("datetime(6)");
  1006. b.Property<DateTime?>("D_LastISP")
  1007. .HasColumnType("datetime(6)");
  1008. b.Property<DateTime?>("D_LastUpdatedOn")
  1009. .HasColumnType("datetime(6)");
  1010. b.Property<DateTime?>("D_ProdDate")
  1011. .HasColumnType("datetime(6)");
  1012. b.Property<DateTime?>("D_ValiDate")
  1013. .HasColumnType("datetime(6)");
  1014. b.Property<decimal?>("F_Map_X")
  1015. .HasColumnType("decimal(12,2)");
  1016. b.Property<decimal?>("F_Map_Y")
  1017. .HasColumnType("decimal(12,2)");
  1018. b.Property<int?>("I_IsAlarm")
  1019. .HasColumnType("int");
  1020. b.Property<int?>("I_Sort")
  1021. .HasColumnType("int");
  1022. b.Property<int>("I_Status")
  1023. .HasColumnType("int");
  1024. b.HasKey("C_Code");
  1025. b.HasIndex("C_CreateBy");
  1026. b.HasIndex("C_DeviceCode");
  1027. b.HasIndex("C_LastUpdatedBy");
  1028. b.HasIndex("C_SKUCode");
  1029. b.ToTable("TPRD_Product");
  1030. });
  1031. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Type", b =>
  1032. {
  1033. b.Property<Guid>("C_Code")
  1034. .ValueGeneratedOnAdd()
  1035. .HasColumnType("char(36)");
  1036. b.Property<Guid>("C_CreateBy")
  1037. .HasColumnType("char(36)");
  1038. b.Property<Guid?>("C_LastUpdatedBy")
  1039. .HasColumnType("char(36)");
  1040. b.Property<string>("C_Name")
  1041. .IsRequired()
  1042. .HasMaxLength(50)
  1043. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1044. b.Property<string>("C_Remark")
  1045. .HasMaxLength(500)
  1046. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1047. b.Property<string>("C_Status")
  1048. .IsRequired()
  1049. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1050. b.Property<DateTime>("D_CreateOn")
  1051. .HasColumnType("datetime(6)");
  1052. b.Property<DateTime?>("D_LastUpdatedOn")
  1053. .HasColumnType("datetime(6)");
  1054. b.Property<int>("I_IfFPP")
  1055. .HasColumnType("int");
  1056. b.Property<int>("I_Sort")
  1057. .HasColumnType("int");
  1058. b.HasKey("C_Code");
  1059. b.HasIndex("C_CreateBy");
  1060. b.HasIndex("C_LastUpdatedBy");
  1061. b.ToTable("TPRD_Type");
  1062. });
  1063. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_Record", b =>
  1064. {
  1065. b.Property<Guid>("C_ID")
  1066. .ValueGeneratedOnAdd()
  1067. .HasColumnType("char(36)");
  1068. b.Property<Guid>("C_CreateBy")
  1069. .HasColumnType("char(36)");
  1070. b.Property<Guid>("C_LastUpdatedBy")
  1071. .HasColumnType("char(36)");
  1072. b.Property<string>("C_Remark")
  1073. .HasMaxLength(500)
  1074. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1075. b.Property<string>("C_SecurityContent")
  1076. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1077. b.Property<Guid>("C_SpotCode")
  1078. .HasColumnType("char(36)");
  1079. b.Property<string>("C_Status")
  1080. .IsRequired()
  1081. .HasMaxLength(1)
  1082. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1083. b.Property<DateTime>("D_CreateOn")
  1084. .HasColumnType("datetime(6)");
  1085. b.Property<DateTime>("D_LastUpdatedOn")
  1086. .HasColumnType("datetime(6)");
  1087. b.HasKey("C_ID");
  1088. b.HasIndex("C_CreateBy");
  1089. b.HasIndex("C_LastUpdatedBy");
  1090. b.ToTable("TSEC_Record");
  1091. });
  1092. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_RecordImage", b =>
  1093. {
  1094. b.Property<Guid>("C_ID")
  1095. .ValueGeneratedOnAdd()
  1096. .HasColumnType("char(36)");
  1097. b.Property<string>("C_ImageURL")
  1098. .IsRequired()
  1099. .HasMaxLength(100)
  1100. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1101. b.Property<Guid>("C_SecurityRecordCode")
  1102. .HasColumnType("char(36)");
  1103. b.Property<string>("C_Status")
  1104. .IsRequired()
  1105. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1106. b.HasKey("C_ID");
  1107. b.ToTable("TSEC_RecordImage");
  1108. });
  1109. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_RecordItem", b =>
  1110. {
  1111. b.Property<Guid>("C_ID")
  1112. .ValueGeneratedOnAdd()
  1113. .HasColumnType("char(36)");
  1114. b.Property<Guid>("C_CreateBy")
  1115. .HasColumnType("char(36)");
  1116. b.Property<Guid>("C_LastUpdatedBy")
  1117. .HasColumnType("char(36)");
  1118. b.Property<Guid>("C_RecordItemCode")
  1119. .HasColumnType("char(36)");
  1120. b.Property<string>("C_Remark")
  1121. .HasMaxLength(500)
  1122. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1123. b.Property<string>("C_SecurityContent")
  1124. .HasMaxLength(500)
  1125. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1126. b.Property<string>("C_Status")
  1127. .IsRequired()
  1128. .HasMaxLength(1)
  1129. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1130. b.Property<DateTime>("D_CreateOn")
  1131. .HasColumnType("datetime(6)");
  1132. b.Property<DateTime>("D_LastUpdatedOn")
  1133. .HasColumnType("datetime(6)");
  1134. b.HasKey("C_ID");
  1135. b.HasIndex("C_CreateBy");
  1136. b.HasIndex("C_LastUpdatedBy");
  1137. b.ToTable("TSEC_RecordItem");
  1138. });
  1139. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_License", b =>
  1140. {
  1141. b.Property<Guid>("C_ID")
  1142. .ValueGeneratedOnAdd()
  1143. .HasColumnType("char(36)");
  1144. b.Property<string>("C_Code")
  1145. .IsRequired()
  1146. .HasMaxLength(50)
  1147. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1148. b.Property<Guid>("C_CreateBy")
  1149. .HasColumnType("char(36)");
  1150. b.Property<string>("C_FilePath")
  1151. .IsRequired()
  1152. .HasMaxLength(500)
  1153. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1154. b.Property<Guid?>("C_LastUpdatedBy")
  1155. .HasColumnType("char(36)");
  1156. b.Property<string>("C_Name")
  1157. .IsRequired()
  1158. .HasMaxLength(100)
  1159. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1160. b.Property<string>("C_Remark")
  1161. .HasMaxLength(500)
  1162. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1163. b.Property<string>("C_Status")
  1164. .IsRequired()
  1165. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1166. b.Property<Guid>("C_TypeCode")
  1167. .HasColumnType("char(36)");
  1168. b.Property<DateTime>("D_CreateOn")
  1169. .HasColumnType("datetime(6)");
  1170. b.Property<DateTime>("D_EndDate")
  1171. .HasColumnType("datetime(6)");
  1172. b.Property<DateTime?>("D_LastUpdatedOn")
  1173. .HasColumnType("datetime(6)");
  1174. b.Property<DateTime>("D_StartDate")
  1175. .HasColumnType("datetime(6)");
  1176. b.Property<int>("I_MemberQty")
  1177. .HasColumnType("int");
  1178. b.Property<int?>("I_Sort")
  1179. .HasColumnType("int");
  1180. b.Property<int>("I_SpotQty")
  1181. .HasColumnType("int");
  1182. b.Property<Guid?>("UsersCreateByC_UserID")
  1183. .HasColumnType("char(36)");
  1184. b.HasKey("C_ID");
  1185. b.HasIndex("C_Code")
  1186. .IsUnique();
  1187. b.HasIndex("C_TypeCode");
  1188. b.HasIndex("UsersCreateByC_UserID");
  1189. b.ToTable("TSYS_License");
  1190. });
  1191. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseType", b =>
  1192. {
  1193. b.Property<Guid>("C_Code")
  1194. .ValueGeneratedOnAdd()
  1195. .HasColumnType("char(36)");
  1196. b.Property<Guid>("C_CreateBy")
  1197. .HasColumnType("char(36)");
  1198. b.Property<Guid?>("C_LastUpdatedBy")
  1199. .HasColumnType("char(36)");
  1200. b.Property<string>("C_Name")
  1201. .IsRequired()
  1202. .HasMaxLength(100)
  1203. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1204. b.Property<string>("C_Remark")
  1205. .HasMaxLength(500)
  1206. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1207. b.Property<string>("C_Status")
  1208. .IsRequired()
  1209. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1210. b.Property<DateTime>("D_CreateOn")
  1211. .HasColumnType("datetime(6)");
  1212. b.Property<DateTime?>("D_LastUpdatedOn")
  1213. .HasColumnType("datetime(6)");
  1214. b.Property<int>("I_MaxFileSize")
  1215. .HasColumnType("int");
  1216. b.Property<int>("I_MaxMemberQty")
  1217. .HasColumnType("int");
  1218. b.Property<int>("I_MaxSpotQty")
  1219. .HasColumnType("int");
  1220. b.Property<int>("I_Sort")
  1221. .HasColumnType("int");
  1222. b.HasKey("C_Code");
  1223. b.HasIndex("C_CreateBy");
  1224. b.HasIndex("C_LastUpdatedBy");
  1225. b.ToTable("TSYS_LicenseType");
  1226. });
  1227. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseTypePriv", b =>
  1228. {
  1229. b.Property<Guid>("C_LicenseTypeCode")
  1230. .HasColumnType("char(36)");
  1231. b.Property<string>("C_PrivilegeCode")
  1232. .HasMaxLength(50)
  1233. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1234. b.Property<Guid>("C_CreateBy")
  1235. .HasColumnType("char(36)");
  1236. b.Property<DateTime>("D_CreateOn")
  1237. .HasColumnType("datetime(6)");
  1238. b.HasKey("C_LicenseTypeCode", "C_PrivilegeCode");
  1239. b.HasIndex("C_CreateBy");
  1240. b.HasIndex("C_PrivilegeCode");
  1241. b.ToTable("TSYS_LicenseTypePriv");
  1242. });
  1243. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Message", b =>
  1244. {
  1245. b.Property<Guid>("C_Code")
  1246. .ValueGeneratedOnAdd()
  1247. .HasColumnType("char(36)");
  1248. b.Property<string>("C_Content")
  1249. .IsRequired()
  1250. .HasMaxLength(1000)
  1251. .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");
  1252. b.Property<Guid>("C_CreateBy")
  1253. .HasColumnType("char(36)");
  1254. b.Property<Guid?>("C_LastUpdatedBy")
  1255. .HasColumnType("char(36)");
  1256. b.Property<string>("C_LicenseCode")
  1257. .IsRequired()
  1258. .HasMaxLength(50)
  1259. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1260. b.Property<string>("C_RelatedID")
  1261. .HasMaxLength(50)
  1262. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1263. b.Property<string>("C_RelatedModule")
  1264. .HasMaxLength(200)
  1265. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  1266. b.Property<string>("C_Status")
  1267. .IsRequired()
  1268. .HasMaxLength(1)
  1269. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1270. b.Property<string>("C_Type")
  1271. .IsRequired()
  1272. .HasMaxLength(50)
  1273. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1274. b.Property<Guid>("C_UserID")
  1275. .HasColumnType("char(36)");
  1276. b.Property<DateTime>("D_CreateOn")
  1277. .HasColumnType("datetime(6)");
  1278. b.Property<DateTime?>("D_LastUpdatedOn")
  1279. .HasColumnType("datetime(6)");
  1280. b.HasKey("C_Code");
  1281. b.HasIndex("C_CreateBy");
  1282. b.HasIndex("C_LastUpdatedBy");
  1283. b.HasIndex("C_UserID");
  1284. b.ToTable("TSYS_Message");
  1285. });
  1286. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Org", b =>
  1287. {
  1288. b.Property<int>("K_ID")
  1289. .ValueGeneratedOnAdd()
  1290. .HasColumnType("int");
  1291. b.Property<string>("C_Code")
  1292. .IsRequired()
  1293. .HasMaxLength(50)
  1294. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1295. b.Property<Guid>("C_CreateBy")
  1296. .HasColumnType("char(36)");
  1297. b.Property<string>("C_GIS")
  1298. .HasMaxLength(50)
  1299. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1300. b.Property<Guid?>("C_LastUpdatedBy")
  1301. .HasColumnType("char(36)");
  1302. b.Property<string>("C_Level")
  1303. .IsRequired()
  1304. .HasMaxLength(500)
  1305. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1306. b.Property<string>("C_LicenseCode")
  1307. .IsRequired()
  1308. .HasMaxLength(50)
  1309. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1310. b.Property<string>("C_Linker")
  1311. .HasMaxLength(50)
  1312. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1313. b.Property<string>("C_Lname")
  1314. .HasMaxLength(2550)
  1315. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1316. b.Property<string>("C_Name")
  1317. .IsRequired()
  1318. .HasMaxLength(255)
  1319. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  1320. b.Property<string>("C_ParentCode")
  1321. .IsRequired()
  1322. .HasMaxLength(50)
  1323. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1324. b.Property<string>("C_Phone")
  1325. .HasMaxLength(50)
  1326. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1327. b.Property<string>("C_Remark")
  1328. .HasMaxLength(500)
  1329. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1330. b.Property<string>("C_SName")
  1331. .HasMaxLength(16)
  1332. .HasColumnType("varchar(16) CHARACTER SET utf8mb4");
  1333. b.Property<string>("C_Status")
  1334. .IsRequired()
  1335. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1336. b.Property<Guid>("C_Type")
  1337. .HasColumnType("char(36)");
  1338. b.Property<DateTime>("D_CreateOn")
  1339. .HasColumnType("datetime(6)");
  1340. b.Property<DateTime?>("D_LastUpdatedOn")
  1341. .HasColumnType("datetime(6)");
  1342. b.Property<int>("I_Sort")
  1343. .HasColumnType("int");
  1344. b.Property<Guid?>("StoreOrgC_OrgCode")
  1345. .HasColumnType("char(36)");
  1346. b.Property<string>("StoreOrgC_StoreCode")
  1347. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1348. b.HasKey("K_ID");
  1349. b.HasIndex("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");
  1350. b.ToTable("TSYS_Org");
  1351. });
  1352. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Organize", b =>
  1353. {
  1354. b.Property<Guid>("G_ID")
  1355. .ValueGeneratedOnAdd()
  1356. .HasColumnType("char(36)");
  1357. b.Property<string>("C_Address")
  1358. .HasMaxLength(100)
  1359. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1360. b.Property<string>("C_GPS")
  1361. .HasMaxLength(100)
  1362. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1363. b.Property<string>("C_ImageUrl")
  1364. .HasMaxLength(100)
  1365. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1366. b.Property<string>("C_Name")
  1367. .IsRequired()
  1368. .HasMaxLength(50)
  1369. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1370. b.Property<string>("C_Number")
  1371. .HasMaxLength(50)
  1372. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1373. b.Property<string>("C_ParentCodeList")
  1374. .HasMaxLength(500)
  1375. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1376. b.Property<string>("C_ParentName")
  1377. .HasMaxLength(50)
  1378. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1379. b.Property<string>("C_Remark")
  1380. .HasMaxLength(500)
  1381. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1382. b.Property<string>("C_Status")
  1383. .IsRequired()
  1384. .HasMaxLength(1)
  1385. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1386. b.Property<DateTime>("D_CreateOn")
  1387. .HasColumnType("datetime(6)");
  1388. b.Property<DateTime>("D_LastUpdatedOn")
  1389. .HasColumnType("datetime(6)");
  1390. b.Property<Guid>("G_CreateBy")
  1391. .HasColumnType("char(36)");
  1392. b.Property<Guid>("G_LastUpdatedBy")
  1393. .HasColumnType("char(36)");
  1394. b.Property<Guid>("G_ParentCode")
  1395. .HasColumnType("char(36)");
  1396. b.Property<int>("I_Layer")
  1397. .HasColumnType("int");
  1398. b.Property<int>("I_Sort")
  1399. .HasColumnType("int");
  1400. b.HasKey("G_ID");
  1401. b.ToTable("TSYS_Organize");
  1402. });
  1403. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Post", b =>
  1404. {
  1405. b.Property<Guid>("G_ID")
  1406. .ValueGeneratedOnAdd()
  1407. .HasColumnType("char(36)");
  1408. b.Property<string>("C_Code")
  1409. .IsRequired()
  1410. .HasMaxLength(20)
  1411. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  1412. b.Property<string>("C_Name")
  1413. .IsRequired()
  1414. .HasMaxLength(50)
  1415. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1416. b.Property<string>("C_Remark")
  1417. .HasMaxLength(100)
  1418. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1419. b.Property<string>("C_Status")
  1420. .IsRequired()
  1421. .HasMaxLength(1)
  1422. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1423. b.Property<DateTime>("D_CreateOn")
  1424. .HasColumnType("datetime(6)");
  1425. b.Property<DateTime>("D_LastUpdatedOn")
  1426. .HasColumnType("datetime(6)");
  1427. b.Property<Guid>("G_CreateBy")
  1428. .HasColumnType("char(36)");
  1429. b.Property<Guid>("G_LastUpdatedBy")
  1430. .HasColumnType("char(36)");
  1431. b.Property<int>("I_Sort")
  1432. .HasColumnType("int");
  1433. b.HasKey("G_ID");
  1434. b.ToTable("TSYS_Post");
  1435. });
  1436. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Priv", b =>
  1437. {
  1438. b.Property<string>("C_Code")
  1439. .HasMaxLength(50)
  1440. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1441. b.Property<string>("C_ImageUrl")
  1442. .HasMaxLength(500)
  1443. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1444. b.Property<string>("C_Module")
  1445. .IsRequired()
  1446. .HasMaxLength(50)
  1447. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1448. b.Property<string>("C_Name")
  1449. .IsRequired()
  1450. .HasMaxLength(50)
  1451. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1452. b.Property<string>("C_PageUrl")
  1453. .HasMaxLength(500)
  1454. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1455. b.Property<string>("C_ParentCode")
  1456. .HasMaxLength(50)
  1457. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1458. b.Property<string>("C_Remark")
  1459. .HasMaxLength(100)
  1460. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1461. b.Property<string>("C_Status")
  1462. .IsRequired()
  1463. .HasMaxLength(1)
  1464. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1465. b.Property<string>("C_Type")
  1466. .IsRequired()
  1467. .HasMaxLength(50)
  1468. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1469. b.Property<int?>("I_Sort")
  1470. .HasColumnType("int");
  1471. b.HasKey("C_Code");
  1472. b.HasIndex("C_ParentCode");
  1473. b.ToTable("TSYS_Priv");
  1474. });
  1475. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Role", b =>
  1476. {
  1477. b.Property<Guid>("C_Code")
  1478. .ValueGeneratedOnAdd()
  1479. .HasColumnType("char(36)");
  1480. b.Property<Guid>("C_CreateBy")
  1481. .HasColumnType("char(36)");
  1482. b.Property<string>("C_Description")
  1483. .HasMaxLength(100)
  1484. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1485. b.Property<Guid?>("C_LastUpdatedBy")
  1486. .HasColumnType("char(36)");
  1487. b.Property<string>("C_LicenseCode")
  1488. .IsRequired()
  1489. .HasMaxLength(50)
  1490. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1491. b.Property<string>("C_Name")
  1492. .IsRequired()
  1493. .HasMaxLength(50)
  1494. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1495. b.Property<string>("C_Status")
  1496. .IsRequired()
  1497. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1498. b.Property<DateTime>("D_CreateOn")
  1499. .HasColumnType("datetime(6)");
  1500. b.Property<DateTime?>("D_LastUpdatedOn")
  1501. .HasColumnType("datetime(6)");
  1502. b.Property<int?>("I_Sort")
  1503. .HasColumnType("int");
  1504. b.HasKey("C_Code");
  1505. b.HasIndex("C_CreateBy");
  1506. b.HasIndex("C_LastUpdatedBy");
  1507. b.ToTable("TSYS_Role");
  1508. });
  1509. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_RolePriv", b =>
  1510. {
  1511. b.Property<Guid>("C_RoleCode")
  1512. .HasColumnType("char(36)");
  1513. b.Property<string>("C_PrivilegeCode")
  1514. .HasMaxLength(50)
  1515. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1516. b.Property<Guid>("C_CreateBy")
  1517. .HasColumnType("char(36)");
  1518. b.Property<DateTime>("D_CreateOn")
  1519. .HasColumnType("datetime(6)");
  1520. b.Property<int>("I_Type")
  1521. .HasColumnType("int");
  1522. b.HasKey("C_RoleCode", "C_PrivilegeCode");
  1523. b.HasIndex("C_CreateBy");
  1524. b.HasIndex("C_PrivilegeCode");
  1525. b.ToTable("TSYS_RolePriv");
  1526. });
  1527. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_User", b =>
  1528. {
  1529. b.Property<Guid>("C_UserID")
  1530. .ValueGeneratedOnAdd()
  1531. .HasColumnType("char(36)");
  1532. b.Property<string>("C_Address")
  1533. .HasMaxLength(255)
  1534. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  1535. b.Property<Guid>("C_CreateBy")
  1536. .HasColumnType("char(36)");
  1537. b.Property<string>("C_Email")
  1538. .HasMaxLength(50)
  1539. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1540. b.Property<string>("C_IDNum")
  1541. .HasMaxLength(50)
  1542. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1543. b.Property<string>("C_ImagePath")
  1544. .HasMaxLength(500)
  1545. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1546. b.Property<Guid?>("C_LastUpdatedBy")
  1547. .HasColumnType("char(36)");
  1548. b.Property<string>("C_LicenseCode")
  1549. .IsRequired()
  1550. .HasMaxLength(50)
  1551. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1552. b.Property<string>("C_Mobile")
  1553. .HasMaxLength(20)
  1554. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  1555. b.Property<string>("C_Name")
  1556. .IsRequired()
  1557. .HasMaxLength(50)
  1558. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1559. b.Property<string>("C_OrgCode")
  1560. .IsRequired()
  1561. .HasMaxLength(50)
  1562. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1563. b.Property<string>("C_Password")
  1564. .IsRequired()
  1565. .HasMaxLength(100)
  1566. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1567. b.Property<string>("C_Phone")
  1568. .HasMaxLength(20)
  1569. .HasColumnType("varchar(20) CHARACTER SET utf8mb4");
  1570. b.Property<string>("C_Post")
  1571. .HasMaxLength(50)
  1572. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1573. b.Property<string>("C_ProgramID")
  1574. .HasMaxLength(100)
  1575. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1576. b.Property<string>("C_Remark")
  1577. .HasMaxLength(500)
  1578. .HasColumnType("varchar(500) CHARACTER SET utf8mb4");
  1579. b.Property<string>("C_Status")
  1580. .IsRequired()
  1581. .HasMaxLength(1)
  1582. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1583. b.Property<string>("C_UserName")
  1584. .IsRequired()
  1585. .HasMaxLength(50)
  1586. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1587. b.Property<string>("C_WechatID")
  1588. .HasMaxLength(100)
  1589. .HasColumnType("varchar(100) CHARACTER SET utf8mb4");
  1590. b.Property<DateTime>("D_BirthDay")
  1591. .HasColumnType("datetime(6)");
  1592. b.Property<DateTime>("D_CreateOn")
  1593. .HasColumnType("datetime(6)");
  1594. b.Property<DateTime?>("D_LastUpdatedOn")
  1595. .HasColumnType("datetime(6)");
  1596. b.Property<int>("I_Render")
  1597. .HasColumnType("int");
  1598. b.Property<int>("I_Sort")
  1599. .HasColumnType("int");
  1600. b.HasKey("C_UserID");
  1601. b.HasIndex("C_CreateBy");
  1602. b.HasIndex("C_IDNum")
  1603. .IsUnique();
  1604. b.HasIndex("C_LastUpdatedBy");
  1605. b.HasIndex("C_Mobile")
  1606. .IsUnique();
  1607. b.ToTable("TSYS_User");
  1608. });
  1609. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_UserPost", b =>
  1610. {
  1611. b.Property<Guid>("G_ID")
  1612. .ValueGeneratedOnAdd()
  1613. .HasColumnType("char(36)");
  1614. b.Property<DateTime>("D_CreateOn")
  1615. .HasColumnType("datetime(6)");
  1616. b.Property<Guid>("G_CreateBy")
  1617. .HasColumnType("char(36)");
  1618. b.Property<Guid>("G_PostCode")
  1619. .HasColumnType("char(36)");
  1620. b.Property<Guid>("G_UserCode")
  1621. .HasColumnType("char(36)");
  1622. b.HasKey("G_ID");
  1623. b.ToTable("TSYS_UserPost");
  1624. });
  1625. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_UserRole", b =>
  1626. {
  1627. b.Property<Guid>("C_UserCode")
  1628. .HasColumnType("char(36)");
  1629. b.Property<Guid>("C_RoleCode")
  1630. .HasColumnType("char(36)");
  1631. b.Property<Guid>("C_CreateBy")
  1632. .HasColumnType("char(36)");
  1633. b.Property<DateTime>("D_CreateOn")
  1634. .HasColumnType("datetime(6)");
  1635. b.HasKey("C_UserCode", "C_RoleCode");
  1636. b.HasIndex("C_CreateBy");
  1637. b.HasIndex("C_RoleCode");
  1638. b.ToTable("TSYS_UserRole");
  1639. });
  1640. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Version", b =>
  1641. {
  1642. b.Property<Guid>("C_ID")
  1643. .ValueGeneratedOnAdd()
  1644. .HasColumnType("char(36)");
  1645. b.Property<string>("C_AppCode")
  1646. .IsRequired()
  1647. .HasMaxLength(50)
  1648. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1649. b.Property<Guid>("C_CreateBy")
  1650. .HasColumnType("char(36)");
  1651. b.Property<string>("C_DownloadURL")
  1652. .HasMaxLength(1000)
  1653. .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");
  1654. b.Property<Guid?>("C_LastUpdatedBy")
  1655. .HasColumnType("char(36)");
  1656. b.Property<string>("C_Status")
  1657. .IsRequired()
  1658. .HasMaxLength(1)
  1659. .HasColumnType("varchar(1) CHARACTER SET utf8mb4");
  1660. b.Property<string>("C_UpdateContent")
  1661. .HasMaxLength(1000)
  1662. .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");
  1663. b.Property<string>("C_VersionCode")
  1664. .HasMaxLength(50)
  1665. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1666. b.Property<DateTime>("D_CreateOn")
  1667. .HasColumnType("datetime(6)");
  1668. b.Property<DateTime?>("D_LastUpdatedOn")
  1669. .HasColumnType("datetime(6)");
  1670. b.HasKey("C_ID");
  1671. b.HasIndex("C_CreateBy");
  1672. b.HasIndex("C_LastUpdatedBy");
  1673. b.ToTable("TSYS_Version");
  1674. });
  1675. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TaskInfoDto", b =>
  1676. {
  1677. b.Property<string>("jobId")
  1678. .HasColumnType("varchar(255) CHARACTER SET utf8mb4");
  1679. b.Property<Guid?>("TasksQzId")
  1680. .HasColumnType("char(36)");
  1681. b.Property<string>("jobGroup")
  1682. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1683. b.Property<string>("jobName")
  1684. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1685. b.Property<string>("triggerGroup")
  1686. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1687. b.Property<string>("triggerId")
  1688. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1689. b.Property<string>("triggerName")
  1690. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1691. b.Property<string>("triggerStatus")
  1692. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1693. b.HasKey("jobId");
  1694. b.HasIndex("TasksQzId");
  1695. b.ToTable("TaskInfoDto");
  1696. });
  1697. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TasksQz", b =>
  1698. {
  1699. b.Property<Guid>("Id")
  1700. .ValueGeneratedOnAdd()
  1701. .HasColumnType("char(36)");
  1702. b.Property<string>("AssemblyName")
  1703. .HasMaxLength(200)
  1704. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  1705. b.Property<DateTime?>("BeginTime")
  1706. .IsRequired()
  1707. .HasColumnType("datetime(6)");
  1708. b.Property<string>("C_LicenseCode")
  1709. .IsRequired()
  1710. .HasMaxLength(50)
  1711. .HasColumnType("varchar(50) CHARACTER SET utf8mb4");
  1712. b.Property<string>("ClassName")
  1713. .HasMaxLength(200)
  1714. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  1715. b.Property<Guid>("CreateBy")
  1716. .HasColumnType("char(36)");
  1717. b.Property<DateTime>("CreateTime")
  1718. .HasColumnType("datetime(6)");
  1719. b.Property<string>("Cron")
  1720. .HasMaxLength(200)
  1721. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  1722. b.Property<int>("CycleRunTimes")
  1723. .HasColumnType("int");
  1724. b.Property<DateTime?>("EndTime")
  1725. .IsRequired()
  1726. .HasColumnType("datetime(6)");
  1727. b.Property<int>("IntervalSecond")
  1728. .HasColumnType("int");
  1729. b.Property<bool?>("IsDeleted")
  1730. .HasColumnType("tinyint(1)");
  1731. b.Property<bool>("IsStart")
  1732. .HasColumnType("tinyint(1)");
  1733. b.Property<string>("JobGroup")
  1734. .HasMaxLength(200)
  1735. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  1736. b.Property<string>("JobParams")
  1737. .HasColumnType("longtext CHARACTER SET utf8mb4");
  1738. b.Property<string>("Name")
  1739. .HasMaxLength(200)
  1740. .HasColumnType("varchar(200) CHARACTER SET utf8mb4");
  1741. b.Property<string>("Remark")
  1742. .HasMaxLength(1000)
  1743. .HasColumnType("varchar(1000) CHARACTER SET utf8mb4");
  1744. b.Property<int>("RunTimes")
  1745. .HasColumnType("int");
  1746. b.Property<int>("TriggerType")
  1747. .HasColumnType("int");
  1748. b.HasKey("Id");
  1749. b.ToTable("TasksQz");
  1750. });
  1751. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_Area", b =>
  1752. {
  1753. b.HasOne("Ropin.Inspection.Model.Entities.TBDM_City", "CityCityCode")
  1754. .WithMany()
  1755. .HasForeignKey("C_CityCode")
  1756. .OnDelete(DeleteBehavior.Restrict)
  1757. .IsRequired();
  1758. b.Navigation("CityCityCode");
  1759. });
  1760. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_City", b =>
  1761. {
  1762. b.HasOne("Ropin.Inspection.Model.Entities.TBDM_Prov", "ProvProvCode")
  1763. .WithMany()
  1764. .HasForeignKey("C_ProvCode")
  1765. .OnDelete(DeleteBehavior.Restrict)
  1766. .IsRequired();
  1767. b.Navigation("ProvProvCode");
  1768. });
  1769. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_CodeDetail", b =>
  1770. {
  1771. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1772. .WithMany()
  1773. .HasForeignKey("C_CreateBy")
  1774. .OnDelete(DeleteBehavior.Restrict)
  1775. .IsRequired();
  1776. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1777. .WithMany()
  1778. .HasForeignKey("C_LastUpdatedBy");
  1779. b.Navigation("UsersCreateBy");
  1780. b.Navigation("UsersLastUpdatedBy");
  1781. });
  1782. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TBDM_CodeMain", b =>
  1783. {
  1784. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1785. .WithMany()
  1786. .HasForeignKey("C_CreateBy")
  1787. .OnDelete(DeleteBehavior.Restrict)
  1788. .IsRequired();
  1789. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1790. .WithMany()
  1791. .HasForeignKey("C_LastUpdatedBy");
  1792. b.Navigation("UsersCreateBy");
  1793. b.Navigation("UsersLastUpdatedBy");
  1794. });
  1795. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevAlertConfig", b =>
  1796. {
  1797. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1798. .WithMany()
  1799. .HasForeignKey("C_CreateBy")
  1800. .OnDelete(DeleteBehavior.Restrict)
  1801. .IsRequired();
  1802. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1803. .WithMany()
  1804. .HasForeignKey("C_LastUpdatedBy");
  1805. b.Navigation("UsersCreateBy");
  1806. b.Navigation("UsersLastUpdatedBy");
  1807. });
  1808. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_DevDataConfig", b =>
  1809. {
  1810. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1811. .WithMany()
  1812. .HasForeignKey("C_CreateBy")
  1813. .OnDelete(DeleteBehavior.Restrict)
  1814. .IsRequired();
  1815. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1816. .WithMany()
  1817. .HasForeignKey("C_LastUpdatedBy");
  1818. b.Navigation("UsersCreateBy");
  1819. b.Navigation("UsersLastUpdatedBy");
  1820. });
  1821. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TDEV_Device", b =>
  1822. {
  1823. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1824. .WithMany()
  1825. .HasForeignKey("C_CreateBy")
  1826. .OnDelete(DeleteBehavior.Restrict)
  1827. .IsRequired();
  1828. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1829. .WithMany()
  1830. .HasForeignKey("C_LastUpdatedBy");
  1831. b.HasOne("Ropin.Inspection.Model.Entities.TPRD_Product", "ProductCode")
  1832. .WithMany()
  1833. .HasForeignKey("C_ProductCode")
  1834. .OnDelete(DeleteBehavior.Restrict)
  1835. .IsRequired();
  1836. b.Navigation("ProductCode");
  1837. b.Navigation("UsersCreateBy");
  1838. b.Navigation("UsersLastUpdatedBy");
  1839. });
  1840. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Content", b =>
  1841. {
  1842. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1843. .WithMany()
  1844. .HasForeignKey("C_CreateBy")
  1845. .OnDelete(DeleteBehavior.Restrict)
  1846. .IsRequired();
  1847. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1848. .WithMany()
  1849. .HasForeignKey("C_LastUpdatedBy");
  1850. b.Navigation("UsersCreateBy");
  1851. b.Navigation("UsersLastUpdatedBy");
  1852. });
  1853. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroup", b =>
  1854. {
  1855. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1856. .WithMany()
  1857. .HasForeignKey("G_CreateBy")
  1858. .OnDelete(DeleteBehavior.Restrict)
  1859. .IsRequired();
  1860. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1861. .WithMany()
  1862. .HasForeignKey("G_LastUpdatedBy");
  1863. b.Navigation("UsersCreateBy");
  1864. b.Navigation("UsersLastUpdatedBy");
  1865. });
  1866. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_ContentGroupItem", b =>
  1867. {
  1868. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Content", "ContentCode")
  1869. .WithMany()
  1870. .HasForeignKey("G_ContentCode")
  1871. .OnDelete(DeleteBehavior.Restrict)
  1872. .IsRequired();
  1873. b.HasOne("Ropin.Inspection.Model.Entities.TISP_ContentGroup", "ContentGroupCode")
  1874. .WithMany()
  1875. .HasForeignKey("G_ContentGroupCode")
  1876. .OnDelete(DeleteBehavior.Restrict)
  1877. .IsRequired();
  1878. b.Navigation("ContentCode");
  1879. b.Navigation("ContentGroupCode");
  1880. });
  1881. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Record", b =>
  1882. {
  1883. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1884. .WithMany()
  1885. .HasForeignKey("C_CreateBy")
  1886. .OnDelete(DeleteBehavior.Restrict)
  1887. .IsRequired();
  1888. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1889. .WithMany()
  1890. .HasForeignKey("C_LastUpdatedBy")
  1891. .OnDelete(DeleteBehavior.Restrict)
  1892. .IsRequired();
  1893. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
  1894. .WithMany()
  1895. .HasForeignKey("C_SpotCode")
  1896. .OnDelete(DeleteBehavior.Restrict)
  1897. .IsRequired();
  1898. b.Navigation("SpotCode");
  1899. b.Navigation("UsersCreateBy");
  1900. b.Navigation("UsersLastUpdatedBy");
  1901. });
  1902. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordImage", b =>
  1903. {
  1904. b.HasOne("Ropin.Inspection.Model.Entities.TISP_RecordItem", "RecordItemCode")
  1905. .WithMany()
  1906. .HasForeignKey("C_RecordItemCode")
  1907. .OnDelete(DeleteBehavior.Restrict)
  1908. .IsRequired();
  1909. b.Navigation("RecordItemCode");
  1910. });
  1911. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_RecordItem", b =>
  1912. {
  1913. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Content", "ContentCode")
  1914. .WithMany()
  1915. .HasForeignKey("C_ContentCode")
  1916. .OnDelete(DeleteBehavior.Restrict)
  1917. .IsRequired();
  1918. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1919. .WithMany()
  1920. .HasForeignKey("C_CreateBy")
  1921. .OnDelete(DeleteBehavior.Restrict)
  1922. .IsRequired();
  1923. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1924. .WithMany()
  1925. .HasForeignKey("C_LastUpdatedBy")
  1926. .OnDelete(DeleteBehavior.Restrict)
  1927. .IsRequired();
  1928. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Record", "RecordCode")
  1929. .WithMany()
  1930. .HasForeignKey("C_RecordCode")
  1931. .OnDelete(DeleteBehavior.Restrict)
  1932. .IsRequired();
  1933. b.Navigation("ContentCode");
  1934. b.Navigation("RecordCode");
  1935. b.Navigation("UsersCreateBy");
  1936. b.Navigation("UsersLastUpdatedBy");
  1937. });
  1938. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Region", b =>
  1939. {
  1940. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1941. .WithMany()
  1942. .HasForeignKey("C_CreateBy")
  1943. .OnDelete(DeleteBehavior.Restrict)
  1944. .IsRequired();
  1945. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1946. .WithMany()
  1947. .HasForeignKey("C_LastUpdatedBy")
  1948. .OnDelete(DeleteBehavior.Restrict)
  1949. .IsRequired();
  1950. b.Navigation("UsersCreateBy");
  1951. b.Navigation("UsersLastUpdatedBy");
  1952. });
  1953. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Route", b =>
  1954. {
  1955. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1956. .WithMany()
  1957. .HasForeignKey("C_CreateBy")
  1958. .OnDelete(DeleteBehavior.Restrict)
  1959. .IsRequired();
  1960. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1961. .WithMany()
  1962. .HasForeignKey("C_LastUpdatedBy")
  1963. .OnDelete(DeleteBehavior.Restrict)
  1964. .IsRequired();
  1965. b.Navigation("UsersCreateBy");
  1966. b.Navigation("UsersLastUpdatedBy");
  1967. });
  1968. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_Spot", b =>
  1969. {
  1970. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1971. .WithMany()
  1972. .HasForeignKey("C_CreateBy")
  1973. .OnDelete(DeleteBehavior.Restrict)
  1974. .IsRequired();
  1975. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  1976. .WithMany()
  1977. .HasForeignKey("C_LastUpdatedBy")
  1978. .OnDelete(DeleteBehavior.Restrict)
  1979. .IsRequired();
  1980. b.Navigation("UsersCreateBy");
  1981. b.Navigation("UsersLastUpdatedBy");
  1982. });
  1983. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotContent", b =>
  1984. {
  1985. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Content", "ContentCode")
  1986. .WithMany()
  1987. .HasForeignKey("C_ContentCode")
  1988. .OnDelete(DeleteBehavior.Restrict)
  1989. .IsRequired();
  1990. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  1991. .WithMany()
  1992. .HasForeignKey("C_CreateBy")
  1993. .OnDelete(DeleteBehavior.Restrict)
  1994. .IsRequired();
  1995. b.Navigation("ContentCode");
  1996. b.Navigation("UsersCreateBy");
  1997. });
  1998. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRegion", b =>
  1999. {
  2000. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2001. .WithMany()
  2002. .HasForeignKey("C_CreateBy")
  2003. .OnDelete(DeleteBehavior.Restrict)
  2004. .IsRequired();
  2005. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2006. .WithMany()
  2007. .HasForeignKey("C_LastUpdatedBy")
  2008. .OnDelete(DeleteBehavior.Restrict)
  2009. .IsRequired();
  2010. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Region", "RegionCode")
  2011. .WithMany()
  2012. .HasForeignKey("C_RegionCode")
  2013. .OnDelete(DeleteBehavior.Restrict)
  2014. .IsRequired();
  2015. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
  2016. .WithMany()
  2017. .HasForeignKey("C_SpotCode")
  2018. .OnDelete(DeleteBehavior.Restrict)
  2019. .IsRequired();
  2020. b.Navigation("RegionCode");
  2021. b.Navigation("SpotCode");
  2022. b.Navigation("UsersCreateBy");
  2023. b.Navigation("UsersLastUpdatedBy");
  2024. });
  2025. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotRoute", b =>
  2026. {
  2027. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2028. .WithMany()
  2029. .HasForeignKey("C_CreateBy")
  2030. .OnDelete(DeleteBehavior.Restrict)
  2031. .IsRequired();
  2032. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2033. .WithMany()
  2034. .HasForeignKey("C_LastUpdatedBy")
  2035. .OnDelete(DeleteBehavior.Restrict)
  2036. .IsRequired();
  2037. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Route", "RouteCode")
  2038. .WithMany()
  2039. .HasForeignKey("C_RouteCode")
  2040. .OnDelete(DeleteBehavior.Restrict)
  2041. .IsRequired();
  2042. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
  2043. .WithMany()
  2044. .HasForeignKey("C_SpotCode")
  2045. .OnDelete(DeleteBehavior.Restrict)
  2046. .IsRequired();
  2047. b.Navigation("RouteCode");
  2048. b.Navigation("SpotCode");
  2049. b.Navigation("UsersCreateBy");
  2050. b.Navigation("UsersLastUpdatedBy");
  2051. });
  2052. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TISP_SpotUser", b =>
  2053. {
  2054. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2055. .WithMany()
  2056. .HasForeignKey("C_CreateBy")
  2057. .OnDelete(DeleteBehavior.Restrict)
  2058. .IsRequired();
  2059. b.HasOne("Ropin.Inspection.Model.Entities.TISP_Spot", "SpotCode")
  2060. .WithMany()
  2061. .HasForeignKey("C_SpotCode")
  2062. .OnDelete(DeleteBehavior.Restrict)
  2063. .IsRequired();
  2064. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UserCode")
  2065. .WithMany()
  2066. .HasForeignKey("C_UserCode")
  2067. .OnDelete(DeleteBehavior.Restrict)
  2068. .IsRequired();
  2069. b.Navigation("SpotCode");
  2070. b.Navigation("UserCode");
  2071. b.Navigation("UsersCreateBy");
  2072. });
  2073. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Area", b =>
  2074. {
  2075. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2076. .WithMany()
  2077. .HasForeignKey("C_CreateBy")
  2078. .OnDelete(DeleteBehavior.Restrict)
  2079. .IsRequired();
  2080. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2081. .WithMany()
  2082. .HasForeignKey("C_LastUpdatedBy");
  2083. b.HasOne("Ropin.Inspection.Model.Entities.TPNT_Store", "Store")
  2084. .WithMany("Areas")
  2085. .HasForeignKey("C_StoreCode")
  2086. .OnDelete(DeleteBehavior.Restrict)
  2087. .IsRequired();
  2088. b.Navigation("Store");
  2089. b.Navigation("UsersCreateBy");
  2090. b.Navigation("UsersLastUpdatedBy");
  2091. });
  2092. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Store", b =>
  2093. {
  2094. b.HasOne("Ropin.Inspection.Model.Entities.TBDM_Area", "AreaAreaCode")
  2095. .WithMany()
  2096. .HasForeignKey("C_AreaCode");
  2097. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2098. .WithMany()
  2099. .HasForeignKey("C_CreateBy")
  2100. .OnDelete(DeleteBehavior.Restrict)
  2101. .IsRequired();
  2102. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2103. .WithMany()
  2104. .HasForeignKey("C_LastUpdatedBy");
  2105. b.HasOne("Ropin.Inspection.Model.Entities.TPNT_Type", "TypeTypeCode")
  2106. .WithMany()
  2107. .HasForeignKey("C_TypeCode")
  2108. .OnDelete(DeleteBehavior.Restrict)
  2109. .IsRequired();
  2110. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_License", "License")
  2111. .WithMany("Stores")
  2112. .HasForeignKey("LicenseC_ID");
  2113. b.HasOne("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", "StoreOrg")
  2114. .WithMany("Stores")
  2115. .HasForeignKey("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");
  2116. b.Navigation("AreaAreaCode");
  2117. b.Navigation("License");
  2118. b.Navigation("StoreOrg");
  2119. b.Navigation("TypeTypeCode");
  2120. b.Navigation("UsersCreateBy");
  2121. b.Navigation("UsersLastUpdatedBy");
  2122. });
  2123. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", b =>
  2124. {
  2125. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2126. .WithMany()
  2127. .HasForeignKey("C_CreateBy")
  2128. .OnDelete(DeleteBehavior.Restrict)
  2129. .IsRequired();
  2130. b.Navigation("UsersCreateBy");
  2131. });
  2132. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Log", b =>
  2133. {
  2134. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "CreateBy")
  2135. .WithMany()
  2136. .HasForeignKey("C_CreateBy")
  2137. .OnDelete(DeleteBehavior.Restrict)
  2138. .IsRequired();
  2139. b.HasOne("Ropin.Inspection.Model.Entities.TPRD_Product", "ProductCode")
  2140. .WithMany()
  2141. .HasForeignKey("C_ProductCode")
  2142. .OnDelete(DeleteBehavior.Restrict)
  2143. .IsRequired();
  2144. b.Navigation("CreateBy");
  2145. b.Navigation("ProductCode");
  2146. });
  2147. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_ProdSKU", b =>
  2148. {
  2149. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2150. .WithMany()
  2151. .HasForeignKey("C_CreateBy")
  2152. .OnDelete(DeleteBehavior.Restrict)
  2153. .IsRequired();
  2154. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2155. .WithMany()
  2156. .HasForeignKey("C_LastUpdatedBy");
  2157. b.HasOne("Ropin.Inspection.Model.Entities.TPRD_Type", "TypeCode")
  2158. .WithMany()
  2159. .HasForeignKey("C_TypeCode")
  2160. .OnDelete(DeleteBehavior.Restrict)
  2161. .IsRequired();
  2162. b.Navigation("TypeCode");
  2163. b.Navigation("UsersCreateBy");
  2164. b.Navigation("UsersLastUpdatedBy");
  2165. });
  2166. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Product", b =>
  2167. {
  2168. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2169. .WithMany()
  2170. .HasForeignKey("C_CreateBy")
  2171. .OnDelete(DeleteBehavior.Restrict)
  2172. .IsRequired();
  2173. b.HasOne("Ropin.Inspection.Model.Entities.TDEV_Device", "DeviceCode")
  2174. .WithMany()
  2175. .HasForeignKey("C_DeviceCode")
  2176. .OnDelete(DeleteBehavior.Restrict)
  2177. .IsRequired();
  2178. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2179. .WithMany()
  2180. .HasForeignKey("C_LastUpdatedBy");
  2181. b.HasOne("Ropin.Inspection.Model.Entities.TPRD_ProdSKU", "SKUCode")
  2182. .WithMany()
  2183. .HasForeignKey("C_SKUCode")
  2184. .OnDelete(DeleteBehavior.Restrict)
  2185. .IsRequired();
  2186. b.Navigation("DeviceCode");
  2187. b.Navigation("SKUCode");
  2188. b.Navigation("UsersCreateBy");
  2189. b.Navigation("UsersLastUpdatedBy");
  2190. });
  2191. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPRD_Type", b =>
  2192. {
  2193. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2194. .WithMany()
  2195. .HasForeignKey("C_CreateBy")
  2196. .OnDelete(DeleteBehavior.Restrict)
  2197. .IsRequired();
  2198. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "LastUpdatedBy")
  2199. .WithMany()
  2200. .HasForeignKey("C_LastUpdatedBy");
  2201. b.Navigation("LastUpdatedBy");
  2202. b.Navigation("UsersCreateBy");
  2203. });
  2204. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_Record", b =>
  2205. {
  2206. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2207. .WithMany()
  2208. .HasForeignKey("C_CreateBy")
  2209. .OnDelete(DeleteBehavior.Restrict)
  2210. .IsRequired();
  2211. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2212. .WithMany()
  2213. .HasForeignKey("C_LastUpdatedBy")
  2214. .OnDelete(DeleteBehavior.Restrict)
  2215. .IsRequired();
  2216. b.Navigation("UsersCreateBy");
  2217. b.Navigation("UsersLastUpdatedBy");
  2218. });
  2219. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSEC_RecordItem", b =>
  2220. {
  2221. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2222. .WithMany()
  2223. .HasForeignKey("C_CreateBy")
  2224. .OnDelete(DeleteBehavior.Restrict)
  2225. .IsRequired();
  2226. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2227. .WithMany()
  2228. .HasForeignKey("C_LastUpdatedBy")
  2229. .OnDelete(DeleteBehavior.Restrict)
  2230. .IsRequired();
  2231. b.Navigation("UsersCreateBy");
  2232. b.Navigation("UsersLastUpdatedBy");
  2233. });
  2234. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_License", b =>
  2235. {
  2236. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_LicenseType", "LicenseTypeTypeCode")
  2237. .WithMany()
  2238. .HasForeignKey("C_TypeCode")
  2239. .OnDelete(DeleteBehavior.Restrict)
  2240. .IsRequired();
  2241. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2242. .WithMany()
  2243. .HasForeignKey("UsersCreateByC_UserID");
  2244. b.Navigation("LicenseTypeTypeCode");
  2245. b.Navigation("UsersCreateBy");
  2246. });
  2247. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseType", b =>
  2248. {
  2249. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2250. .WithMany()
  2251. .HasForeignKey("C_CreateBy")
  2252. .OnDelete(DeleteBehavior.Restrict)
  2253. .IsRequired();
  2254. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2255. .WithMany()
  2256. .HasForeignKey("C_LastUpdatedBy");
  2257. b.Navigation("UsersCreateBy");
  2258. b.Navigation("UsersLastUpdatedBy");
  2259. });
  2260. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_LicenseTypePriv", b =>
  2261. {
  2262. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2263. .WithMany()
  2264. .HasForeignKey("C_CreateBy")
  2265. .OnDelete(DeleteBehavior.Restrict)
  2266. .IsRequired();
  2267. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_LicenseType", "LicenseTypeCode")
  2268. .WithMany()
  2269. .HasForeignKey("C_LicenseTypeCode")
  2270. .OnDelete(DeleteBehavior.Restrict)
  2271. .IsRequired();
  2272. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Priv", "PrivPrivilegeCode")
  2273. .WithMany()
  2274. .HasForeignKey("C_PrivilegeCode")
  2275. .OnDelete(DeleteBehavior.Restrict)
  2276. .IsRequired();
  2277. b.Navigation("LicenseTypeCode");
  2278. b.Navigation("PrivPrivilegeCode");
  2279. b.Navigation("UsersCreateBy");
  2280. });
  2281. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Message", b =>
  2282. {
  2283. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2284. .WithMany()
  2285. .HasForeignKey("C_CreateBy")
  2286. .OnDelete(DeleteBehavior.Restrict)
  2287. .IsRequired();
  2288. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2289. .WithMany()
  2290. .HasForeignKey("C_LastUpdatedBy");
  2291. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersUserID")
  2292. .WithMany()
  2293. .HasForeignKey("C_UserID")
  2294. .OnDelete(DeleteBehavior.Restrict)
  2295. .IsRequired();
  2296. b.Navigation("UsersCreateBy");
  2297. b.Navigation("UsersLastUpdatedBy");
  2298. b.Navigation("UsersUserID");
  2299. });
  2300. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Org", b =>
  2301. {
  2302. b.HasOne("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", "StoreOrg")
  2303. .WithMany("Orgs")
  2304. .HasForeignKey("StoreOrgC_StoreCode", "StoreOrgC_OrgCode");
  2305. b.Navigation("StoreOrg");
  2306. });
  2307. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Priv", b =>
  2308. {
  2309. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Priv", "PrivPrivilegeCode")
  2310. .WithMany()
  2311. .HasForeignKey("C_ParentCode");
  2312. b.Navigation("PrivPrivilegeCode");
  2313. });
  2314. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Role", b =>
  2315. {
  2316. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2317. .WithMany()
  2318. .HasForeignKey("C_CreateBy")
  2319. .OnDelete(DeleteBehavior.Restrict)
  2320. .IsRequired();
  2321. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2322. .WithMany()
  2323. .HasForeignKey("C_LastUpdatedBy");
  2324. b.Navigation("UsersCreateBy");
  2325. b.Navigation("UsersLastUpdatedBy");
  2326. });
  2327. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_RolePriv", b =>
  2328. {
  2329. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2330. .WithMany()
  2331. .HasForeignKey("C_CreateBy")
  2332. .OnDelete(DeleteBehavior.Restrict)
  2333. .IsRequired();
  2334. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Priv", "PrivilegeCode")
  2335. .WithMany()
  2336. .HasForeignKey("C_PrivilegeCode")
  2337. .OnDelete(DeleteBehavior.Restrict)
  2338. .IsRequired();
  2339. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Role", "Roles")
  2340. .WithMany()
  2341. .HasForeignKey("C_RoleCode")
  2342. .OnDelete(DeleteBehavior.Restrict)
  2343. .IsRequired();
  2344. b.Navigation("PrivilegeCode");
  2345. b.Navigation("Roles");
  2346. b.Navigation("UsersCreateBy");
  2347. });
  2348. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_User", b =>
  2349. {
  2350. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2351. .WithMany()
  2352. .HasForeignKey("C_CreateBy")
  2353. .OnDelete(DeleteBehavior.Restrict)
  2354. .IsRequired();
  2355. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2356. .WithMany()
  2357. .HasForeignKey("C_LastUpdatedBy");
  2358. b.Navigation("UsersCreateBy");
  2359. b.Navigation("UsersLastUpdatedBy");
  2360. });
  2361. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_UserRole", b =>
  2362. {
  2363. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2364. .WithMany()
  2365. .HasForeignKey("C_CreateBy")
  2366. .OnDelete(DeleteBehavior.Restrict)
  2367. .IsRequired();
  2368. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_Role", "Roles")
  2369. .WithMany()
  2370. .HasForeignKey("C_RoleCode")
  2371. .OnDelete(DeleteBehavior.Restrict)
  2372. .IsRequired();
  2373. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "Users")
  2374. .WithMany()
  2375. .HasForeignKey("C_UserCode")
  2376. .OnDelete(DeleteBehavior.Restrict)
  2377. .IsRequired();
  2378. b.Navigation("Roles");
  2379. b.Navigation("Users");
  2380. b.Navigation("UsersCreateBy");
  2381. });
  2382. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_Version", b =>
  2383. {
  2384. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersCreateBy")
  2385. .WithMany()
  2386. .HasForeignKey("C_CreateBy")
  2387. .OnDelete(DeleteBehavior.Restrict)
  2388. .IsRequired();
  2389. b.HasOne("Ropin.Inspection.Model.Entities.TSYS_User", "UsersLastUpdatedBy")
  2390. .WithMany()
  2391. .HasForeignKey("C_LastUpdatedBy");
  2392. b.Navigation("UsersCreateBy");
  2393. b.Navigation("UsersLastUpdatedBy");
  2394. });
  2395. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TaskInfoDto", b =>
  2396. {
  2397. b.HasOne("Ropin.Inspection.Model.Entities.TasksQz", null)
  2398. .WithMany("Triggers")
  2399. .HasForeignKey("TasksQzId");
  2400. });
  2401. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_Store", b =>
  2402. {
  2403. b.Navigation("Areas");
  2404. });
  2405. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TPNT_StoreOrg", b =>
  2406. {
  2407. b.Navigation("Orgs");
  2408. b.Navigation("Stores");
  2409. });
  2410. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TSYS_License", b =>
  2411. {
  2412. b.Navigation("Stores");
  2413. });
  2414. modelBuilder.Entity("Ropin.Inspection.Model.Entities.TasksQz", b =>
  2415. {
  2416. b.Navigation("Triggers");
  2417. });
  2418. #pragma warning restore 612, 618
  2419. }
  2420. }
  2421. }