InspectionDbContextModelSnapshot.cs 123 KB

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