202411110553553_20241111-init.cs 168 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419
  1. namespace ShwasherSys.Migrations
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data.Entity.Infrastructure.Annotations;
  6. using System.Data.Entity.Migrations;
  7. public partial class _20241111init : DbMigration
  8. {
  9. public override void Up()
  10. {
  11. CreateTable(
  12. "dbo.Sys_AppGuids",
  13. c => new
  14. {
  15. Id = c.Int(nullable: false, identity: true),
  16. Step = c.Short(nullable: false),
  17. LastId = c.Int(nullable: false),
  18. IdType = c.Short(nullable: false),
  19. })
  20. .PrimaryKey(t => t.Id);
  21. CreateTable(
  22. "dbo.Sys_AuditLogs",
  23. c => new
  24. {
  25. Id = c.Long(nullable: false, identity: true),
  26. UserId = c.Long(),
  27. UserName = c.String(),
  28. ServiceName = c.String(maxLength: 256),
  29. MethodName = c.String(maxLength: 256),
  30. Parameters = c.String(maxLength: 1024),
  31. ExecutionTime = c.DateTime(nullable: false),
  32. ExecutionDuration = c.Int(nullable: false),
  33. ClientIpAddress = c.String(maxLength: 64),
  34. ClientName = c.String(maxLength: 128),
  35. BrowserInfo = c.String(maxLength: 512),
  36. Exception = c.String(maxLength: 2000),
  37. ImpersonatorUserId = c.Long(),
  38. ImpersonatorTenantId = c.Int(),
  39. CustomData = c.String(maxLength: 2000),
  40. LogType = c.Int(nullable: false),
  41. Discriminator = c.String(nullable: false, maxLength: 128),
  42. })
  43. .PrimaryKey(t => t.Id);
  44. CreateTable(
  45. "dbo.BackUpCurrentSemiStoreHouse",
  46. c => new
  47. {
  48. Id = c.Int(nullable: false, identity: true),
  49. CurrentSemiStoreHouseNo = c.String(nullable: false, maxLength: 32),
  50. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  51. StoreHouseId = c.Int(nullable: false),
  52. SemiProductNo = c.String(maxLength: 32),
  53. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  54. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  55. ApplyEnterDate = c.DateTime(),
  56. Remark = c.String(maxLength: 150),
  57. TimeCreated = c.DateTime(),
  58. TimeLastMod = c.DateTime(),
  59. CreatorUserId = c.String(maxLength: 20),
  60. UserIDLastMod = c.String(maxLength: 20),
  61. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  62. })
  63. .PrimaryKey(t => t.Id);
  64. CreateTable(
  65. "dbo.BulletinInfo",
  66. c => new
  67. {
  68. BulletinInfoId = c.Int(nullable: false, identity: true),
  69. BulletinType = c.String(nullable: false, maxLength: 1),
  70. Title = c.String(nullable: false, maxLength: 100),
  71. Content = c.String(nullable: false, storeType: "ntext"),
  72. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  73. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  74. UserIDLastMod = c.String(maxLength: 20),
  75. Promulgator = c.String(maxLength: 50),
  76. PromulgatTime = c.DateTime(storeType: "smalldatetime"),
  77. ExpirationDate = c.DateTime(storeType: "smalldatetime"),
  78. })
  79. .PrimaryKey(t => t.BulletinInfoId);
  80. CreateTable(
  81. "dbo.BusinessLogs",
  82. c => new
  83. {
  84. Id = c.Int(nullable: false, identity: true),
  85. LogType = c.Int(nullable: false),
  86. LogCommand = c.String(),
  87. LogMessage = c.String(),
  88. LogErrorMessage = c.String(),
  89. LogDate = c.DateTime(),
  90. UserHostAddress = c.String(),
  91. Extend1Log = c.String(),
  92. Extend2Log = c.String(),
  93. Extend3Log = c.String(),
  94. Extend4Log = c.String(),
  95. IsDeleted = c.Boolean(nullable: false),
  96. DeleterUserId = c.Long(),
  97. DeletionTime = c.DateTime(),
  98. LastModificationTime = c.DateTime(),
  99. LastModifierUserId = c.Long(),
  100. CreationTime = c.DateTime(nullable: false),
  101. CreatorUserId = c.Long(),
  102. },
  103. annotations: new Dictionary<string, object>
  104. {
  105. { "DynamicFilter_BusinessLog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  106. })
  107. .PrimaryKey(t => t.Id);
  108. CreateTable(
  109. "dbo.Currency",
  110. c => new
  111. {
  112. Id = c.String(nullable: false, maxLength: 128),
  113. CurrencyName = c.String(maxLength: 20),
  114. TimeCreated = c.DateTime(),
  115. TimeLastMod = c.DateTime(),
  116. UserIDLastMod = c.String(maxLength: 20),
  117. })
  118. .PrimaryKey(t => t.Id);
  119. CreateTable(
  120. "dbo.CurrencyExchangeRate",
  121. c => new
  122. {
  123. Id = c.Int(nullable: false, identity: true),
  124. FromCurrencyId = c.String(maxLength: 20),
  125. ToCurrencyId = c.String(maxLength: 20),
  126. ExchangeRate = c.Decimal(precision: 18, scale: 4),
  127. TimeCreated = c.DateTime(),
  128. TimeLastMod = c.DateTime(),
  129. UserIDLastMod = c.String(maxLength: 20),
  130. })
  131. .PrimaryKey(t => t.Id);
  132. CreateTable(
  133. "dbo.CurrentProductStoreHouse",
  134. c => new
  135. {
  136. Id = c.Int(nullable: false, identity: true),
  137. CurrentProductStoreHouseNo = c.String(nullable: false, maxLength: 32),
  138. ProductionOrderNo = c.String(maxLength: 11),
  139. StoreHouseId = c.Int(nullable: false),
  140. StoreLocationNo = c.String(maxLength: 32),
  141. ProductNo = c.String(maxLength: 32),
  142. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  143. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  144. Remark = c.String(maxLength: 150),
  145. TimeCreated = c.DateTime(),
  146. TimeLastMod = c.DateTime(),
  147. CreatorUserId = c.String(maxLength: 20),
  148. UserIDLastMod = c.String(maxLength: 20),
  149. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  150. PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
  151. InventoryCheckState = c.Int(),
  152. ReturnState = c.Int(),
  153. })
  154. .PrimaryKey(t => t.Id);
  155. CreateTable(
  156. "dbo.CurrentRmStoreHouse",
  157. c => new
  158. {
  159. Id = c.String(nullable: false, maxLength: 128),
  160. ProductionOrderNo = c.String(maxLength: 11),
  161. StoreHouseId = c.Int(nullable: false),
  162. StoreLocationNo = c.String(maxLength: 32),
  163. RmProductNo = c.String(maxLength: 32),
  164. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  165. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  166. Remark = c.String(maxLength: 150),
  167. ProductBatchNum = c.String(maxLength: 32),
  168. PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
  169. IsDeleted = c.Boolean(nullable: false),
  170. DeleterUserId = c.Long(),
  171. DeletionTime = c.DateTime(),
  172. LastModificationTime = c.DateTime(),
  173. LastModifierUserId = c.Long(),
  174. CreationTime = c.DateTime(nullable: false),
  175. CreatorUserId = c.Long(),
  176. },
  177. annotations: new Dictionary<string, object>
  178. {
  179. { "DynamicFilter_CurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  180. })
  181. .PrimaryKey(t => t.Id);
  182. CreateTable(
  183. "dbo.CurrentSemiStoreHouse",
  184. c => new
  185. {
  186. Id = c.Int(nullable: false, identity: true),
  187. StoreLocationNo = c.String(maxLength: 32),
  188. CurrentSemiStoreHouseNo = c.String(nullable: false, maxLength: 32),
  189. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  190. StoreHouseId = c.Int(nullable: false),
  191. SemiProductNo = c.String(maxLength: 32),
  192. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  193. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  194. ApplyEnterDate = c.DateTime(),
  195. Remark = c.String(maxLength: 150),
  196. TimeCreated = c.DateTime(),
  197. TimeLastMod = c.DateTime(),
  198. CreatorUserId = c.String(maxLength: 20),
  199. UserIDLastMod = c.String(maxLength: 20),
  200. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  201. PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
  202. InventoryCheckState = c.Int(),
  203. ReturnState = c.Int(),
  204. })
  205. .PrimaryKey(t => t.Id);
  206. CreateTable(
  207. "dbo.CustomerDefaultProduct",
  208. c => new
  209. {
  210. Id = c.Int(nullable: false, identity: true),
  211. CustomerId = c.String(maxLength: 30),
  212. ProductNo = c.String(maxLength: 30),
  213. CustomerProductName = c.String(maxLength: 30),
  214. Sequence = c.Int(nullable: false),
  215. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  216. PartNo = c.String(maxLength: 30),
  217. })
  218. .PrimaryKey(t => t.Id);
  219. CreateTable(
  220. "dbo.CustomerDisProductInfo",
  221. c => new
  222. {
  223. Id = c.Int(nullable: false, identity: true),
  224. ProductOrderNo = c.String(),
  225. CustomerNo = c.String(),
  226. CreationTime = c.DateTime(nullable: false),
  227. CreatorUserId = c.Long(),
  228. })
  229. .PrimaryKey(t => t.Id)
  230. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  231. .Index(t => t.CreatorUserId);
  232. CreateTable(
  233. "dbo.Sys_Users",
  234. c => new
  235. {
  236. Id = c.Long(nullable: false, identity: true),
  237. FactoryID = c.String(maxLength: 20),
  238. DepartmentID = c.String(maxLength: 20),
  239. DutyID = c.Int(),
  240. AccountNo = c.String(maxLength: 20),
  241. Birthday = c.DateTime(),
  242. Address = c.String(maxLength: 200),
  243. ZIP = c.String(maxLength: 50),
  244. Remark = c.String(maxLength: 500),
  245. UserName = c.String(nullable: false, maxLength: 32),
  246. UserType = c.Int(nullable: false),
  247. AuthenticationSource = c.String(maxLength: 64),
  248. EmailAddress = c.String(nullable: false, maxLength: 256),
  249. RealName = c.String(nullable: false, maxLength: 32),
  250. Password = c.String(nullable: false, maxLength: 128),
  251. EmailConfirmationCode = c.String(maxLength: 328),
  252. PasswordResetCode = c.String(maxLength: 328),
  253. LockoutEndDateUtc = c.DateTime(),
  254. AccessFailedCount = c.Int(nullable: false),
  255. IsLockoutEnabled = c.Boolean(nullable: false),
  256. PhoneNumber = c.String(maxLength: 32),
  257. IsPhoneNumberConfirmed = c.Boolean(nullable: false),
  258. SecurityStamp = c.String(maxLength: 128),
  259. IsTwoFactorEnabled = c.Boolean(nullable: false),
  260. IsEmailConfirmed = c.Boolean(nullable: false),
  261. IsActive = c.Boolean(nullable: false),
  262. LastLoginTime = c.DateTime(),
  263. IsDeleted = c.Boolean(nullable: false),
  264. DeleterUserId = c.Long(),
  265. DeletionTime = c.DateTime(),
  266. LastModificationTime = c.DateTime(),
  267. LastModifierUserId = c.Long(),
  268. CreationTime = c.DateTime(nullable: false),
  269. CreatorUserId = c.Long(),
  270. },
  271. annotations: new Dictionary<string, object>
  272. {
  273. { "DynamicFilter_SysUser_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  274. })
  275. .PrimaryKey(t => t.Id)
  276. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  277. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  278. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  279. .Index(t => t.DeleterUserId)
  280. .Index(t => t.LastModifierUserId)
  281. .Index(t => t.CreatorUserId);
  282. CreateTable(
  283. "dbo.Sys_UserRoles",
  284. c => new
  285. {
  286. Id = c.Long(nullable: false, identity: true),
  287. UserId = c.Long(nullable: false),
  288. RoleId = c.Int(nullable: false),
  289. CreationTime = c.DateTime(nullable: false),
  290. CreatorUserId = c.Long(),
  291. })
  292. .PrimaryKey(t => t.Id)
  293. .ForeignKey("dbo.Sys_Users", t => t.UserId, cascadeDelete: true)
  294. .Index(t => t.UserId);
  295. CreateTable(
  296. "dbo.CustomerInvoiceAddress",
  297. c => new
  298. {
  299. Id = c.Int(nullable: false, identity: true),
  300. CustomerId = c.String(nullable: false, maxLength: 30),
  301. InvoiceAddressName = c.String(nullable: false, maxLength: 150),
  302. InvoiceAddress = c.String(nullable: false, maxLength: 250),
  303. LinkMan = c.String(maxLength: 30),
  304. Telephone = c.String(maxLength: 50),
  305. Zip = c.String(maxLength: 8),
  306. Email = c.String(maxLength: 50),
  307. Mobile = c.String(maxLength: 50),
  308. Fax = c.String(maxLength: 50),
  309. IsDeleted = c.Boolean(nullable: false),
  310. DeleterUserId = c.Long(),
  311. DeletionTime = c.DateTime(),
  312. LastModificationTime = c.DateTime(),
  313. LastModifierUserId = c.Long(),
  314. CreationTime = c.DateTime(nullable: false),
  315. CreatorUserId = c.Long(),
  316. },
  317. annotations: new Dictionary<string, object>
  318. {
  319. { "DynamicFilter_CustomerInvoiceAddress_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  320. })
  321. .PrimaryKey(t => t.Id);
  322. CreateTable(
  323. "dbo.Customers",
  324. c => new
  325. {
  326. CustomerId = c.String(nullable: false, maxLength: 128),
  327. CustomerName = c.String(nullable: false, maxLength: 50),
  328. LinkMan = c.String(maxLength: 20),
  329. Address = c.String(maxLength: 150),
  330. WebSite = c.String(maxLength: 50),
  331. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  332. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  333. UserIDLastMod = c.String(maxLength: 20),
  334. IsLock = c.String(nullable: false, maxLength: 1),
  335. Telephone = c.String(maxLength: 50),
  336. Fax = c.String(maxLength: 50),
  337. zip = c.String(maxLength: 6),
  338. Email = c.String(maxLength: 200),
  339. SaleType = c.Int(),
  340. })
  341. .PrimaryKey(t => t.CustomerId);
  342. CreateTable(
  343. "dbo.CustomerSend",
  344. c => new
  345. {
  346. CustomerSendId = c.Int(nullable: false, identity: true),
  347. CustomerId = c.String(nullable: false, maxLength: 30),
  348. CustomerSendName = c.String(nullable: false, maxLength: 150),
  349. SendAdress = c.String(nullable: false, maxLength: 250),
  350. LinkMan = c.String(maxLength: 30),
  351. Telephone = c.String(maxLength: 50),
  352. Zip = c.String(maxLength: 8),
  353. Email = c.String(maxLength: 50),
  354. Mobile = c.String(maxLength: 50),
  355. Fax = c.String(maxLength: 50),
  356. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  357. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  358. UserIDLastMod = c.String(maxLength: 20),
  359. IsLock = c.String(nullable: false, maxLength: 1),
  360. })
  361. .PrimaryKey(t => t.CustomerSendId);
  362. CreateTable(
  363. "dbo.Departments",
  364. c => new
  365. {
  366. DepartmentID = c.String(nullable: false, maxLength: 128),
  367. DepartmentName = c.String(nullable: false, maxLength: 50),
  368. Remark = c.String(maxLength: 200),
  369. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  370. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  371. UserIDLastMod = c.String(maxLength: 20),
  372. IsLock = c.String(nullable: false, maxLength: 1),
  373. OrderStatusList = c.String(maxLength: 300),
  374. })
  375. .PrimaryKey(t => t.DepartmentID);
  376. CreateTable(
  377. "dbo.DeviceMgPlanInfo",
  378. c => new
  379. {
  380. Id = c.Int(nullable: false, identity: true),
  381. No = c.String(maxLength: 50),
  382. PlanType = c.Int(nullable: false),
  383. DeviceNo = c.String(maxLength: 50),
  384. Name = c.String(maxLength: 50),
  385. Description = c.String(),
  386. ExpireDate = c.DateTime(nullable: false),
  387. MaintenanceCycle = c.Int(nullable: false),
  388. MaintenanceDate = c.DateTime(nullable: false),
  389. NextMaintenanceDate = c.DateTime(),
  390. Remark = c.String(maxLength: 500),
  391. NumberOfUsers = c.Int(nullable: false),
  392. IsDeleted = c.Boolean(nullable: false),
  393. DeleterUserId = c.Long(),
  394. DeletionTime = c.DateTime(),
  395. LastModificationTime = c.DateTime(),
  396. LastModifierUserId = c.Long(),
  397. CreationTime = c.DateTime(nullable: false),
  398. CreatorUserId = c.Long(),
  399. },
  400. annotations: new Dictionary<string, object>
  401. {
  402. { "DynamicFilter_DeviceMgPlan_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  403. })
  404. .PrimaryKey(t => t.Id)
  405. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  406. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  407. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  408. .Index(t => t.DeleterUserId)
  409. .Index(t => t.LastModifierUserId)
  410. .Index(t => t.CreatorUserId);
  411. CreateTable(
  412. "dbo.DisqualifiedProductInfo",
  413. c => new
  414. {
  415. Id = c.Int(nullable: false, identity: true),
  416. DisqualifiedNo = c.String(maxLength: 20),
  417. ProductOrderNo = c.String(maxLength: 11),
  418. ReturnOrderNo = c.String(maxLength: 32),
  419. ProductNo = c.String(maxLength: 50),
  420. ProductName = c.String(maxLength: 100),
  421. ProductType = c.Int(nullable: false),
  422. QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  423. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  424. QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
  425. HandleType = c.Int(nullable: false),
  426. CheckUser = c.String(maxLength: 20),
  427. CheckDate = c.DateTime(),
  428. HandleUser = c.String(maxLength: 20),
  429. HandleDate = c.DateTime(),
  430. DisqualifiedType = c.Int(),
  431. CreationTime = c.DateTime(nullable: false),
  432. CreatorUserId = c.Long(),
  433. })
  434. .PrimaryKey(t => t.Id)
  435. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  436. .Index(t => t.CreatorUserId);
  437. CreateTable(
  438. "dbo.Dutys",
  439. c => new
  440. {
  441. DutyID = c.Int(nullable: false, identity: true),
  442. DutyName = c.String(nullable: false, maxLength: 50),
  443. Remark = c.String(maxLength: 200),
  444. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  445. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  446. UserIDLastMod = c.String(maxLength: 20),
  447. IsLock = c.String(nullable: false, maxLength: 1),
  448. })
  449. .PrimaryKey(t => t.DutyID);
  450. CreateTable(
  451. "dbo.EmployeeInfo",
  452. c => new
  453. {
  454. Id = c.Int(nullable: false, identity: true),
  455. No = c.String(maxLength: 20),
  456. Name = c.String(maxLength: 50),
  457. CardId = c.String(maxLength: 18),
  458. Gender = c.Int(nullable: false),
  459. PhoneNumber = c.String(maxLength: 18),
  460. DepartmentNo = c.String(maxLength: 20),
  461. DutyNo = c.String(maxLength: 20),
  462. Description = c.String(maxLength: 500),
  463. UserName = c.String(maxLength: 32),
  464. Remark = c.String(maxLength: 500),
  465. IsDeleted = c.Boolean(nullable: false),
  466. DeleterUserId = c.Long(),
  467. DeletionTime = c.DateTime(),
  468. LastModificationTime = c.DateTime(),
  469. LastModifierUserId = c.Long(),
  470. CreationTime = c.DateTime(nullable: false),
  471. CreatorUserId = c.Long(),
  472. },
  473. annotations: new Dictionary<string, object>
  474. {
  475. { "DynamicFilter_Employee_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  476. })
  477. .PrimaryKey(t => t.Id)
  478. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  479. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  480. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  481. .Index(t => t.DeleterUserId)
  482. .Index(t => t.LastModifierUserId)
  483. .Index(t => t.CreatorUserId);
  484. CreateTable(
  485. "dbo.EmployeeWorkPerformanceInfo",
  486. c => new
  487. {
  488. Id = c.Int(nullable: false, identity: true),
  489. PerformanceNo = c.String(maxLength: 20),
  490. EmployeeId = c.Int(nullable: false),
  491. RelatedNo = c.String(maxLength: 20),
  492. ProductOrderNo = c.String(maxLength: 11),
  493. WorkType = c.Int(nullable: false),
  494. Performance = c.Decimal(precision: 18, scale: 3),
  495. PerformanceUnit = c.String(maxLength: 10),
  496. PerformanceDesc = c.String(maxLength: 500),
  497. Remark = c.String(maxLength: 500),
  498. CreationTime = c.DateTime(nullable: false),
  499. CreatorUserId = c.Long(),
  500. })
  501. .PrimaryKey(t => t.Id)
  502. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  503. .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true)
  504. .Index(t => t.EmployeeId)
  505. .Index(t => t.CreatorUserId);
  506. CreateTable(
  507. "dbo.ExpressLogistics",
  508. c => new
  509. {
  510. Id = c.Int(nullable: false, identity: true),
  511. ExpressName = c.String(maxLength: 50),
  512. Code = c.String(maxLength: 50),
  513. Sort = c.Int(nullable: false),
  514. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  515. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  516. UserIDLastMod = c.String(maxLength: 50),
  517. IsLock = c.String(nullable: false, maxLength: 1),
  518. })
  519. .PrimaryKey(t => t.Id);
  520. CreateTable(
  521. "dbo.ExpressProviderMappers",
  522. c => new
  523. {
  524. Id = c.Int(nullable: false, identity: true),
  525. ExpressId = c.Int(nullable: false),
  526. ProviderId = c.Int(nullable: false),
  527. MapperCode = c.String(maxLength: 50),
  528. QueryUrl = c.String(maxLength: 500),
  529. ExtendInfo = c.String(maxLength: 500),
  530. ActiveStatus = c.Int(),
  531. })
  532. .PrimaryKey(t => t.Id)
  533. .ForeignKey("dbo.ExpressLogistics", t => t.ExpressId, cascadeDelete: true)
  534. .ForeignKey("dbo.ExpressServiceProviders", t => t.ProviderId, cascadeDelete: true)
  535. .Index(t => t.ExpressId)
  536. .Index(t => t.ProviderId);
  537. CreateTable(
  538. "dbo.ExpressServiceProviders",
  539. c => new
  540. {
  541. Id = c.Int(nullable: false, identity: true),
  542. ProviderName = c.String(maxLength: 50),
  543. QueryApiUrl = c.String(maxLength: 150),
  544. CallBackUrl = c.String(maxLength: 150),
  545. ExcuteNamespaceAndMethod = c.String(maxLength: 150),
  546. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  547. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  548. UserIDLastMod = c.String(maxLength: 50),
  549. IsLock = c.String(nullable: false, maxLength: 1),
  550. })
  551. .PrimaryKey(t => t.Id);
  552. CreateTable(
  553. "dbo.Factories",
  554. c => new
  555. {
  556. FactoryID = c.String(nullable: false, maxLength: 128),
  557. FactoryName = c.String(nullable: false, maxLength: 100),
  558. ShortNames = c.String(nullable: false, maxLength: 20),
  559. RegionID = c.String(nullable: false, maxLength: 50),
  560. FactoryURL = c.String(maxLength: 80),
  561. Address = c.String(maxLength: 100),
  562. ZIP = c.String(maxLength: 50),
  563. LinkMan = c.String(maxLength: 50),
  564. Telephone = c.String(maxLength: 50),
  565. Remark = c.String(maxLength: 200),
  566. IsLock = c.String(nullable: false, maxLength: 1),
  567. })
  568. .PrimaryKey(t => t.FactoryID);
  569. CreateTable(
  570. "dbo.FinshedEnterStore",
  571. c => new
  572. {
  573. Id = c.Int(nullable: false, identity: true),
  574. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  575. PackageApplyNo = c.String(nullable: false, maxLength: 32),
  576. PackageProductNo = c.String(maxLength: 50),
  577. ProductNo = c.String(maxLength: 50),
  578. StoreHouseId = c.Int(nullable: false),
  579. SourceStoreHouseId = c.Int(nullable: false),
  580. StoreLocationNo = c.String(maxLength: 32),
  581. ApplyStatus = c.Int(nullable: false),
  582. IsClose = c.Boolean(nullable: false),
  583. ApplySourceType = c.Int(nullable: false),
  584. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  585. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  586. PackageSpecification = c.Decimal(nullable: false, precision: 18, scale: 3),
  587. PackageCount = c.Decimal(nullable: false, precision: 18, scale: 3),
  588. ActualPackageCount = c.Decimal(nullable: false, precision: 18, scale: 3),
  589. AuditUser = c.String(maxLength: 20),
  590. AuditDate = c.DateTime(),
  591. ApplyEnterDate = c.DateTime(),
  592. EnterStoreUser = c.String(maxLength: 20),
  593. EnterStoreDate = c.DateTime(),
  594. Remark = c.String(maxLength: 150),
  595. TimeCreated = c.DateTime(),
  596. TimeLastMod = c.DateTime(),
  597. CreatorUserId = c.String(maxLength: 20),
  598. UserIDLastMod = c.String(maxLength: 20),
  599. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  600. CreateSourceType = c.Int(),
  601. PackageEnterNum = c.String(),
  602. PackageUser = c.String(maxLength: 20),
  603. VerifyUser = c.String(maxLength: 20),
  604. ApplyQuantity2 = c.Decimal(nullable: false, precision: 18, scale: 3),
  605. })
  606. .PrimaryKey(t => t.Id);
  607. CreateTable(
  608. "dbo.FixedAssetInfo",
  609. c => new
  610. {
  611. Id = c.Int(nullable: false, identity: true),
  612. No = c.String(maxLength: 50),
  613. Name = c.String(maxLength: 50),
  614. Model = c.String(maxLength: 50),
  615. Description = c.String(maxLength: 500),
  616. Remark = c.String(maxLength: 500),
  617. IsDeleted = c.Boolean(nullable: false),
  618. DeleterUserId = c.Long(),
  619. DeletionTime = c.DateTime(),
  620. LastModificationTime = c.DateTime(),
  621. LastModifierUserId = c.Long(),
  622. CreationTime = c.DateTime(nullable: false),
  623. CreatorUserId = c.Long(),
  624. },
  625. annotations: new Dictionary<string, object>
  626. {
  627. { "DynamicFilter_FixedAsset_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  628. })
  629. .PrimaryKey(t => t.Id)
  630. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  631. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  632. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  633. .Index(t => t.DeleterUserId)
  634. .Index(t => t.LastModifierUserId)
  635. .Index(t => t.CreatorUserId);
  636. CreateTable(
  637. "dbo.FixedAssetTypeInfo",
  638. c => new
  639. {
  640. Id = c.String(nullable: false, maxLength: 128),
  641. Name = c.String(nullable: false, maxLength: 50),
  642. Description = c.String(maxLength: 500),
  643. Remark = c.String(maxLength: 500),
  644. IsDeleted = c.Boolean(nullable: false),
  645. DeleterUserId = c.Long(),
  646. DeletionTime = c.DateTime(),
  647. LastModificationTime = c.DateTime(),
  648. LastModifierUserId = c.Long(),
  649. CreationTime = c.DateTime(nullable: false),
  650. CreatorUserId = c.Long(),
  651. },
  652. annotations: new Dictionary<string, object>
  653. {
  654. { "DynamicFilter_FixedAssetType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  655. })
  656. .PrimaryKey(t => t.Id)
  657. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  658. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  659. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  660. .Index(t => t.DeleterUserId)
  661. .Index(t => t.LastModifierUserId)
  662. .Index(t => t.CreatorUserId);
  663. CreateTable(
  664. "dbo.Sys_Functions",
  665. c => new
  666. {
  667. Id = c.Int(nullable: false, identity: true),
  668. FunctionNo = c.String(maxLength: 100),
  669. ParentNo = c.String(maxLength: 100),
  670. FunctionName = c.String(maxLength: 100),
  671. PermissionName = c.String(maxLength: 500),
  672. FunctionType = c.Int(nullable: false),
  673. FunctionPath = c.String(maxLength: 500),
  674. Action = c.String(maxLength: 50),
  675. Controller = c.String(maxLength: 50),
  676. Url = c.String(),
  677. Icon = c.String(maxLength: 20),
  678. Class = c.String(maxLength: 100),
  679. Script = c.String(),
  680. Sort = c.Int(nullable: false),
  681. Depth = c.Int(nullable: false),
  682. IsLeaf = c.Boolean(),
  683. IsDeleted = c.Boolean(nullable: false),
  684. DeleterUserId = c.Long(),
  685. DeletionTime = c.DateTime(),
  686. LastModificationTime = c.DateTime(),
  687. LastModifierUserId = c.Long(),
  688. CreationTime = c.DateTime(nullable: false),
  689. CreatorUserId = c.Long(),
  690. },
  691. annotations: new Dictionary<string, object>
  692. {
  693. { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  694. })
  695. .PrimaryKey(t => t.Id)
  696. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  697. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  698. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  699. .Index(t => t.DeleterUserId)
  700. .Index(t => t.LastModifierUserId)
  701. .Index(t => t.CreatorUserId);
  702. CreateTable(
  703. "dbo.InventoryCheck",
  704. c => new
  705. {
  706. Id = c.String(nullable: false, maxLength: 128),
  707. CheckNo = c.String(maxLength: 32),
  708. StoreHouseId = c.Int(nullable: false),
  709. StoreAreaCode = c.String(maxLength: 32),
  710. ShelfNumber = c.String(maxLength: 32),
  711. ShelfLevel = c.String(maxLength: 32),
  712. SequenceNo = c.String(maxLength: 32),
  713. CheckType = c.String(maxLength: 10),
  714. PlanStartDate = c.DateTime(),
  715. PlanEndDate = c.DateTime(),
  716. Remark = c.String(maxLength: 200),
  717. CheckUser = c.String(maxLength: 32),
  718. PublishUser = c.String(maxLength: 32),
  719. FinishDate = c.DateTime(),
  720. CheckState = c.Int(nullable: false),
  721. ProductNo = c.String(maxLength: 32),
  722. IsDeleted = c.Boolean(nullable: false),
  723. DeleterUserId = c.Long(),
  724. DeletionTime = c.DateTime(),
  725. LastModificationTime = c.DateTime(),
  726. LastModifierUserId = c.Long(),
  727. CreationTime = c.DateTime(nullable: false),
  728. CreatorUserId = c.Long(),
  729. },
  730. annotations: new Dictionary<string, object>
  731. {
  732. { "DynamicFilter_InventoryCheckInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  733. })
  734. .PrimaryKey(t => t.Id);
  735. CreateTable(
  736. "dbo.InventoryCheckRecord",
  737. c => new
  738. {
  739. Id = c.String(nullable: false, maxLength: 128),
  740. CheckNo = c.String(maxLength: 32),
  741. CurrentStoreHouseNo = c.String(maxLength: 32),
  742. CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  743. StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  744. LastModificationTime = c.DateTime(),
  745. LastModifierUserId = c.Long(),
  746. CreationTime = c.DateTime(nullable: false),
  747. CreatorUserId = c.Long(),
  748. })
  749. .PrimaryKey(t => t.Id);
  750. CreateTable(
  751. "dbo.LicenseDocumentInfo",
  752. c => new
  753. {
  754. Id = c.Int(nullable: false, identity: true),
  755. No = c.String(maxLength: 50),
  756. Name = c.String(maxLength: 50),
  757. Description = c.String(maxLength: 500),
  758. LicenseGroup = c.String(maxLength: 50),
  759. LicenseType = c.String(maxLength: 50),
  760. FilePath = c.String(maxLength: 300),
  761. ExpireDate = c.DateTime(nullable: false),
  762. Remark = c.String(maxLength: 500),
  763. IsDeleted = c.Boolean(nullable: false),
  764. DeleterUserId = c.Long(),
  765. DeletionTime = c.DateTime(),
  766. LastModificationTime = c.DateTime(),
  767. LastModifierUserId = c.Long(),
  768. CreationTime = c.DateTime(nullable: false),
  769. CreatorUserId = c.Long(),
  770. },
  771. annotations: new Dictionary<string, object>
  772. {
  773. { "DynamicFilter_LicenseDocument_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  774. })
  775. .PrimaryKey(t => t.Id)
  776. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  777. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  778. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  779. .Index(t => t.DeleterUserId)
  780. .Index(t => t.LastModifierUserId)
  781. .Index(t => t.CreatorUserId);
  782. CreateTable(
  783. "dbo.LicenseTypeInfo",
  784. c => new
  785. {
  786. Id = c.Int(nullable: false, identity: true),
  787. Name = c.String(maxLength: 50),
  788. GroupName = c.String(maxLength: 50),
  789. LastModificationTime = c.DateTime(),
  790. LastModifierUserId = c.Long(),
  791. CreationTime = c.DateTime(nullable: false),
  792. CreatorUserId = c.Long(),
  793. })
  794. .PrimaryKey(t => t.Id)
  795. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  796. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  797. .Index(t => t.LastModifierUserId)
  798. .Index(t => t.CreatorUserId);
  799. CreateTable(
  800. "dbo.MaintenanceMemberInfo",
  801. c => new
  802. {
  803. Id = c.String(nullable: false, maxLength: 128),
  804. MaintenanceNo = c.String(),
  805. EmployeeId = c.Int(nullable: false),
  806. Name = c.String(),
  807. StartDateTime = c.DateTime(),
  808. EndDateTime = c.DateTime(),
  809. WorkHour = c.Decimal(nullable: false, precision: 18, scale: 2),
  810. IsConfirm = c.Boolean(nullable: false),
  811. WorkDesc = c.String(),
  812. Remark = c.String(maxLength: 500),
  813. CreationTime = c.DateTime(nullable: false),
  814. CreatorUserId = c.Long(),
  815. })
  816. .PrimaryKey(t => t.Id)
  817. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  818. .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true)
  819. .Index(t => t.EmployeeId)
  820. .Index(t => t.CreatorUserId);
  821. CreateTable(
  822. "dbo.MaintenanceRecordInfo",
  823. c => new
  824. {
  825. Id = c.String(nullable: false, maxLength: 128),
  826. DeviceMgPlanNo = c.String(maxLength: 50),
  827. DeviceNo = c.String(maxLength: 50),
  828. DeviceName = c.String(maxLength: 50),
  829. MgType = c.Int(nullable: false),
  830. Description = c.String(maxLength: 500),
  831. Address = c.String(maxLength: 200),
  832. PlanDate = c.DateTime(nullable: false),
  833. CompleteState = c.Int(nullable: false),
  834. CompleteDate = c.DateTime(),
  835. Remark = c.String(maxLength: 500),
  836. CreationTime = c.DateTime(nullable: false),
  837. CreatorUserId = c.Long(),
  838. })
  839. .PrimaryKey(t => t.Id)
  840. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  841. .Index(t => t.CreatorUserId);
  842. CreateTable(
  843. "dbo.MoldInfo",
  844. c => new
  845. {
  846. Id = c.Int(nullable: false, identity: true),
  847. No = c.String(maxLength: 50),
  848. Name = c.String(maxLength: 50),
  849. Model = c.String(maxLength: 50),
  850. Material = c.String(maxLength: 50),
  851. Description = c.String(maxLength: 500),
  852. Remark = c.String(maxLength: 500),
  853. CustomerName = c.String(maxLength: 50),
  854. ShelfNum = c.String(maxLength: 50),
  855. OuterDiameter = c.String(maxLength: 50),
  856. InsideDiameter = c.String(maxLength: 50),
  857. Thickness = c.String(maxLength: 50),
  858. Height = c.String(maxLength: 50),
  859. Rigidity = c.String(maxLength: 50),
  860. MaintenanceCycle = c.Int(nullable: false),
  861. IsDeleted = c.Boolean(nullable: false),
  862. DeleterUserId = c.Long(),
  863. DeletionTime = c.DateTime(),
  864. LastModificationTime = c.DateTime(),
  865. LastModifierUserId = c.Long(),
  866. CreationTime = c.DateTime(nullable: false),
  867. CreatorUserId = c.Long(),
  868. },
  869. annotations: new Dictionary<string, object>
  870. {
  871. { "DynamicFilter_Mold_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  872. })
  873. .PrimaryKey(t => t.Id)
  874. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  875. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  876. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  877. .Index(t => t.DeleterUserId)
  878. .Index(t => t.LastModifierUserId)
  879. .Index(t => t.CreatorUserId);
  880. CreateTable(
  881. "dbo.MoldProductionRecord",
  882. c => new
  883. {
  884. Id = c.Long(nullable: false, identity: true),
  885. MoldNo = c.String(nullable: false, maxLength: 50),
  886. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  887. Quantity = c.Int(nullable: false),
  888. LastModificationTime = c.DateTime(),
  889. LastModifierUserId = c.Long(),
  890. CreationTime = c.DateTime(nullable: false),
  891. CreatorUserId = c.Long(),
  892. })
  893. .PrimaryKey(t => t.Id)
  894. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  895. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  896. .Index(t => t.LastModifierUserId)
  897. .Index(t => t.CreatorUserId);
  898. CreateTable(
  899. "dbo.OrderHeader",
  900. c => new
  901. {
  902. OrderNo = c.String(nullable: false, maxLength: 128),
  903. CustomerId = c.String(nullable: false, maxLength: 30),
  904. LinkName = c.String(nullable: false, maxLength: 50),
  905. OrderDate = c.DateTime(nullable: false, storeType: "smalldatetime"),
  906. Fax = c.String(maxLength: 50),
  907. Telephone = c.String(maxLength: 50),
  908. CustomerSendId = c.Int(nullable: false),
  909. StockNo = c.String(maxLength: 50),
  910. OrderStatusId = c.Int(nullable: false),
  911. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  912. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  913. UserIDLastMod = c.String(maxLength: 30),
  914. SaleType = c.Int(),
  915. SaleMan = c.String(maxLength: 50),
  916. IsLock = c.String(maxLength: 1),
  917. })
  918. .PrimaryKey(t => t.OrderNo);
  919. CreateTable(
  920. "dbo.OrderItems",
  921. c => new
  922. {
  923. OrderItemId = c.Int(nullable: false, identity: true),
  924. OrderNo = c.String(nullable: false, maxLength: 30),
  925. ProductNo = c.String(nullable: false, maxLength: 30),
  926. Price = c.Decimal(nullable: false, storeType: "money"),
  927. AfterTaxPrice = c.Decimal(nullable: false, storeType: "money"),
  928. CurrencyId = c.String(nullable: false, maxLength: 10),
  929. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3, storeType: "numeric"),
  930. OrderUnitId = c.Int(nullable: false),
  931. SendDate = c.DateTime(nullable: false, storeType: "smalldatetime"),
  932. IsReport = c.String(nullable: false, maxLength: 1),
  933. IsPartSend = c.String(nullable: false, maxLength: 1),
  934. OrderItemStatusId = c.Int(),
  935. WareHouse = c.String(maxLength: 50),
  936. OrderItemDesc = c.String(maxLength: 500),
  937. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  938. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  939. UserIDLastMod = c.String(maxLength: 20),
  940. PartNo = c.String(maxLength: 30),
  941. ToCnyRate = c.Decimal(precision: 18, scale: 3),
  942. EmergencyLevel = c.Int(nullable: false),
  943. IsLock = c.String(maxLength: 1),
  944. StandardName = c.String(maxLength: 50),
  945. StoreCompleteState = c.Int(nullable: false),
  946. LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  947. MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  948. LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  949. MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  950. })
  951. .PrimaryKey(t => t.OrderItemId);
  952. CreateTable(
  953. "dbo.OrderProduction",
  954. c => new
  955. {
  956. Id = c.Int(nullable: false, identity: true),
  957. OrderItemId = c.Int(nullable: false),
  958. ProductionOrderNo = c.String(maxLength: 11),
  959. Remark = c.String(maxLength: 150),
  960. TimeCreated = c.DateTime(),
  961. CreatorUserId = c.String(maxLength: 20),
  962. })
  963. .PrimaryKey(t => t.Id);
  964. CreateTable(
  965. "dbo.OrderSendBills",
  966. c => new
  967. {
  968. OrderSendBillNo = c.String(nullable: false, maxLength: 128),
  969. CustomerId = c.String(nullable: false, maxLength: 30),
  970. SendDate = c.DateTime(storeType: "smalldatetime"),
  971. SendAddress = c.String(maxLength: 250),
  972. ContactTels = c.String(maxLength: 50),
  973. ContactMan = c.String(maxLength: 50),
  974. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  975. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  976. UserIDLastMod = c.String(maxLength: 20),
  977. IsDoBill = c.String(maxLength: 1),
  978. ExpressId = c.Int(),
  979. ExpressBillNo = c.String(maxLength: 50),
  980. })
  981. .PrimaryKey(t => t.OrderSendBillNo);
  982. CreateTable(
  983. "dbo.OrderSendExceed",
  984. c => new
  985. {
  986. Id = c.Int(nullable: false, identity: true),
  987. OrderItemId = c.Int(nullable: false),
  988. ExceedQuantity = c.Decimal(nullable: false, precision: 18, scale: 3, storeType: "numeric"),
  989. OperatorMan = c.String(maxLength: 30),
  990. OrderNo = c.String(),
  991. ProductNo = c.String(),
  992. LastModificationTime = c.DateTime(),
  993. LastModifierUserId = c.Long(),
  994. CreationTime = c.DateTime(nullable: false),
  995. CreatorUserId = c.Long(),
  996. })
  997. .PrimaryKey(t => t.Id);
  998. CreateTable(
  999. "dbo.OrderSend",
  1000. c => new
  1001. {
  1002. OrderSendId = c.Int(nullable: false, identity: true),
  1003. OrderItemId = c.Int(nullable: false),
  1004. SendDate = c.DateTime(storeType: "smalldatetime"),
  1005. SendQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1006. OrderUnitId = c.Int(),
  1007. Remark = c.String(maxLength: 250),
  1008. OrderSendBillNo = c.String(maxLength: 20),
  1009. OrderStickBillNo = c.String(maxLength: 40),
  1010. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1011. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1012. UserIDLastMod = c.String(maxLength: 20),
  1013. CreatorUserId = c.String(maxLength: 20),
  1014. QuantityPerPack = c.Decimal(precision: 18, scale: 3),
  1015. PackageCount = c.Decimal(precision: 18, scale: 3),
  1016. ProductBatchNum = c.String(),
  1017. StoreLocationNo = c.String(maxLength: 32),
  1018. CurrentProductStoreHouseNo = c.String(),
  1019. StatementBillNo = c.String(maxLength: 32),
  1020. LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  1021. MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  1022. LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  1023. MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  1024. SendBillSort = c.Int(nullable: false),
  1025. StatementBillSort = c.Int(nullable: false),
  1026. })
  1027. .PrimaryKey(t => t.OrderSendId);
  1028. CreateTable(
  1029. "dbo.OrderStickBills",
  1030. c => new
  1031. {
  1032. OrderStickBillNo = c.String(nullable: false, maxLength: 128),
  1033. CustomerId = c.String(nullable: false, maxLength: 30),
  1034. CreatDate = c.DateTime(storeType: "smalldatetime"),
  1035. StickNum = c.String(maxLength: 30),
  1036. StickMan = c.String(maxLength: 20),
  1037. Description = c.String(maxLength: 4000),
  1038. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1039. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1040. UserIDLastMod = c.String(maxLength: 20),
  1041. InvoiceState = c.Int(),
  1042. Amount = c.Decimal(precision: 18, scale: 2),
  1043. OriginalStickNum = c.String(maxLength: 30),
  1044. ReturnOrderNo = c.String(maxLength: 30),
  1045. OrderNo = c.String(maxLength: 500),
  1046. InvoiceType = c.Int(nullable: false),
  1047. })
  1048. .PrimaryKey(t => t.OrderStickBillNo);
  1049. CreateTable(
  1050. "dbo.OrderUnit",
  1051. c => new
  1052. {
  1053. OrderUnitId = c.Int(nullable: false, identity: true),
  1054. OrderUnitName = c.String(maxLength: 50),
  1055. ProductNum = c.Int(),
  1056. OrderUnitDesc = c.String(maxLength: 250),
  1057. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1058. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1059. UserIDLastMod = c.String(),
  1060. })
  1061. .PrimaryKey(t => t.OrderUnitId);
  1062. CreateTable(
  1063. "dbo.OutFactory",
  1064. c => new
  1065. {
  1066. OutFactoryId = c.String(nullable: false, maxLength: 128),
  1067. OutFactoryName = c.String(nullable: false, maxLength: 50),
  1068. LinkMan = c.String(maxLength: 20),
  1069. Address = c.String(maxLength: 150),
  1070. WebSite = c.String(maxLength: 50),
  1071. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1072. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1073. UserIDLastMod = c.String(maxLength: 20),
  1074. IsLock = c.String(nullable: false, maxLength: 1),
  1075. Telephone = c.String(maxLength: 50),
  1076. Fax = c.String(maxLength: 50),
  1077. zip = c.String(maxLength: 6),
  1078. Email = c.String(maxLength: 200),
  1079. })
  1080. .PrimaryKey(t => t.OutFactoryId);
  1081. CreateTable(
  1082. "dbo.PackageApply",
  1083. c => new
  1084. {
  1085. Id = c.Int(nullable: false, identity: true),
  1086. PackageApplyNo = c.String(nullable: false, maxLength: 32),
  1087. CurrentStoreHouseNo = c.String(maxLength: 32),
  1088. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  1089. SemiProductNo = c.String(maxLength: 32),
  1090. ProductNo = c.String(maxLength: 32),
  1091. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1092. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1093. SourceStore = c.Int(nullable: false),
  1094. ApplyStatus = c.String(nullable: false, maxLength: 1),
  1095. IsClose = c.Boolean(nullable: false),
  1096. ApplyDate = c.DateTime(),
  1097. Remark = c.String(maxLength: 150),
  1098. TimeCreated = c.DateTime(),
  1099. TimeLastMod = c.DateTime(),
  1100. CreatorUserId = c.String(maxLength: 20),
  1101. UserIDLastMod = c.String(maxLength: 20),
  1102. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1103. })
  1104. .PrimaryKey(t => t.Id);
  1105. CreateTable(
  1106. "dbo.Sys_Permissions",
  1107. c => new
  1108. {
  1109. Id = c.Long(nullable: false, identity: true),
  1110. PermissionNo = c.String(maxLength: 32),
  1111. PermissionName = c.String(maxLength: 500),
  1112. Master = c.Int(),
  1113. MasterValue = c.String(),
  1114. Access = c.Int(),
  1115. AccessValue = c.String(),
  1116. IsGranted = c.Boolean(nullable: false),
  1117. CreationTime = c.DateTime(nullable: false),
  1118. CreatorUserId = c.Long(),
  1119. })
  1120. .PrimaryKey(t => t.Id);
  1121. CreateTable(
  1122. "dbo.ProductInspectInfos",
  1123. c => new
  1124. {
  1125. Id = c.Int(nullable: false, identity: true),
  1126. ProductInspectReportNo = c.String(nullable: false, maxLength: 32),
  1127. ProductInspectNo = c.String(nullable: false, maxLength: 32),
  1128. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  1129. SemiProductNo = c.String(maxLength: 32),
  1130. InspectStatus = c.Int(nullable: false),
  1131. InspectSubject = c.String(maxLength: 50),
  1132. InspectResult = c.Int(nullable: false),
  1133. InspectDate = c.DateTime(),
  1134. InspectMember = c.String(maxLength: 100),
  1135. IsLock = c.String(maxLength: 1),
  1136. InspectContent = c.String(maxLength: 1000),
  1137. TimeCreated = c.DateTime(),
  1138. TimeLastMod = c.DateTime(),
  1139. CreatorUserId = c.String(maxLength: 20),
  1140. UserIDLastMod = c.String(maxLength: 20),
  1141. })
  1142. .PrimaryKey(t => t.Id);
  1143. CreateTable(
  1144. "dbo.ProductInspectReportInfos",
  1145. c => new
  1146. {
  1147. Id = c.Int(nullable: false, identity: true),
  1148. ProductInspectReportNo = c.String(nullable: false, maxLength: 32),
  1149. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  1150. SemiProductNo = c.String(maxLength: 32),
  1151. ConfirmStatus = c.Int(nullable: false),
  1152. InspectCount = c.Int(nullable: false),
  1153. ConfirmDate = c.DateTime(),
  1154. ConfirmUser = c.String(maxLength: 100),
  1155. InspectContent = c.String(maxLength: 1000),
  1156. CreationTime = c.DateTime(nullable: false),
  1157. CreatorUserId = c.Long(),
  1158. })
  1159. .PrimaryKey(t => t.Id);
  1160. CreateTable(
  1161. "dbo.ProductionOrderLogInfo",
  1162. c => new
  1163. {
  1164. Id = c.Int(nullable: false, identity: true),
  1165. ProductionNo = c.String(maxLength: 20),
  1166. ProductOrderNo = c.String(maxLength: 11),
  1167. EmployeeId = c.Int(nullable: false),
  1168. CarNo = c.String(maxLength: 20),
  1169. QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1170. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1171. QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
  1172. CreationTime = c.DateTime(nullable: false),
  1173. CreatorUserId = c.Long(),
  1174. })
  1175. .PrimaryKey(t => t.Id)
  1176. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  1177. .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true)
  1178. .Index(t => t.EmployeeId)
  1179. .Index(t => t.CreatorUserId);
  1180. CreateTable(
  1181. "dbo.ProductionOrders",
  1182. c => new
  1183. {
  1184. Id = c.Int(nullable: false, identity: true),
  1185. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  1186. ProductionOrderStatus = c.Int(nullable: false),
  1187. StoveNo = c.String(maxLength: 20),
  1188. CarNo = c.String(maxLength: 20),
  1189. SemiProductNo = c.String(maxLength: 32),
  1190. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1191. RawMaterials = c.String(maxLength: 100),
  1192. Material = c.String(maxLength: 50),
  1193. PartNo = c.String(maxLength: 50),
  1194. Model = c.String(maxLength: 50),
  1195. SurfaceColor = c.String(maxLength: 50),
  1196. Rigidity = c.String(maxLength: 50),
  1197. Size = c.String(maxLength: 50),
  1198. ProcessingType = c.String(maxLength: 1),
  1199. ProcessingLevel = c.String(maxLength: 1),
  1200. Remark = c.String(maxLength: 150),
  1201. IsChecked = c.Int(),
  1202. TimeCreated = c.DateTime(),
  1203. TimeLastMod = c.DateTime(),
  1204. CreatorUserId = c.String(maxLength: 20),
  1205. UserIDLastMod = c.String(maxLength: 20),
  1206. IsLock = c.String(maxLength: 1),
  1207. SourceProductionOrderNo = c.String(maxLength: 11),
  1208. PlanProduceDate = c.DateTime(),
  1209. EnterQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1210. ProductionType = c.String(maxLength: 1),
  1211. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1212. OutsourcingFactory = c.String(),
  1213. EnterDate = c.DateTime(),
  1214. InspectDate = c.DateTime(),
  1215. HasExported = c.Boolean(nullable: false),
  1216. MaxQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1217. })
  1218. .PrimaryKey(t => t.Id);
  1219. CreateTable(
  1220. "dbo.ProductMapper",
  1221. c => new
  1222. {
  1223. Id = c.Int(nullable: false, identity: true),
  1224. ProductNo = c.String(maxLength: 50),
  1225. PreProductNo = c.String(maxLength: 50),
  1226. PreProductType = c.Int(nullable: false),
  1227. NewProductType = c.Int(nullable: false),
  1228. IsDeleted = c.Boolean(nullable: false),
  1229. DeleterUserId = c.Long(),
  1230. DeletionTime = c.DateTime(),
  1231. LastModificationTime = c.DateTime(),
  1232. LastModifierUserId = c.Long(),
  1233. CreationTime = c.DateTime(nullable: false),
  1234. CreatorUserId = c.Long(),
  1235. },
  1236. annotations: new Dictionary<string, object>
  1237. {
  1238. { "DynamicFilter_ProductMapper_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1239. })
  1240. .PrimaryKey(t => t.Id);
  1241. CreateTable(
  1242. "dbo.ProductOutStore",
  1243. c => new
  1244. {
  1245. Id = c.Int(nullable: false, identity: true),
  1246. ProductionOrderNo = c.String(maxLength: 11),
  1247. CurrentProductStoreHouseNo = c.String(maxLength: 32),
  1248. ProductNo = c.String(maxLength: 50),
  1249. StoreHouseId = c.Int(nullable: false),
  1250. ApplyStatus = c.Int(nullable: false),
  1251. IsClose = c.Boolean(nullable: false),
  1252. IsConfirm = c.Boolean(),
  1253. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1254. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1255. AuditUser = c.String(maxLength: 20),
  1256. AuditDate = c.DateTime(),
  1257. OutStoreUser = c.String(maxLength: 20),
  1258. OutStoreDate = c.DateTime(),
  1259. ApplyOutDate = c.DateTime(),
  1260. Remark = c.String(maxLength: 150),
  1261. TimeCreated = c.DateTime(),
  1262. TimeLastMod = c.DateTime(),
  1263. CreatorUserId = c.String(maxLength: 20),
  1264. UserIDLastMod = c.String(maxLength: 20),
  1265. OrderSendId = c.Int(nullable: false),
  1266. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1267. ApplyOutStoreSourceType = c.Int(nullable: false),
  1268. CreateSourceType = c.Int(),
  1269. })
  1270. .PrimaryKey(t => t.Id);
  1271. CreateTable(
  1272. "dbo.ProductProperties",
  1273. c => new
  1274. {
  1275. Id = c.Int(nullable: false, identity: true),
  1276. PropertyType = c.String(maxLength: 50),
  1277. PropertyNo = c.String(maxLength: 50),
  1278. PropertyValue = c.String(maxLength: 50),
  1279. DisplayValue = c.String(maxLength: 150),
  1280. ContentInfo = c.String(maxLength: 250),
  1281. IsDeleted = c.Boolean(nullable: false),
  1282. DeleterUserId = c.Long(),
  1283. DeletionTime = c.DateTime(),
  1284. LastModificationTime = c.DateTime(),
  1285. LastModifierUserId = c.Long(),
  1286. CreationTime = c.DateTime(nullable: false),
  1287. CreatorUserId = c.Long(),
  1288. },
  1289. annotations: new Dictionary<string, object>
  1290. {
  1291. { "DynamicFilter_ProductProperty_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1292. })
  1293. .PrimaryKey(t => t.Id);
  1294. CreateTable(
  1295. "dbo.Products",
  1296. c => new
  1297. {
  1298. ProductNo = c.String(nullable: false, maxLength: 128),
  1299. ProductName = c.String(nullable: false, maxLength: 50),
  1300. Model = c.String(maxLength: 50),
  1301. StandardId = c.Int(),
  1302. Material = c.String(maxLength: 50),
  1303. ProductDesc = c.String(maxLength: 200),
  1304. SurfaceColor = c.String(maxLength: 50),
  1305. Rigidity = c.String(maxLength: 50),
  1306. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1307. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1308. UserIDLastMod = c.String(maxLength: 20),
  1309. Sequence = c.Int(nullable: false),
  1310. IsStandard = c.String(nullable: false, maxLength: 1),
  1311. IsLock = c.String(nullable: false, maxLength: 1),
  1312. Defprice = c.Decimal(storeType: "money"),
  1313. TranUnitValue = c.Decimal(precision: 18, scale: 3),
  1314. PartNo = c.String(maxLength: 50),
  1315. SpecialDesc = c.String(maxLength: 50),
  1316. ModelNo = c.String(maxLength: 20),
  1317. MaterialNo = c.String(maxLength: 20),
  1318. SurfaceColorNo = c.String(maxLength: 20),
  1319. RigidityNo = c.String(maxLength: 20),
  1320. SpecialNo = c.String(maxLength: 20),
  1321. PrevProductNo = c.String(maxLength: 50),
  1322. })
  1323. .PrimaryKey(t => t.ProductNo);
  1324. CreateTable(
  1325. "dbo.ProductInspectReportContents",
  1326. c => new
  1327. {
  1328. Id = c.Int(nullable: false, identity: true),
  1329. ProductionOrderNo = c.String(maxLength: 32),
  1330. PtoductInspectNo = c.String(maxLength: 32),
  1331. ReportContent = c.String(),
  1332. })
  1333. .PrimaryKey(t => t.Id);
  1334. CreateTable(
  1335. "dbo.QualityIssueLabelInfo",
  1336. c => new
  1337. {
  1338. Id = c.String(nullable: false, maxLength: 128),
  1339. Name = c.String(nullable: false, maxLength: 50),
  1340. Description = c.String(maxLength: 500),
  1341. Remark = c.String(maxLength: 500),
  1342. IsDeleted = c.Boolean(nullable: false),
  1343. DeleterUserId = c.Long(),
  1344. DeletionTime = c.DateTime(),
  1345. LastModificationTime = c.DateTime(),
  1346. LastModifierUserId = c.Long(),
  1347. CreationTime = c.DateTime(nullable: false),
  1348. CreatorUserId = c.Long(),
  1349. },
  1350. annotations: new Dictionary<string, object>
  1351. {
  1352. { "DynamicFilter_QualityIssueLabel_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1353. })
  1354. .PrimaryKey(t => t.Id)
  1355. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  1356. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  1357. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  1358. .Index(t => t.DeleterUserId)
  1359. .Index(t => t.LastModifierUserId)
  1360. .Index(t => t.CreatorUserId);
  1361. CreateTable(
  1362. "dbo.Regions",
  1363. c => new
  1364. {
  1365. RegionID = c.String(nullable: false, maxLength: 128),
  1366. RegionName = c.String(nullable: false, maxLength: 50),
  1367. FatherRegionID = c.String(nullable: false, maxLength: 50),
  1368. URL = c.String(maxLength: 80),
  1369. Depth = c.Int(nullable: false),
  1370. IsLeaf = c.String(nullable: false, maxLength: 1),
  1371. Sort = c.Int(nullable: false),
  1372. Path = c.String(nullable: false, maxLength: 220),
  1373. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1374. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1375. UserIDLastMod = c.String(maxLength: 20),
  1376. IsLock = c.String(nullable: false, maxLength: 1),
  1377. })
  1378. .PrimaryKey(t => t.RegionID);
  1379. CreateTable(
  1380. "dbo.ReturnGoodOrder",
  1381. c => new
  1382. {
  1383. Id = c.Int(nullable: false, identity: true),
  1384. ReturnOrderNo = c.String(maxLength: 32),
  1385. SendOrderNo = c.String(maxLength: 32),
  1386. OrderNo = c.String(maxLength: 32),
  1387. OrderItemNo = c.String(maxLength: 32),
  1388. ProductNo = c.String(maxLength: 32),
  1389. ProductionOrderNo = c.String(maxLength: 32),
  1390. CustomerId = c.String(maxLength: 32),
  1391. Reason = c.String(maxLength: 500),
  1392. Amount = c.Decimal(precision: 18, scale: 2),
  1393. AuditAmount = c.Decimal(precision: 18, scale: 2),
  1394. Quantity = c.Decimal(precision: 18, scale: 3),
  1395. HandleUser = c.String(maxLength: 32),
  1396. ApplyUser = c.String(maxLength: 32),
  1397. ConfirmUser = c.String(maxLength: 32),
  1398. ReturnDate = c.DateTime(),
  1399. ApplyDate = c.DateTime(),
  1400. ConfirmDate = c.DateTime(),
  1401. ReturnState = c.Int(nullable: false),
  1402. ReturnType = c.Int(nullable: false),
  1403. LinkName = c.String(maxLength: 50),
  1404. SurveyReason = c.String(maxLength: 500),
  1405. SurveyDetail = c.String(maxLength: 500),
  1406. Solution = c.String(maxLength: 500),
  1407. IsDeleted = c.Boolean(nullable: false),
  1408. DeleterUserId = c.Long(),
  1409. DeletionTime = c.DateTime(),
  1410. LastModificationTime = c.DateTime(),
  1411. LastModifierUserId = c.Long(),
  1412. CreationTime = c.DateTime(nullable: false),
  1413. CreatorUserId = c.Long(),
  1414. },
  1415. annotations: new Dictionary<string, object>
  1416. {
  1417. { "DynamicFilter_ReturnGoodOrder_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1418. })
  1419. .PrimaryKey(t => t.Id)
  1420. .Index(t => t.ReturnOrderNo, unique: true);
  1421. CreateTable(
  1422. "dbo.RmEnterStore",
  1423. c => new
  1424. {
  1425. Id = c.String(nullable: false, maxLength: 128),
  1426. ProductionOrderNo = c.String(maxLength: 11),
  1427. RmProductNo = c.String(maxLength: 50),
  1428. StoreHouseId = c.Int(nullable: false),
  1429. StoreLocationNo = c.String(maxLength: 32),
  1430. ApplyStatus = c.Int(nullable: false),
  1431. IsClose = c.Boolean(nullable: false),
  1432. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1433. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1434. AuditUser = c.String(maxLength: 32),
  1435. AuditDate = c.DateTime(),
  1436. ApplyEnterDate = c.DateTime(),
  1437. EnterStoreUser = c.String(maxLength: 32),
  1438. EnterStoreDate = c.DateTime(),
  1439. Remark = c.String(maxLength: 150),
  1440. ProductBatchNum = c.String(maxLength: 32),
  1441. CreateSourceType = c.Int(nullable: false),
  1442. IsDeleted = c.Boolean(nullable: false),
  1443. DeleterUserId = c.Long(),
  1444. DeletionTime = c.DateTime(),
  1445. LastModificationTime = c.DateTime(),
  1446. LastModifierUserId = c.Long(),
  1447. CreationTime = c.DateTime(nullable: false),
  1448. CreatorUserId = c.Long(),
  1449. },
  1450. annotations: new Dictionary<string, object>
  1451. {
  1452. { "DynamicFilter_RmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1453. })
  1454. .PrimaryKey(t => t.Id);
  1455. CreateTable(
  1456. "dbo.RmOutStore",
  1457. c => new
  1458. {
  1459. Id = c.String(nullable: false, maxLength: 128),
  1460. ProductionOrderNo = c.String(maxLength: 11),
  1461. CurrentRmStoreHouseNo = c.String(maxLength: 32),
  1462. RmProductNo = c.String(maxLength: 50),
  1463. StoreHouseId = c.Int(nullable: false),
  1464. ApplyStatus = c.Int(nullable: false),
  1465. IsClose = c.Boolean(nullable: false),
  1466. IsConfirm = c.Boolean(),
  1467. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1468. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1469. AuditUser = c.String(maxLength: 150),
  1470. AuditDate = c.DateTime(),
  1471. OutStoreUser = c.String(maxLength: 150),
  1472. OutStoreDate = c.DateTime(),
  1473. ApplyOutDate = c.DateTime(),
  1474. Remark = c.String(maxLength: 150),
  1475. ProductBatchNum = c.String(maxLength: 32),
  1476. CreateSourceType = c.Int(nullable: false),
  1477. IsDeleted = c.Boolean(nullable: false),
  1478. DeleterUserId = c.Long(),
  1479. DeletionTime = c.DateTime(),
  1480. LastModificationTime = c.DateTime(),
  1481. LastModifierUserId = c.Long(),
  1482. CreationTime = c.DateTime(nullable: false),
  1483. CreatorUserId = c.Long(),
  1484. },
  1485. annotations: new Dictionary<string, object>
  1486. {
  1487. { "DynamicFilter_RmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1488. })
  1489. .PrimaryKey(t => t.Id);
  1490. CreateTable(
  1491. "dbo.RmProduct",
  1492. c => new
  1493. {
  1494. Id = c.String(nullable: false, maxLength: 128),
  1495. ProductName = c.String(maxLength: 50),
  1496. Material = c.String(maxLength: 50),
  1497. Model = c.String(maxLength: 50),
  1498. ProductDesc = c.String(maxLength: 200),
  1499. ModelNo = c.String(maxLength: 20),
  1500. MaterialNo = c.String(maxLength: 20),
  1501. IsDeleted = c.Boolean(nullable: false),
  1502. DeleterUserId = c.Long(),
  1503. DeletionTime = c.DateTime(),
  1504. LastModificationTime = c.DateTime(),
  1505. LastModifierUserId = c.Long(),
  1506. CreationTime = c.DateTime(nullable: false),
  1507. CreatorUserId = c.Long(),
  1508. },
  1509. annotations: new Dictionary<string, object>
  1510. {
  1511. { "DynamicFilter_RmProduct_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1512. })
  1513. .PrimaryKey(t => t.Id);
  1514. CreateTable(
  1515. "dbo.Sys_Roles",
  1516. c => new
  1517. {
  1518. Id = c.Int(nullable: false, identity: true),
  1519. Name = c.String(nullable: false, maxLength: 32),
  1520. RoleDisplayName = c.String(nullable: false, maxLength: 64),
  1521. Description = c.String(maxLength: 1000),
  1522. RoleType = c.Int(nullable: false),
  1523. IsStatic = c.Boolean(nullable: false),
  1524. IsDefault = c.Boolean(nullable: false),
  1525. IsDeleted = c.Boolean(nullable: false),
  1526. DeleterUserId = c.Long(),
  1527. DeletionTime = c.DateTime(),
  1528. LastModificationTime = c.DateTime(),
  1529. LastModifierUserId = c.Long(),
  1530. CreationTime = c.DateTime(nullable: false),
  1531. CreatorUserId = c.Long(),
  1532. },
  1533. annotations: new Dictionary<string, object>
  1534. {
  1535. { "DynamicFilter_SysRole_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1536. })
  1537. .PrimaryKey(t => t.Id)
  1538. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  1539. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  1540. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  1541. .Index(t => t.DeleterUserId)
  1542. .Index(t => t.LastModifierUserId)
  1543. .Index(t => t.CreatorUserId);
  1544. CreateTable(
  1545. "dbo.ScheduleOrderSend",
  1546. c => new
  1547. {
  1548. Id = c.Int(nullable: false, identity: true),
  1549. OrderItemId = c.Int(nullable: false),
  1550. Remark = c.String(maxLength: 500),
  1551. PlanQuantity = c.Decimal(precision: 18, scale: 2),
  1552. SendUser = c.String(maxLength: 32),
  1553. PlanDate = c.DateTime(),
  1554. SendState = c.Int(nullable: false),
  1555. LastModificationTime = c.DateTime(),
  1556. LastModifierUserId = c.Long(),
  1557. CreationTime = c.DateTime(nullable: false),
  1558. CreatorUserId = c.Long(),
  1559. })
  1560. .PrimaryKey(t => t.Id);
  1561. CreateTable(
  1562. "dbo.N_ViewScheduleOrderSend",
  1563. c => new
  1564. {
  1565. Id = c.Int(nullable: false, identity: true),
  1566. OrderItemId = c.Int(nullable: false),
  1567. PlanQuantity = c.Decimal(precision: 18, scale: 2),
  1568. SendUser = c.String(),
  1569. Remark = c.String(),
  1570. PlanDate = c.DateTime(),
  1571. SendState = c.Int(nullable: false),
  1572. OrderNo = c.String(),
  1573. ProductNo = c.String(),
  1574. ProductName = c.String(),
  1575. Model = c.String(),
  1576. Material = c.String(),
  1577. SurfaceColor = c.String(),
  1578. Rigidity = c.String(),
  1579. CustomerName = c.String(),
  1580. CustomerId = c.String(),
  1581. })
  1582. .PrimaryKey(t => t.Id);
  1583. CreateTable(
  1584. "dbo.ScrapEnterStore",
  1585. c => new
  1586. {
  1587. Id = c.String(nullable: false, maxLength: 128),
  1588. ProductionOrderNo = c.String(maxLength: 11),
  1589. ProductNo = c.String(maxLength: 50),
  1590. StoreHouseId = c.Int(nullable: false),
  1591. StoreLocationNo = c.String(maxLength: 32),
  1592. ApplyStatus = c.Int(nullable: false),
  1593. IsClose = c.Boolean(nullable: false),
  1594. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1595. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1596. AuditUser = c.String(maxLength: 32),
  1597. AuditDate = c.DateTime(),
  1598. ApplyEnterDate = c.DateTime(),
  1599. EnterStoreUser = c.String(maxLength: 32),
  1600. EnterStoreDate = c.DateTime(),
  1601. Remark = c.String(maxLength: 150),
  1602. ProductType = c.Int(nullable: false),
  1603. ScrapSource = c.Int(nullable: false),
  1604. ScrapSourceNo = c.String(maxLength: 50),
  1605. IsDeleted = c.Boolean(nullable: false),
  1606. DeleterUserId = c.Long(),
  1607. DeletionTime = c.DateTime(),
  1608. LastModificationTime = c.DateTime(),
  1609. LastModifierUserId = c.Long(),
  1610. CreationTime = c.DateTime(nullable: false),
  1611. CreatorUserId = c.Long(),
  1612. },
  1613. annotations: new Dictionary<string, object>
  1614. {
  1615. { "DynamicFilter_ScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1616. })
  1617. .PrimaryKey(t => t.Id);
  1618. CreateTable(
  1619. "dbo.ScrapTypeInfo",
  1620. c => new
  1621. {
  1622. Id = c.String(nullable: false, maxLength: 128),
  1623. Name = c.String(nullable: false, maxLength: 50),
  1624. Description = c.String(maxLength: 500),
  1625. Remark = c.String(maxLength: 500),
  1626. IsDeleted = c.Boolean(nullable: false),
  1627. DeleterUserId = c.Long(),
  1628. DeletionTime = c.DateTime(),
  1629. LastModificationTime = c.DateTime(),
  1630. LastModifierUserId = c.Long(),
  1631. CreationTime = c.DateTime(nullable: false),
  1632. CreatorUserId = c.Long(),
  1633. },
  1634. annotations: new Dictionary<string, object>
  1635. {
  1636. { "DynamicFilter_ScrapType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1637. })
  1638. .PrimaryKey(t => t.Id)
  1639. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  1640. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  1641. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  1642. .Index(t => t.DeleterUserId)
  1643. .Index(t => t.LastModifierUserId)
  1644. .Index(t => t.CreatorUserId);
  1645. CreateTable(
  1646. "dbo.SemiEnterStore",
  1647. c => new
  1648. {
  1649. Id = c.Int(nullable: false, identity: true),
  1650. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  1651. StoreHouseId = c.Int(nullable: false),
  1652. ApplyStatus = c.String(nullable: false, maxLength: 5),
  1653. IsClose = c.Boolean(nullable: false),
  1654. ApplySource = c.String(nullable: false, maxLength: 5),
  1655. SemiProductNo = c.String(maxLength: 32),
  1656. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1657. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1658. AuditUser = c.String(maxLength: 20),
  1659. AuditDate = c.DateTime(),
  1660. EnterStoreUser = c.String(maxLength: 20),
  1661. EnterStoreDate = c.DateTime(),
  1662. ApplyEnterDate = c.DateTime(),
  1663. Remark = c.String(maxLength: 150),
  1664. TimeCreated = c.DateTime(),
  1665. TimeLastMod = c.DateTime(),
  1666. CreatorUserId = c.String(maxLength: 20),
  1667. UserIDLastMod = c.String(maxLength: 20),
  1668. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1669. CreateSourceType = c.Int(),
  1670. StoreLocationNo = c.String(maxLength: 32),
  1671. })
  1672. .PrimaryKey(t => t.Id);
  1673. CreateTable(
  1674. "dbo.SemiOutStores",
  1675. c => new
  1676. {
  1677. Id = c.Int(nullable: false, identity: true),
  1678. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  1679. CurrentSemiStoreHouseNo = c.String(maxLength: 32),
  1680. StoreHouseId = c.Int(nullable: false),
  1681. ApplyStatus = c.String(nullable: false, maxLength: 5),
  1682. ApplyTypes = c.Int(nullable: false),
  1683. IsClose = c.Boolean(nullable: false),
  1684. ApplyOutStoreSource = c.String(nullable: false, maxLength: 5),
  1685. IsConfirm = c.Boolean(),
  1686. SemiProductNo = c.String(maxLength: 32),
  1687. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1688. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1689. ApplyOutDate = c.DateTime(),
  1690. Remark = c.String(maxLength: 150),
  1691. TimeCreated = c.DateTime(),
  1692. TimeLastMod = c.DateTime(),
  1693. CreatorUserId = c.String(maxLength: 20),
  1694. UserIDLastMod = c.String(maxLength: 20),
  1695. AuditUser = c.String(maxLength: 20),
  1696. AuditDate = c.DateTime(),
  1697. OutStoreUser = c.String(maxLength: 20),
  1698. OutStoreDate = c.DateTime(),
  1699. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  1700. CreateSourceType = c.Int(),
  1701. })
  1702. .PrimaryKey(t => t.Id);
  1703. CreateTable(
  1704. "dbo.SemiProducts",
  1705. c => new
  1706. {
  1707. SemiProductNo = c.String(nullable: false, maxLength: 128),
  1708. SemiProductName = c.String(maxLength: 50),
  1709. Model = c.String(maxLength: 50),
  1710. Material = c.String(maxLength: 50),
  1711. ProductDesc = c.String(maxLength: 200),
  1712. SurfaceColor = c.String(maxLength: 50),
  1713. Rigidity = c.String(maxLength: 50),
  1714. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1715. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1716. UserIDLastMod = c.String(maxLength: 20),
  1717. IsStandard = c.String(nullable: false, maxLength: 1),
  1718. Sequence = c.Int(nullable: false),
  1719. IsLock = c.String(nullable: false, maxLength: 1),
  1720. PartNo = c.String(maxLength: 50),
  1721. TranUnitValue = c.Decimal(precision: 18, scale: 3),
  1722. SpecialDesc = c.String(maxLength: 50),
  1723. ModelNo = c.String(maxLength: 20),
  1724. MaterialNo = c.String(maxLength: 20),
  1725. SurfaceColorNo = c.String(maxLength: 20),
  1726. RigidityNo = c.String(maxLength: 20),
  1727. SpecialNo = c.String(maxLength: 20),
  1728. PrevProductNo = c.String(maxLength: 50),
  1729. })
  1730. .PrimaryKey(t => t.SemiProductNo);
  1731. CreateTable(
  1732. "dbo.SemiProductStore",
  1733. c => new
  1734. {
  1735. Id = c.Int(nullable: false, identity: true),
  1736. StoreHouseId = c.Int(nullable: false),
  1737. SemiProductNo = c.String(maxLength: 32),
  1738. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  1739. StoreYear = c.String(maxLength: 5),
  1740. StoreMonth = c.String(maxLength: 4),
  1741. Active = c.String(nullable: false, maxLength: 1),
  1742. Remark = c.String(maxLength: 150),
  1743. TimeCreated = c.DateTime(),
  1744. TimeLastMod = c.DateTime(),
  1745. CreatorUserId = c.String(maxLength: 20),
  1746. UserIDLastMod = c.String(maxLength: 20),
  1747. })
  1748. .PrimaryKey(t => t.Id);
  1749. CreateTable(
  1750. "dbo.Sys_Settings",
  1751. c => new
  1752. {
  1753. Id = c.Int(nullable: false, identity: true),
  1754. SettingNo = c.String(maxLength: 32),
  1755. SettingName = c.String(maxLength: 50),
  1756. SettingType = c.Int(nullable: false),
  1757. Code = c.String(maxLength: 100),
  1758. Value = c.String(maxLength: 500),
  1759. Description = c.String(maxLength: 1000),
  1760. Remark = c.String(maxLength: 1000),
  1761. IsDeleted = c.Boolean(nullable: false),
  1762. DeleterUserId = c.Long(),
  1763. DeletionTime = c.DateTime(),
  1764. LastModificationTime = c.DateTime(),
  1765. LastModifierUserId = c.Long(),
  1766. CreationTime = c.DateTime(nullable: false),
  1767. CreatorUserId = c.Long(),
  1768. },
  1769. annotations: new Dictionary<string, object>
  1770. {
  1771. { "DynamicFilter_SysSetting_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1772. })
  1773. .PrimaryKey(t => t.Id)
  1774. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  1775. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  1776. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  1777. .Index(t => t.DeleterUserId)
  1778. .Index(t => t.LastModifierUserId)
  1779. .Index(t => t.CreatorUserId);
  1780. CreateTable(
  1781. "dbo.ShortMessage",
  1782. c => new
  1783. {
  1784. MsgID = c.Int(nullable: false, identity: true),
  1785. SendUserID = c.String(nullable: false, maxLength: 20),
  1786. Title = c.String(maxLength: 100),
  1787. Content = c.String(maxLength: 3000),
  1788. SendTime = c.DateTime(storeType: "smalldatetime"),
  1789. IsDelete = c.String(nullable: false, maxLength: 1),
  1790. RecieveUserIds = c.String(maxLength: 400),
  1791. })
  1792. .PrimaryKey(t => t.MsgID);
  1793. CreateTable(
  1794. "dbo.ShortMsgDetail",
  1795. c => new
  1796. {
  1797. DetailID = c.Int(nullable: false, identity: true),
  1798. MsgID = c.Int(nullable: false),
  1799. RecvUserID = c.String(nullable: false, maxLength: 20),
  1800. IsRead = c.String(nullable: false, maxLength: 1),
  1801. })
  1802. .PrimaryKey(t => t.DetailID);
  1803. CreateTable(
  1804. "dbo.StandardCatalog",
  1805. c => new
  1806. {
  1807. Id = c.Int(nullable: false, identity: true),
  1808. StandardNo = c.String(maxLength: 50),
  1809. StandardAbbr = c.String(nullable: false, maxLength: 50),
  1810. StandardAbbrName = c.String(nullable: false, maxLength: 50),
  1811. StandardName = c.String(nullable: false, maxLength: 150),
  1812. Rigidity = c.String(maxLength: 250),
  1813. Param = c.String(maxLength: 250),
  1814. Drawing = c.String(),
  1815. Remark = c.String(maxLength: 250),
  1816. IsDeleted = c.Boolean(nullable: false),
  1817. DeleterUserId = c.Long(),
  1818. DeletionTime = c.DateTime(),
  1819. LastModificationTime = c.DateTime(),
  1820. LastModifierUserId = c.Long(),
  1821. CreationTime = c.DateTime(nullable: false),
  1822. CreatorUserId = c.Long(),
  1823. },
  1824. annotations: new Dictionary<string, object>
  1825. {
  1826. { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1827. })
  1828. .PrimaryKey(t => t.Id);
  1829. CreateTable(
  1830. "dbo.StandardDetail",
  1831. c => new
  1832. {
  1833. Id = c.Int(nullable: false, identity: true),
  1834. StandardId = c.Int(nullable: false),
  1835. Specs = c.String(nullable: false, maxLength: 50),
  1836. StandardName = c.String(nullable: false, maxLength: 150),
  1837. InnerDiameter1 = c.Decimal(precision: 18, scale: 2),
  1838. InnerDiameter2 = c.Decimal(precision: 18, scale: 2),
  1839. OutDiameter1 = c.Decimal(precision: 18, scale: 2),
  1840. OutDiameter2 = c.Decimal(precision: 18, scale: 2),
  1841. Thickness1 = c.Decimal(precision: 18, scale: 2),
  1842. Thickness2 = c.Decimal(precision: 18, scale: 2),
  1843. Height1 = c.Decimal(precision: 18, scale: 2),
  1844. Height2 = c.Decimal(precision: 18, scale: 2),
  1845. InnerChamfer1 = c.Decimal(precision: 18, scale: 2),
  1846. InnerChamfer2 = c.Decimal(precision: 18, scale: 2),
  1847. OutChamfer1 = c.Decimal(precision: 18, scale: 2),
  1848. OutChamfer2 = c.Decimal(precision: 18, scale: 2),
  1849. ThousandWeigh = c.Decimal(precision: 18, scale: 2),
  1850. IsDeleted = c.Boolean(nullable: false),
  1851. DeleterUserId = c.Long(),
  1852. DeletionTime = c.DateTime(),
  1853. LastModificationTime = c.DateTime(),
  1854. LastModifierUserId = c.Long(),
  1855. CreationTime = c.DateTime(nullable: false),
  1856. CreatorUserId = c.Long(),
  1857. },
  1858. annotations: new Dictionary<string, object>
  1859. {
  1860. { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1861. })
  1862. .PrimaryKey(t => t.Id);
  1863. CreateTable(
  1864. "dbo.Standard",
  1865. c => new
  1866. {
  1867. StandardId = c.Int(nullable: false, identity: true),
  1868. StandardName = c.String(nullable: false, maxLength: 50),
  1869. StandardDesc = c.String(maxLength: 150),
  1870. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1871. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1872. UserIDLastMod = c.String(maxLength: 20),
  1873. })
  1874. .PrimaryKey(t => t.StandardId);
  1875. CreateTable(
  1876. "dbo.StatementBill",
  1877. c => new
  1878. {
  1879. Id = c.Int(nullable: false, identity: true),
  1880. StatementBillNo = c.String(nullable: false, maxLength: 30),
  1881. CustomerId = c.String(nullable: false, maxLength: 30),
  1882. BillMan = c.String(maxLength: 20),
  1883. Description = c.String(maxLength: 4000),
  1884. StatementState = c.Int(),
  1885. OrderStickBillNo = c.String(maxLength: 30),
  1886. LastModificationTime = c.DateTime(),
  1887. LastModifierUserId = c.Long(),
  1888. CreationTime = c.DateTime(nullable: false),
  1889. CreatorUserId = c.Long(),
  1890. })
  1891. .PrimaryKey(t => t.Id)
  1892. .Index(t => t.StatementBillNo, unique: true);
  1893. CreateTable(
  1894. "dbo.StoreHouseLocation",
  1895. c => new
  1896. {
  1897. Id = c.Int(nullable: false, identity: true),
  1898. StoreLocationNo = c.String(maxLength: 32),
  1899. StoreAreaCode = c.String(maxLength: 32),
  1900. ShelfNumber = c.String(maxLength: 50),
  1901. ShelfLevel = c.String(maxLength: 10),
  1902. SequenceNo = c.String(maxLength: 10),
  1903. Remark = c.String(maxLength: 250),
  1904. StoreHouseId = c.Int(),
  1905. IsDeleted = c.Boolean(nullable: false),
  1906. DeleterUserId = c.Long(),
  1907. DeletionTime = c.DateTime(),
  1908. LastModificationTime = c.DateTime(),
  1909. LastModifierUserId = c.Long(),
  1910. CreationTime = c.DateTime(nullable: false),
  1911. CreatorUserId = c.Long(),
  1912. },
  1913. annotations: new Dictionary<string, object>
  1914. {
  1915. { "DynamicFilter_StoreHouseLocation_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1916. })
  1917. .PrimaryKey(t => t.Id);
  1918. CreateTable(
  1919. "dbo.StoreHouse",
  1920. c => new
  1921. {
  1922. StoreHouseID = c.Int(nullable: false, identity: true),
  1923. StoreHouseName = c.String(nullable: false, maxLength: 50),
  1924. StoreHouseTypeId = c.Int(),
  1925. Address = c.String(maxLength: 250),
  1926. Tel = c.String(maxLength: 50),
  1927. Fax = c.String(maxLength: 50),
  1928. ContactMan = c.String(maxLength: 50),
  1929. Remark = c.String(maxLength: 500),
  1930. IsLock = c.String(maxLength: 1),
  1931. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1932. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1933. UserIDLastMod = c.String(maxLength: 20),
  1934. StoreHouseNo = c.String(maxLength: 20),
  1935. })
  1936. .PrimaryKey(t => t.StoreHouseID);
  1937. CreateTable(
  1938. "dbo.Sys_AttachFiles",
  1939. c => new
  1940. {
  1941. Id = c.Int(nullable: false, identity: true),
  1942. AttachNo = c.String(maxLength: 32),
  1943. TableName = c.String(maxLength: 50),
  1944. ColumnName = c.String(maxLength: 50),
  1945. SourceKey = c.String(maxLength: 50),
  1946. FileTitle = c.String(maxLength: 50),
  1947. FileName = c.String(maxLength: 50),
  1948. FilePath = c.String(maxLength: 500),
  1949. FileType = c.String(maxLength: 20),
  1950. FileExt = c.String(maxLength: 10),
  1951. Description = c.String(maxLength: 500),
  1952. CreationTime = c.DateTime(nullable: false),
  1953. CreatorUserId = c.Long(),
  1954. })
  1955. .PrimaryKey(t => t.Id);
  1956. CreateTable(
  1957. "dbo.Sys_Helps",
  1958. c => new
  1959. {
  1960. HelpId = c.Int(nullable: false, identity: true),
  1961. Classification = c.String(maxLength: 40),
  1962. HelpTitle = c.String(nullable: false, maxLength: 20),
  1963. HelpKeyWords = c.String(maxLength: 20),
  1964. HelpContent = c.String(storeType: "ntext"),
  1965. Sequence = c.Int(nullable: false),
  1966. TimeCreated = c.DateTime(storeType: "smalldatetime"),
  1967. TimeLastMod = c.DateTime(storeType: "smalldatetime"),
  1968. UserIDLastMod = c.String(maxLength: 20),
  1969. })
  1970. .PrimaryKey(t => t.HelpId);
  1971. CreateTable(
  1972. "dbo.Sys_States",
  1973. c => new
  1974. {
  1975. Id = c.Int(nullable: false, identity: true),
  1976. StateNo = c.String(maxLength: 32),
  1977. StateName = c.String(maxLength: 50),
  1978. TableName = c.String(nullable: false, maxLength: 50),
  1979. ColumnName = c.String(nullable: false, maxLength: 50),
  1980. CodeValue = c.String(nullable: false, maxLength: 100),
  1981. DisplayValue = c.String(nullable: false, maxLength: 100),
  1982. IsDeleted = c.Boolean(nullable: false),
  1983. DeleterUserId = c.Long(),
  1984. DeletionTime = c.DateTime(),
  1985. LastModificationTime = c.DateTime(),
  1986. LastModifierUserId = c.Long(),
  1987. CreationTime = c.DateTime(nullable: false),
  1988. CreatorUserId = c.Long(),
  1989. },
  1990. annotations: new Dictionary<string, object>
  1991. {
  1992. { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  1993. })
  1994. .PrimaryKey(t => t.Id)
  1995. .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
  1996. .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
  1997. .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
  1998. .Index(t => t.DeleterUserId)
  1999. .Index(t => t.LastModifierUserId)
  2000. .Index(t => t.CreatorUserId);
  2001. CreateTable(
  2002. "dbo.TemplateInfos",
  2003. c => new
  2004. {
  2005. Id = c.Int(nullable: false, identity: true),
  2006. TemplateNo = c.String(maxLength: 50),
  2007. Name = c.String(maxLength: 50),
  2008. Description = c.String(maxLength: 500),
  2009. Content = c.String(),
  2010. Type = c.Int(nullable: false),
  2011. TempKey = c.String(maxLength: 50),
  2012. FilePath = c.String(maxLength: 300),
  2013. FileExt = c.String(maxLength: 50),
  2014. ClassPath = c.String(maxLength: 100),
  2015. })
  2016. .PrimaryKey(t => t.Id);
  2017. CreateTable(
  2018. "dbo.Sys_UserLoginLogs",
  2019. c => new
  2020. {
  2021. Id = c.Long(nullable: false, identity: true),
  2022. UserId = c.Long(),
  2023. UserNameOrEmailAddress = c.String(maxLength: 255),
  2024. ClientIpAddress = c.String(maxLength: 64),
  2025. ClientName = c.String(maxLength: 128),
  2026. BrowserInfo = c.String(maxLength: 512),
  2027. Result = c.Byte(nullable: false),
  2028. CreationTime = c.DateTime(nullable: false),
  2029. })
  2030. .PrimaryKey(t => t.Id);
  2031. CreateTable(
  2032. "dbo.Sys_UserLogins",
  2033. c => new
  2034. {
  2035. Id = c.Long(nullable: false, identity: true),
  2036. UserId = c.Long(nullable: false),
  2037. LoginProvider = c.String(nullable: false, maxLength: 128),
  2038. ProviderKey = c.String(nullable: false, maxLength: 256),
  2039. })
  2040. .PrimaryKey(t => t.Id);
  2041. CreateTable(
  2042. "dbo.v_BookedProductNum",
  2043. c => new
  2044. {
  2045. ProductNo = c.String(nullable: false, maxLength: 128),
  2046. BookedQuantity = c.Decimal(precision: 18, scale: 2),
  2047. })
  2048. .PrimaryKey(t => t.ProductNo);
  2049. CreateTable(
  2050. "dbo.v_CanProductStore",
  2051. c => new
  2052. {
  2053. ProductNo = c.String(nullable: false, maxLength: 128),
  2054. CanUserQuantity = c.Decimal(precision: 18, scale: 2),
  2055. })
  2056. .PrimaryKey(t => t.ProductNo);
  2057. CreateTable(
  2058. "dbo.N_ViewCurrentProductStoreHouse",
  2059. c => new
  2060. {
  2061. Id = c.Int(nullable: false, identity: true),
  2062. CurrentProductStoreHouseNo = c.String(nullable: false),
  2063. ProductionOrderNo = c.String(nullable: false),
  2064. StoreHouseId = c.Int(nullable: false),
  2065. StoreLocationNo = c.String(),
  2066. ProductNo = c.String(),
  2067. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2068. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2069. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2070. Remark = c.String(maxLength: 150),
  2071. TimeCreated = c.DateTime(),
  2072. TimeLastMod = c.DateTime(),
  2073. CreatorUserId = c.String(maxLength: 20),
  2074. UserIDLastMod = c.String(maxLength: 20),
  2075. ProductName = c.String(maxLength: 50),
  2076. Model = c.String(maxLength: 20),
  2077. Material = c.String(maxLength: 50),
  2078. SurfaceColor = c.String(maxLength: 50),
  2079. Rigidity = c.String(maxLength: 50),
  2080. IsStandard = c.String(maxLength: 1),
  2081. ProductDesc = c.String(),
  2082. PartNo = c.String(),
  2083. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2),
  2084. PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
  2085. InventoryCheckState = c.Int(),
  2086. ReturnState = c.Int(),
  2087. StoreAreaCode = c.String(),
  2088. ShelfNumber = c.String(),
  2089. ShelfLevel = c.String(),
  2090. SequenceNo = c.String(),
  2091. LocationRemark = c.String(),
  2092. })
  2093. .PrimaryKey(t => t.Id);
  2094. CreateTable(
  2095. "dbo.N_ViewCurrentRmStoreHouse",
  2096. c => new
  2097. {
  2098. Id = c.String(nullable: false, maxLength: 128),
  2099. ProductionOrderNo = c.String(maxLength: 11),
  2100. StoreHouseId = c.Int(nullable: false),
  2101. StoreLocationNo = c.String(maxLength: 32),
  2102. RmProductNo = c.String(maxLength: 32),
  2103. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2104. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2105. Remark = c.String(maxLength: 150),
  2106. PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
  2107. ProductName = c.String(),
  2108. Material = c.String(),
  2109. Model = c.String(),
  2110. ProductDesc = c.String(),
  2111. StoreHouseName = c.String(),
  2112. ProductBatchNum = c.String(),
  2113. IsDeleted = c.Boolean(nullable: false),
  2114. DeleterUserId = c.Long(),
  2115. DeletionTime = c.DateTime(),
  2116. LastModificationTime = c.DateTime(),
  2117. LastModifierUserId = c.Long(),
  2118. CreationTime = c.DateTime(nullable: false),
  2119. CreatorUserId = c.Long(),
  2120. },
  2121. annotations: new Dictionary<string, object>
  2122. {
  2123. { "DynamicFilter_ViewCurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  2124. })
  2125. .PrimaryKey(t => t.Id);
  2126. CreateTable(
  2127. "dbo.N_ViewCurrentSemiStoreHouse",
  2128. c => new
  2129. {
  2130. Id = c.Int(nullable: false, identity: true),
  2131. CurrentSemiStoreHouseNo = c.String(nullable: false, maxLength: 32),
  2132. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  2133. StoreHouseId = c.Int(nullable: false),
  2134. SemiProductNo = c.String(maxLength: 32),
  2135. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2136. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2137. ApplyEnterDate = c.DateTime(),
  2138. Remark = c.String(maxLength: 150),
  2139. TimeCreated = c.DateTime(),
  2140. TimeLastMod = c.DateTime(),
  2141. CreatorUserId = c.String(maxLength: 20),
  2142. UserIDLastMod = c.String(maxLength: 20),
  2143. SemiProductName = c.String(maxLength: 50),
  2144. Model = c.String(maxLength: 20),
  2145. PartNo = c.String(),
  2146. Material = c.String(maxLength: 50),
  2147. SurfaceColor = c.String(maxLength: 50),
  2148. Rigidity = c.String(maxLength: 50),
  2149. IsStandard = c.String(maxLength: 1),
  2150. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2),
  2151. StoreLocationNo = c.String(),
  2152. PreMonthQuantity = c.Decimal(precision: 18, scale: 3),
  2153. InventoryCheckState = c.Int(),
  2154. ReturnState = c.Int(),
  2155. StoreAreaCode = c.String(),
  2156. ShelfNumber = c.String(),
  2157. ShelfLevel = c.String(),
  2158. SequenceNo = c.String(),
  2159. })
  2160. .PrimaryKey(t => t.Id);
  2161. CreateTable(
  2162. "dbo.v_SemiProductStoreInfo",
  2163. c => new
  2164. {
  2165. Id = c.String(nullable: false, maxLength: 128),
  2166. AllQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2167. AllFreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2168. AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2),
  2169. SemiProductName = c.String(),
  2170. Model = c.String(),
  2171. Material = c.String(),
  2172. SurfaceColor = c.String(),
  2173. Rigidity = c.String(),
  2174. PartNo = c.String(),
  2175. ProductDesc = c.String(),
  2176. })
  2177. .PrimaryKey(t => t.Id);
  2178. CreateTable(
  2179. "dbo.v_ProductStoreInfo",
  2180. c => new
  2181. {
  2182. ProductNo = c.String(nullable: false, maxLength: 128),
  2183. AllQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2184. AllFreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2185. AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2),
  2186. ProductName = c.String(),
  2187. Model = c.String(),
  2188. Material = c.String(),
  2189. SurfaceColor = c.String(),
  2190. Rigidity = c.String(),
  2191. PartNo = c.String(),
  2192. Defprice = c.Decimal(precision: 18, scale: 3),
  2193. })
  2194. .PrimaryKey(t => t.ProductNo);
  2195. CreateTable(
  2196. "dbo.v_customerstick",
  2197. c => new
  2198. {
  2199. OrderSendId = c.Int(nullable: false, identity: true),
  2200. OrderNo = c.String(),
  2201. StockNo = c.String(),
  2202. OrderSendBillNo = c.String(),
  2203. SendDate = c.DateTime(),
  2204. PartNo = c.String(),
  2205. Model = c.String(),
  2206. SurfaceColor = c.String(),
  2207. Rigidity = c.String(),
  2208. SendQuantity = c.Decimal(precision: 18, scale: 2),
  2209. OrderUnitId = c.Int(),
  2210. Price = c.Decimal(precision: 18, scale: 2),
  2211. total = c.Decimal(precision: 18, scale: 2),
  2212. CustomerId = c.String(),
  2213. OrderUnitName = c.String(),
  2214. IsDoBill = c.String(),
  2215. Remark = c.String(),
  2216. OrderStickBillNo = c.String(),
  2217. StatementBillNo = c.String(),
  2218. })
  2219. .PrimaryKey(t => t.OrderSendId);
  2220. CreateTable(
  2221. "dbo.N_ViewDisqualifiedProduction",
  2222. c => new
  2223. {
  2224. Id = c.Int(nullable: false, identity: true),
  2225. DisqualifiedNo = c.String(maxLength: 20),
  2226. ProductOrderNo = c.String(maxLength: 11),
  2227. ReturnOrderNo = c.String(maxLength: 32),
  2228. ProductNo = c.String(maxLength: 50),
  2229. ProductName = c.String(maxLength: 100),
  2230. ProductType = c.Int(nullable: false),
  2231. QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  2232. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  2233. QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
  2234. HandleType = c.Int(nullable: false),
  2235. CheckUser = c.String(maxLength: 20),
  2236. CheckDate = c.DateTime(),
  2237. HandleUser = c.String(maxLength: 20),
  2238. HandleDate = c.DateTime(),
  2239. DisqualifiedType = c.Int(),
  2240. CreationTime = c.DateTime(nullable: false),
  2241. Model = c.String(),
  2242. Material = c.String(),
  2243. SurfaceColor = c.String(),
  2244. Rigidity = c.String(),
  2245. })
  2246. .PrimaryKey(t => t.Id);
  2247. CreateTable(
  2248. "dbo.N_ViewDisqualifiedReturn",
  2249. c => new
  2250. {
  2251. Id = c.Int(nullable: false, identity: true),
  2252. DisqualifiedNo = c.String(maxLength: 20),
  2253. ProductOrderNo = c.String(maxLength: 11),
  2254. ReturnOrderNo = c.String(maxLength: 32),
  2255. ProductNo = c.String(maxLength: 50),
  2256. ProductName = c.String(maxLength: 100),
  2257. ProductType = c.Int(nullable: false),
  2258. QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  2259. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3),
  2260. QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3),
  2261. HandleType = c.Int(nullable: false),
  2262. CheckUser = c.String(maxLength: 20),
  2263. CheckDate = c.DateTime(),
  2264. HandleUser = c.String(maxLength: 20),
  2265. HandleDate = c.DateTime(),
  2266. DisqualifiedType = c.Int(),
  2267. CreationTime = c.DateTime(nullable: false),
  2268. Model = c.String(),
  2269. Material = c.String(),
  2270. SurfaceColor = c.String(),
  2271. Rigidity = c.String(),
  2272. CustomerId = c.String(),
  2273. CustomerName = c.String(),
  2274. })
  2275. .PrimaryKey(t => t.Id);
  2276. CreateTable(
  2277. "dbo.NV_ViewEmployeeInfo",
  2278. c => new
  2279. {
  2280. Id = c.Int(nullable: false, identity: true),
  2281. No = c.String(),
  2282. Name = c.String(),
  2283. CardId = c.String(),
  2284. Gender = c.Int(nullable: false),
  2285. PhoneNumber = c.String(),
  2286. DepartmentNo = c.String(),
  2287. DepartmentName = c.String(),
  2288. DutyNo = c.String(),
  2289. DutyName = c.String(),
  2290. Description = c.String(),
  2291. UserName = c.String(),
  2292. Remark = c.String(),
  2293. })
  2294. .PrimaryKey(t => t.Id);
  2295. CreateTable(
  2296. "dbo.vEnterOutLogDetail_c",
  2297. c => new
  2298. {
  2299. Id = c.String(nullable: false, maxLength: 128),
  2300. ActualId = c.Int(nullable: false),
  2301. EnterOutFlag = c.Int(nullable: false),
  2302. ProductNo = c.String(),
  2303. StoreHouseId = c.Int(nullable: false),
  2304. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2305. DateTiem = c.DateTime(),
  2306. UserIDLastMod = c.String(),
  2307. Remark = c.String(),
  2308. ProductName = c.String(),
  2309. Model = c.String(),
  2310. Material = c.String(),
  2311. SurfaceColor = c.String(),
  2312. Rigidity = c.String(),
  2313. PartNo = c.String(),
  2314. CustomerId = c.String(),
  2315. CustomerName = c.String(),
  2316. ProductionOrderNo = c.String(),
  2317. })
  2318. .PrimaryKey(t => t.Id);
  2319. CreateTable(
  2320. "dbo.v_Store_Query",
  2321. c => new
  2322. {
  2323. Id = c.String(nullable: false, maxLength: 128),
  2324. ActualId = c.Int(nullable: false),
  2325. EnterOutFlag = c.Int(nullable: false),
  2326. ProductNo = c.String(),
  2327. StoreHouseId = c.Int(nullable: false),
  2328. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2329. DateTiem = c.DateTime(),
  2330. UserIDLastMod = c.String(),
  2331. Remark = c.String(),
  2332. ProductName = c.String(),
  2333. Model = c.String(),
  2334. Material = c.String(),
  2335. SurfaceColor = c.String(),
  2336. Rigidity = c.String(),
  2337. PartNo = c.String(),
  2338. AllQuantity = c.Decimal(precision: 18, scale: 2),
  2339. AllFreezeQuantity = c.Decimal(precision: 18, scale: 2),
  2340. AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2),
  2341. })
  2342. .PrimaryKey(t => t.Id);
  2343. CreateTable(
  2344. "dbo.v_EnterOutSemiProductStore",
  2345. c => new
  2346. {
  2347. Id = c.String(nullable: false, maxLength: 128),
  2348. ActualId = c.Int(nullable: false),
  2349. EnterOutFlag = c.Int(nullable: false),
  2350. SemiProductNo = c.String(),
  2351. StoreHouseId = c.Int(nullable: false),
  2352. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2353. DateTiem = c.DateTime(),
  2354. UserIDLastMod = c.String(),
  2355. Remark = c.String(),
  2356. SemiProductName = c.String(),
  2357. Model = c.String(),
  2358. Material = c.String(),
  2359. SurfaceColor = c.String(),
  2360. Rigidity = c.String(),
  2361. PartNo = c.String(),
  2362. ProductDesc = c.String(),
  2363. })
  2364. .PrimaryKey(t => t.Id);
  2365. CreateTable(
  2366. "dbo.N_ViewInventoryCheckRecord_Product",
  2367. c => new
  2368. {
  2369. Id = c.String(nullable: false, maxLength: 128),
  2370. ProductNo = c.String(),
  2371. ProductName = c.String(),
  2372. Model = c.String(),
  2373. Material = c.String(),
  2374. SurfaceColor = c.String(),
  2375. Rigidity = c.String(),
  2376. ProductDesc = c.String(),
  2377. CheckNo = c.String(),
  2378. CurrentStoreHouseNo = c.String(),
  2379. CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2380. StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2381. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2382. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2383. StoreLocationNo = c.String(),
  2384. StoreHouseId = c.Int(nullable: false),
  2385. ProductionOrderNo = c.String(),
  2386. LastModificationTime = c.DateTime(),
  2387. LastModifierUserId = c.Long(),
  2388. CreationTime = c.DateTime(nullable: false),
  2389. CreatorUserId = c.Long(),
  2390. })
  2391. .PrimaryKey(t => t.Id);
  2392. CreateTable(
  2393. "dbo.N_ViewInventoryCheckRecord_Semi",
  2394. c => new
  2395. {
  2396. Id = c.String(nullable: false, maxLength: 128),
  2397. ProductNo = c.String(),
  2398. ProductName = c.String(),
  2399. Model = c.String(),
  2400. Material = c.String(),
  2401. SurfaceColor = c.String(),
  2402. Rigidity = c.String(),
  2403. ProductDesc = c.String(),
  2404. CheckNo = c.String(),
  2405. CurrentStoreHouseNo = c.String(),
  2406. CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2407. StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2408. FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2409. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2410. StoreLocationNo = c.String(),
  2411. StoreHouseId = c.Int(nullable: false),
  2412. ProductionOrderNo = c.String(),
  2413. LastModificationTime = c.DateTime(),
  2414. LastModifierUserId = c.Long(),
  2415. CreationTime = c.DateTime(nullable: false),
  2416. CreatorUserId = c.Long(),
  2417. })
  2418. .PrimaryKey(t => t.Id);
  2419. CreateTable(
  2420. "dbo.N_ViewOrderItems",
  2421. c => new
  2422. {
  2423. OrderItemId = c.Int(nullable: false, identity: true),
  2424. OrderNo = c.String(),
  2425. ProductNo = c.String(),
  2426. Price = c.Decimal(nullable: false, storeType: "money"),
  2427. AfterTaxPrice = c.Decimal(nullable: false, storeType: "money"),
  2428. CurrencyId = c.String(),
  2429. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2, storeType: "numeric"),
  2430. OrderUnitId = c.Int(nullable: false),
  2431. SendDate = c.DateTime(nullable: false, storeType: "smalldatetime"),
  2432. IsReport = c.String(),
  2433. IsPartSend = c.String(),
  2434. OrderItemStatusId = c.Int(),
  2435. WareHouse = c.String(),
  2436. OrderItemDesc = c.String(),
  2437. PartNo = c.String(),
  2438. TotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2439. CustomerId = c.String(),
  2440. LinkName = c.String(),
  2441. OrderDate = c.DateTime(storeType: "smalldatetime"),
  2442. Fax = c.String(),
  2443. Telephone = c.String(),
  2444. ProductName = c.String(),
  2445. Model = c.String(),
  2446. StandardId = c.Int(),
  2447. Material = c.String(),
  2448. SurfaceColor = c.String(),
  2449. Rigidity = c.String(),
  2450. IsStandard = c.String(),
  2451. IsSendQuantity = c.Decimal(precision: 18, scale: 2),
  2452. OrderUnitName = c.String(),
  2453. StockNo = c.String(),
  2454. CustomerName = c.String(),
  2455. AfterTaxTotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2456. SaleType = c.Int(),
  2457. SaleMan = c.String(),
  2458. EmergencyLevel = c.Int(nullable: false),
  2459. IsLock = c.String(),
  2460. StandardName = c.String(),
  2461. StoreCompleteState = c.Int(nullable: false),
  2462. LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  2463. MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  2464. LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  2465. MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  2466. })
  2467. .PrimaryKey(t => t.OrderItemId);
  2468. CreateTable(
  2469. "dbo.v_OrderSendBill",
  2470. c => new
  2471. {
  2472. OrderSendBillNo = c.String(nullable: false, maxLength: 128),
  2473. CustomerId = c.String(),
  2474. SendDate = c.DateTime(),
  2475. SendAddress = c.String(),
  2476. ContactTels = c.String(),
  2477. ContactMan = c.String(),
  2478. TimeCreated = c.DateTime(),
  2479. TimeLastMod = c.DateTime(),
  2480. UserIDLastMod = c.String(),
  2481. IsDoBill = c.String(),
  2482. OrderSendCount = c.Int(nullable: false),
  2483. StatementCount = c.Int(nullable: false),
  2484. ExpressId = c.Int(),
  2485. ExpressBillNo = c.String(),
  2486. ExpressName = c.String(),
  2487. CreatorUserId = c.String(),
  2488. TotalPrice = c.Decimal(precision: 18, scale: 3),
  2489. AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3),
  2490. CurrencyId = c.String(),
  2491. })
  2492. .PrimaryKey(t => t.OrderSendBillNo);
  2493. CreateTable(
  2494. "dbo.N_ViewOrderSends",
  2495. c => new
  2496. {
  2497. OrderSendId = c.Int(nullable: false, identity: true),
  2498. OrderItemId = c.Int(nullable: false),
  2499. SendDate = c.DateTime(),
  2500. SendQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2501. Remark = c.String(),
  2502. OrderSendBillNo = c.String(),
  2503. OrderStickBillNo = c.String(),
  2504. QuantityPerPack = c.Decimal(precision: 18, scale: 2),
  2505. PackageCount = c.Decimal(precision: 18, scale: 2),
  2506. ProductBatchNum = c.String(),
  2507. UserIDLastMod = c.String(),
  2508. OrderNo = c.String(),
  2509. ProductNo = c.String(),
  2510. Price = c.Decimal(nullable: false, precision: 18, scale: 2),
  2511. TotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2512. IsReport = c.String(),
  2513. PartNo = c.String(),
  2514. ProductName = c.String(),
  2515. Model = c.String(),
  2516. StandardId = c.Int(),
  2517. Material = c.String(),
  2518. ProductDesc = c.String(),
  2519. SurfaceColor = c.String(),
  2520. Rigidity = c.String(),
  2521. CustomerId = c.String(),
  2522. CustomerName = c.String(),
  2523. LinkName = c.String(),
  2524. OrderDate = c.DateTime(),
  2525. CustomerSendId = c.Int(),
  2526. StockNo = c.String(),
  2527. OrderUnitName = c.String(),
  2528. SaleType = c.Int(),
  2529. AfterTaxPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2530. StatementBillNo = c.String(),
  2531. SendActionDate = c.DateTime(),
  2532. StandardName = c.String(),
  2533. LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  2534. MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  2535. LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  2536. MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  2537. SendBillSort = c.Int(nullable: false),
  2538. StatementBillSort = c.Int(nullable: false),
  2539. })
  2540. .PrimaryKey(t => t.OrderSendId);
  2541. CreateTable(
  2542. "dbo.vwOrderSendBill",
  2543. c => new
  2544. {
  2545. OrderSendId = c.Int(nullable: false, identity: true),
  2546. OrderItemId = c.Int(nullable: false),
  2547. SendDate = c.DateTime(),
  2548. SendQuantity = c.Decimal(precision: 18, scale: 2),
  2549. Remark = c.String(),
  2550. OrderSendBillNo = c.String(),
  2551. OrderStickBillNo = c.String(),
  2552. StatementBillNo = c.String(),
  2553. UserIDLastMod = c.String(),
  2554. OrderNo = c.String(),
  2555. ProductNo = c.String(),
  2556. Price = c.Decimal(nullable: false, precision: 18, scale: 2),
  2557. totalprice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2558. IsReport = c.String(),
  2559. PartNo = c.String(),
  2560. ProductName = c.String(),
  2561. Model = c.String(),
  2562. StandardId = c.Int(),
  2563. Material = c.String(),
  2564. ProductDesc = c.String(),
  2565. SurfaceColor = c.String(),
  2566. Rigidity = c.String(),
  2567. CustomerId = c.String(),
  2568. LinkName = c.String(),
  2569. OrderDate = c.DateTime(),
  2570. CustomerSendId = c.Int(nullable: false),
  2571. StockNo = c.String(),
  2572. OrderUnitName = c.String(),
  2573. CurrencyId = c.String(),
  2574. AfterTaxPrice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2575. LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  2576. MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2),
  2577. LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  2578. MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2),
  2579. AfterTaxTotalprice = c.Decimal(nullable: false, precision: 18, scale: 2),
  2580. SendBillSort = c.Int(nullable: false),
  2581. StatementBillSort = c.Int(nullable: false),
  2582. })
  2583. .PrimaryKey(t => t.OrderSendId);
  2584. CreateTable(
  2585. "dbo.N_ViewPackageApply",
  2586. c => new
  2587. {
  2588. Id = c.Int(nullable: false, identity: true),
  2589. PackageApplyNo = c.String(),
  2590. CurrentStoreHouseNo = c.String(),
  2591. ProductionOrderNo = c.String(),
  2592. SemiProductNo = c.String(),
  2593. ProductNo = c.String(),
  2594. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2595. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2596. SourceStore = c.Int(nullable: false),
  2597. ApplyStatus = c.String(),
  2598. IsClose = c.Boolean(nullable: false),
  2599. ApplyDate = c.DateTime(),
  2600. Remark = c.String(),
  2601. TimeCreated = c.DateTime(),
  2602. TimeLastMod = c.DateTime(),
  2603. CreatorUserId = c.String(),
  2604. UserIDLastMod = c.String(),
  2605. ProcessingNum = c.Int(nullable: false),
  2606. IsApplyEnterQuantity = c.Decimal(precision: 18, scale: 2),
  2607. IsApplyEnterQuantity2 = c.Decimal(precision: 18, scale: 2),
  2608. KgWeight = c.Decimal(precision: 18, scale: 2),
  2609. })
  2610. .PrimaryKey(t => t.Id);
  2611. CreateTable(
  2612. "dbo.N_ViewProductEnterStore",
  2613. c => new
  2614. {
  2615. Id = c.Int(nullable: false, identity: true),
  2616. ProductionOrderNo = c.String(maxLength: 11),
  2617. PackageApplyNo = c.String(nullable: false),
  2618. PackageProductNo = c.String(maxLength: 32),
  2619. ProductNo = c.String(),
  2620. StoreHouseId = c.Int(nullable: false),
  2621. StoreLocationNo = c.String(),
  2622. ApplyStatus = c.Int(nullable: false),
  2623. IsClose = c.Boolean(nullable: false),
  2624. ApplySourceType = c.Int(nullable: false),
  2625. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2626. PackageSpecification = c.Decimal(nullable: false, precision: 18, scale: 2),
  2627. PackageCount = c.Decimal(nullable: false, precision: 18, scale: 2),
  2628. ActualPackageCount = c.Decimal(nullable: false, precision: 18, scale: 2),
  2629. AuditUser = c.String(),
  2630. AuditDate = c.DateTime(),
  2631. ApplyEnterDate = c.DateTime(),
  2632. Remark = c.String(),
  2633. TimeCreated = c.DateTime(),
  2634. TimeLastMod = c.DateTime(),
  2635. CreatorUserId = c.String(),
  2636. UserIDLastMod = c.String(),
  2637. ProductName = c.String(),
  2638. Model = c.String(maxLength: 20),
  2639. Material = c.String(maxLength: 50),
  2640. SurfaceColor = c.String(maxLength: 50),
  2641. Rigidity = c.String(maxLength: 50),
  2642. IsStandard = c.String(maxLength: 1),
  2643. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2),
  2644. SourceStoreHouseId = c.Int(nullable: false),
  2645. CreateSourceType = c.Int(),
  2646. PackageEnterNum = c.String(),
  2647. })
  2648. .PrimaryKey(t => t.Id);
  2649. CreateTable(
  2650. "dbo.N_ViewProductOutStore",
  2651. c => new
  2652. {
  2653. Id = c.Int(nullable: false, identity: true),
  2654. ProductionOrderNo = c.String(),
  2655. CurrentProductStoreHouseNo = c.String(),
  2656. StoreHouseId = c.Int(nullable: false),
  2657. ApplyStatus = c.Int(nullable: false),
  2658. IsClose = c.Boolean(),
  2659. IsConfirm = c.Boolean(),
  2660. ProductNo = c.String(),
  2661. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2662. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2663. ApplyOutDate = c.DateTime(),
  2664. Remark = c.String(),
  2665. TimeCreated = c.DateTime(),
  2666. TimeLastMod = c.DateTime(),
  2667. CreatorUserId = c.String(),
  2668. UserIDLastMod = c.String(),
  2669. AuditUser = c.String(),
  2670. AuditDate = c.DateTime(),
  2671. ProductName = c.String(),
  2672. Model = c.String(),
  2673. Material = c.String(),
  2674. SurfaceColor = c.String(),
  2675. Rigidity = c.String(),
  2676. IsStandard = c.String(),
  2677. CustomerId = c.String(),
  2678. CustomerName = c.String(),
  2679. OrderSendBillNo = c.String(),
  2680. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2),
  2681. ApplyOutStoreSourceType = c.Int(nullable: false),
  2682. CreateSourceType = c.Int(),
  2683. OrderDate = c.DateTime(),
  2684. })
  2685. .PrimaryKey(t => t.Id);
  2686. CreateTable(
  2687. "dbo.v_QueryCurrentProductNum",
  2688. c => new
  2689. {
  2690. ProductNo = c.String(nullable: false, maxLength: 128),
  2691. BookedQuantity = c.Decimal(precision: 18, scale: 2),
  2692. CanUserQuantity = c.Decimal(precision: 18, scale: 2),
  2693. })
  2694. .PrimaryKey(t => t.ProductNo);
  2695. CreateTable(
  2696. "dbo.N_ViewRmEnterStore",
  2697. c => new
  2698. {
  2699. Id = c.String(nullable: false, maxLength: 128),
  2700. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  2701. RmProductNo = c.String(maxLength: 50),
  2702. StoreHouseId = c.Int(nullable: false),
  2703. StoreLocationNo = c.String(maxLength: 32),
  2704. ApplyStatus = c.Int(nullable: false),
  2705. IsClose = c.Boolean(nullable: false),
  2706. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2707. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2708. AuditUser = c.String(maxLength: 32),
  2709. AuditDate = c.DateTime(),
  2710. ApplyEnterDate = c.DateTime(),
  2711. EnterStoreUser = c.String(maxLength: 32),
  2712. EnterStoreDate = c.DateTime(),
  2713. Remark = c.String(maxLength: 150),
  2714. ProductName = c.String(),
  2715. Material = c.String(),
  2716. Model = c.String(),
  2717. ProductDesc = c.String(),
  2718. StoreHouseName = c.String(),
  2719. ProductBatchNum = c.String(),
  2720. CreateSourceType = c.Int(),
  2721. IsDeleted = c.Boolean(nullable: false),
  2722. DeleterUserId = c.Long(),
  2723. DeletionTime = c.DateTime(),
  2724. LastModificationTime = c.DateTime(),
  2725. LastModifierUserId = c.Long(),
  2726. CreationTime = c.DateTime(nullable: false),
  2727. CreatorUserId = c.Long(),
  2728. },
  2729. annotations: new Dictionary<string, object>
  2730. {
  2731. { "DynamicFilter_ViewRmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  2732. })
  2733. .PrimaryKey(t => t.Id);
  2734. CreateTable(
  2735. "dbo.N_ViewRmOutStore",
  2736. c => new
  2737. {
  2738. Id = c.String(nullable: false, maxLength: 128),
  2739. ProductionOrderNo = c.String(maxLength: 11),
  2740. CurrentRmStoreHouseNo = c.String(maxLength: 32),
  2741. RmProductNo = c.String(maxLength: 50),
  2742. StoreHouseId = c.Int(nullable: false),
  2743. ApplyStatus = c.Int(nullable: false),
  2744. IsClose = c.Boolean(nullable: false),
  2745. IsConfirm = c.Boolean(),
  2746. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2747. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2748. AuditUser = c.String(maxLength: 150),
  2749. AuditDate = c.DateTime(),
  2750. OutStoreUser = c.String(maxLength: 150),
  2751. OutStoreDate = c.DateTime(),
  2752. ApplyOutDate = c.DateTime(),
  2753. Remark = c.String(maxLength: 150),
  2754. ProductName = c.String(),
  2755. Material = c.String(),
  2756. Model = c.String(),
  2757. ProductDesc = c.String(),
  2758. StoreHouseName = c.String(),
  2759. ProductBatchNum = c.String(),
  2760. CreateSourceType = c.Int(),
  2761. IsDeleted = c.Boolean(nullable: false),
  2762. DeleterUserId = c.Long(),
  2763. DeletionTime = c.DateTime(),
  2764. LastModificationTime = c.DateTime(),
  2765. LastModifierUserId = c.Long(),
  2766. CreationTime = c.DateTime(nullable: false),
  2767. CreatorUserId = c.Long(),
  2768. },
  2769. annotations: new Dictionary<string, object>
  2770. {
  2771. { "DynamicFilter_ViewRmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  2772. })
  2773. .PrimaryKey(t => t.Id);
  2774. CreateTable(
  2775. "dbo.N_ViewScrapEnterStore",
  2776. c => new
  2777. {
  2778. Id = c.String(nullable: false, maxLength: 128),
  2779. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  2780. ProductNo = c.String(maxLength: 50),
  2781. StoreHouseId = c.Int(nullable: false),
  2782. StoreLocationNo = c.String(maxLength: 32),
  2783. ApplyStatus = c.Int(nullable: false),
  2784. IsClose = c.Boolean(nullable: false),
  2785. Quantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2786. ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3),
  2787. AuditUser = c.String(maxLength: 32),
  2788. AuditDate = c.DateTime(),
  2789. ApplyEnterDate = c.DateTime(),
  2790. EnterStoreUser = c.String(maxLength: 32),
  2791. EnterStoreDate = c.DateTime(),
  2792. Remark = c.String(maxLength: 150),
  2793. ProductName = c.String(),
  2794. Material = c.String(),
  2795. Model = c.String(),
  2796. ProductDesc = c.String(),
  2797. StoreHouseName = c.String(),
  2798. SurfaceColor = c.String(),
  2799. Rigidity = c.String(),
  2800. ProductType = c.Int(),
  2801. ScrapSource = c.Int(nullable: false),
  2802. ScrapSourceNo = c.String(),
  2803. IsDeleted = c.Boolean(nullable: false),
  2804. DeleterUserId = c.Long(),
  2805. DeletionTime = c.DateTime(),
  2806. LastModificationTime = c.DateTime(),
  2807. LastModifierUserId = c.Long(),
  2808. CreationTime = c.DateTime(nullable: false),
  2809. CreatorUserId = c.Long(),
  2810. },
  2811. annotations: new Dictionary<string, object>
  2812. {
  2813. { "DynamicFilter_ViewScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  2814. })
  2815. .PrimaryKey(t => t.Id);
  2816. CreateTable(
  2817. "dbo.N_ViewSemiEnterStore",
  2818. c => new
  2819. {
  2820. Id = c.Int(nullable: false, identity: true),
  2821. ProductionOrderNo = c.String(nullable: false, maxLength: 11),
  2822. StoreHouseId = c.Int(nullable: false),
  2823. ApplyStatus = c.String(nullable: false, maxLength: 1),
  2824. IsClose = c.Boolean(),
  2825. ApplySource = c.String(nullable: false, maxLength: 1),
  2826. SemiProductNo = c.String(maxLength: 32),
  2827. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2828. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2829. AuditUser = c.String(maxLength: 20),
  2830. AuditDate = c.DateTime(),
  2831. ApplyEnterDate = c.DateTime(),
  2832. Remark = c.String(maxLength: 150),
  2833. TimeCreated = c.DateTime(),
  2834. TimeLastMod = c.DateTime(),
  2835. CreatorUserId = c.String(maxLength: 20),
  2836. UserIDLastMod = c.String(maxLength: 20),
  2837. SemiProductName = c.String(maxLength: 50),
  2838. Model = c.String(maxLength: 20),
  2839. Material = c.String(maxLength: 50),
  2840. SurfaceColor = c.String(maxLength: 50),
  2841. Rigidity = c.String(maxLength: 50),
  2842. IsStandard = c.String(maxLength: 1),
  2843. PartNo = c.String(maxLength: 50),
  2844. TranUnitValue = c.Decimal(precision: 18, scale: 2),
  2845. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2),
  2846. CreateSourceType = c.Int(),
  2847. StoreLocationNo = c.String(),
  2848. })
  2849. .PrimaryKey(t => t.Id);
  2850. CreateTable(
  2851. "dbo.N_ViewSemiOutStore",
  2852. c => new
  2853. {
  2854. Id = c.Int(nullable: false, identity: true),
  2855. ProductionOrderNo = c.String(),
  2856. CurrentSemiStoreHouseNo = c.String(),
  2857. StoreHouseId = c.Int(nullable: false),
  2858. ApplyStatus = c.String(),
  2859. ApplyTypes = c.Int(nullable: false),
  2860. IsClose = c.Boolean(),
  2861. IsConfirm = c.Boolean(),
  2862. ApplyOutStoreSource = c.String(),
  2863. SemiProductNo = c.String(),
  2864. Quantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2865. ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2),
  2866. ApplyOutDate = c.DateTime(),
  2867. Remark = c.String(),
  2868. TimeCreated = c.DateTime(),
  2869. TimeLastMod = c.DateTime(),
  2870. CreatorUserId = c.String(),
  2871. UserIDLastMod = c.String(),
  2872. AuditUser = c.String(),
  2873. AuditDate = c.DateTime(),
  2874. SemiProductName = c.String(),
  2875. Model = c.String(),
  2876. Material = c.String(),
  2877. SurfaceColor = c.String(),
  2878. Rigidity = c.String(),
  2879. IsStandard = c.String(),
  2880. PartNo = c.String(),
  2881. TranUnitValue = c.Decimal(precision: 18, scale: 2),
  2882. KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2),
  2883. CreateSourceType = c.Int(),
  2884. })
  2885. .PrimaryKey(t => t.Id);
  2886. CreateTable(
  2887. "dbo.N_ViewStatementBill",
  2888. c => new
  2889. {
  2890. Id = c.Int(nullable: false, identity: true),
  2891. StatementBillNo = c.String(nullable: false, maxLength: 30),
  2892. CustomerId = c.String(nullable: false, maxLength: 30),
  2893. BillMan = c.String(maxLength: 20),
  2894. Description = c.String(maxLength: 4000),
  2895. StatementState = c.Int(),
  2896. CustomerName = c.String(),
  2897. OrderStickBillNo = c.String(),
  2898. TotalPrice = c.Decimal(precision: 18, scale: 3),
  2899. AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3),
  2900. CurrencyId = c.String(),
  2901. LastModificationTime = c.DateTime(),
  2902. LastModifierUserId = c.Long(),
  2903. CreationTime = c.DateTime(nullable: false),
  2904. CreatorUserId = c.Long(),
  2905. })
  2906. .PrimaryKey(t => t.Id)
  2907. .Index(t => t.StatementBillNo, unique: true);
  2908. CreateTable(
  2909. "dbo.v_OrderStickBill",
  2910. c => new
  2911. {
  2912. OrderStickBillNo = c.String(nullable: false, maxLength: 128),
  2913. CustomerId = c.String(),
  2914. CreatDate = c.DateTime(),
  2915. StickNum = c.String(),
  2916. StickMan = c.String(),
  2917. Description = c.String(),
  2918. TimeCreated = c.DateTime(),
  2919. CustomerName = c.String(),
  2920. Address = c.String(),
  2921. LinkMan = c.String(),
  2922. TotalPrice = c.Decimal(precision: 18, scale: 3),
  2923. AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3),
  2924. CurrencyId = c.String(),
  2925. InvoiceState = c.Int(),
  2926. Amount = c.Decimal(precision: 18, scale: 2),
  2927. OriginalStickNum = c.String(),
  2928. ReturnOrderNo = c.String(),
  2929. OrderNo = c.String(),
  2930. InvoiceType = c.Int(nullable: false),
  2931. })
  2932. .PrimaryKey(t => t.OrderStickBillNo);
  2933. }
  2934. public override void Down()
  2935. {
  2936. DropForeignKey("dbo.Sys_States", "LastModifierUserId", "dbo.Sys_Users");
  2937. DropForeignKey("dbo.Sys_States", "DeleterUserId", "dbo.Sys_Users");
  2938. DropForeignKey("dbo.Sys_States", "CreatorUserId", "dbo.Sys_Users");
  2939. DropForeignKey("dbo.Sys_Settings", "LastModifierUserId", "dbo.Sys_Users");
  2940. DropForeignKey("dbo.Sys_Settings", "DeleterUserId", "dbo.Sys_Users");
  2941. DropForeignKey("dbo.Sys_Settings", "CreatorUserId", "dbo.Sys_Users");
  2942. DropForeignKey("dbo.ScrapTypeInfo", "LastModifierUserId", "dbo.Sys_Users");
  2943. DropForeignKey("dbo.ScrapTypeInfo", "DeleterUserId", "dbo.Sys_Users");
  2944. DropForeignKey("dbo.ScrapTypeInfo", "CreatorUserId", "dbo.Sys_Users");
  2945. DropForeignKey("dbo.Sys_Roles", "LastModifierUserId", "dbo.Sys_Users");
  2946. DropForeignKey("dbo.Sys_Roles", "DeleterUserId", "dbo.Sys_Users");
  2947. DropForeignKey("dbo.Sys_Roles", "CreatorUserId", "dbo.Sys_Users");
  2948. DropForeignKey("dbo.QualityIssueLabelInfo", "LastModifierUserId", "dbo.Sys_Users");
  2949. DropForeignKey("dbo.QualityIssueLabelInfo", "DeleterUserId", "dbo.Sys_Users");
  2950. DropForeignKey("dbo.QualityIssueLabelInfo", "CreatorUserId", "dbo.Sys_Users");
  2951. DropForeignKey("dbo.ProductionOrderLogInfo", "EmployeeId", "dbo.EmployeeInfo");
  2952. DropForeignKey("dbo.ProductionOrderLogInfo", "CreatorUserId", "dbo.Sys_Users");
  2953. DropForeignKey("dbo.MoldProductionRecord", "LastModifierUserId", "dbo.Sys_Users");
  2954. DropForeignKey("dbo.MoldProductionRecord", "CreatorUserId", "dbo.Sys_Users");
  2955. DropForeignKey("dbo.MoldInfo", "LastModifierUserId", "dbo.Sys_Users");
  2956. DropForeignKey("dbo.MoldInfo", "DeleterUserId", "dbo.Sys_Users");
  2957. DropForeignKey("dbo.MoldInfo", "CreatorUserId", "dbo.Sys_Users");
  2958. DropForeignKey("dbo.MaintenanceRecordInfo", "CreatorUserId", "dbo.Sys_Users");
  2959. DropForeignKey("dbo.MaintenanceMemberInfo", "EmployeeId", "dbo.EmployeeInfo");
  2960. DropForeignKey("dbo.MaintenanceMemberInfo", "CreatorUserId", "dbo.Sys_Users");
  2961. DropForeignKey("dbo.LicenseTypeInfo", "LastModifierUserId", "dbo.Sys_Users");
  2962. DropForeignKey("dbo.LicenseTypeInfo", "CreatorUserId", "dbo.Sys_Users");
  2963. DropForeignKey("dbo.LicenseDocumentInfo", "LastModifierUserId", "dbo.Sys_Users");
  2964. DropForeignKey("dbo.LicenseDocumentInfo", "DeleterUserId", "dbo.Sys_Users");
  2965. DropForeignKey("dbo.LicenseDocumentInfo", "CreatorUserId", "dbo.Sys_Users");
  2966. DropForeignKey("dbo.Sys_Functions", "LastModifierUserId", "dbo.Sys_Users");
  2967. DropForeignKey("dbo.Sys_Functions", "DeleterUserId", "dbo.Sys_Users");
  2968. DropForeignKey("dbo.Sys_Functions", "CreatorUserId", "dbo.Sys_Users");
  2969. DropForeignKey("dbo.FixedAssetTypeInfo", "LastModifierUserId", "dbo.Sys_Users");
  2970. DropForeignKey("dbo.FixedAssetTypeInfo", "DeleterUserId", "dbo.Sys_Users");
  2971. DropForeignKey("dbo.FixedAssetTypeInfo", "CreatorUserId", "dbo.Sys_Users");
  2972. DropForeignKey("dbo.FixedAssetInfo", "LastModifierUserId", "dbo.Sys_Users");
  2973. DropForeignKey("dbo.FixedAssetInfo", "DeleterUserId", "dbo.Sys_Users");
  2974. DropForeignKey("dbo.FixedAssetInfo", "CreatorUserId", "dbo.Sys_Users");
  2975. DropForeignKey("dbo.ExpressProviderMappers", "ProviderId", "dbo.ExpressServiceProviders");
  2976. DropForeignKey("dbo.ExpressProviderMappers", "ExpressId", "dbo.ExpressLogistics");
  2977. DropForeignKey("dbo.EmployeeWorkPerformanceInfo", "EmployeeId", "dbo.EmployeeInfo");
  2978. DropForeignKey("dbo.EmployeeWorkPerformanceInfo", "CreatorUserId", "dbo.Sys_Users");
  2979. DropForeignKey("dbo.EmployeeInfo", "LastModifierUserId", "dbo.Sys_Users");
  2980. DropForeignKey("dbo.EmployeeInfo", "DeleterUserId", "dbo.Sys_Users");
  2981. DropForeignKey("dbo.EmployeeInfo", "CreatorUserId", "dbo.Sys_Users");
  2982. DropForeignKey("dbo.DisqualifiedProductInfo", "CreatorUserId", "dbo.Sys_Users");
  2983. DropForeignKey("dbo.DeviceMgPlanInfo", "LastModifierUserId", "dbo.Sys_Users");
  2984. DropForeignKey("dbo.DeviceMgPlanInfo", "DeleterUserId", "dbo.Sys_Users");
  2985. DropForeignKey("dbo.DeviceMgPlanInfo", "CreatorUserId", "dbo.Sys_Users");
  2986. DropForeignKey("dbo.CustomerDisProductInfo", "CreatorUserId", "dbo.Sys_Users");
  2987. DropForeignKey("dbo.Sys_UserRoles", "UserId", "dbo.Sys_Users");
  2988. DropForeignKey("dbo.Sys_Users", "LastModifierUserId", "dbo.Sys_Users");
  2989. DropForeignKey("dbo.Sys_Users", "DeleterUserId", "dbo.Sys_Users");
  2990. DropForeignKey("dbo.Sys_Users", "CreatorUserId", "dbo.Sys_Users");
  2991. DropIndex("dbo.N_ViewStatementBill", new[] { "StatementBillNo" });
  2992. DropIndex("dbo.Sys_States", new[] { "CreatorUserId" });
  2993. DropIndex("dbo.Sys_States", new[] { "LastModifierUserId" });
  2994. DropIndex("dbo.Sys_States", new[] { "DeleterUserId" });
  2995. DropIndex("dbo.StatementBill", new[] { "StatementBillNo" });
  2996. DropIndex("dbo.Sys_Settings", new[] { "CreatorUserId" });
  2997. DropIndex("dbo.Sys_Settings", new[] { "LastModifierUserId" });
  2998. DropIndex("dbo.Sys_Settings", new[] { "DeleterUserId" });
  2999. DropIndex("dbo.ScrapTypeInfo", new[] { "CreatorUserId" });
  3000. DropIndex("dbo.ScrapTypeInfo", new[] { "LastModifierUserId" });
  3001. DropIndex("dbo.ScrapTypeInfo", new[] { "DeleterUserId" });
  3002. DropIndex("dbo.Sys_Roles", new[] { "CreatorUserId" });
  3003. DropIndex("dbo.Sys_Roles", new[] { "LastModifierUserId" });
  3004. DropIndex("dbo.Sys_Roles", new[] { "DeleterUserId" });
  3005. DropIndex("dbo.ReturnGoodOrder", new[] { "ReturnOrderNo" });
  3006. DropIndex("dbo.QualityIssueLabelInfo", new[] { "CreatorUserId" });
  3007. DropIndex("dbo.QualityIssueLabelInfo", new[] { "LastModifierUserId" });
  3008. DropIndex("dbo.QualityIssueLabelInfo", new[] { "DeleterUserId" });
  3009. DropIndex("dbo.ProductionOrderLogInfo", new[] { "CreatorUserId" });
  3010. DropIndex("dbo.ProductionOrderLogInfo", new[] { "EmployeeId" });
  3011. DropIndex("dbo.MoldProductionRecord", new[] { "CreatorUserId" });
  3012. DropIndex("dbo.MoldProductionRecord", new[] { "LastModifierUserId" });
  3013. DropIndex("dbo.MoldInfo", new[] { "CreatorUserId" });
  3014. DropIndex("dbo.MoldInfo", new[] { "LastModifierUserId" });
  3015. DropIndex("dbo.MoldInfo", new[] { "DeleterUserId" });
  3016. DropIndex("dbo.MaintenanceRecordInfo", new[] { "CreatorUserId" });
  3017. DropIndex("dbo.MaintenanceMemberInfo", new[] { "CreatorUserId" });
  3018. DropIndex("dbo.MaintenanceMemberInfo", new[] { "EmployeeId" });
  3019. DropIndex("dbo.LicenseTypeInfo", new[] { "CreatorUserId" });
  3020. DropIndex("dbo.LicenseTypeInfo", new[] { "LastModifierUserId" });
  3021. DropIndex("dbo.LicenseDocumentInfo", new[] { "CreatorUserId" });
  3022. DropIndex("dbo.LicenseDocumentInfo", new[] { "LastModifierUserId" });
  3023. DropIndex("dbo.LicenseDocumentInfo", new[] { "DeleterUserId" });
  3024. DropIndex("dbo.Sys_Functions", new[] { "CreatorUserId" });
  3025. DropIndex("dbo.Sys_Functions", new[] { "LastModifierUserId" });
  3026. DropIndex("dbo.Sys_Functions", new[] { "DeleterUserId" });
  3027. DropIndex("dbo.FixedAssetTypeInfo", new[] { "CreatorUserId" });
  3028. DropIndex("dbo.FixedAssetTypeInfo", new[] { "LastModifierUserId" });
  3029. DropIndex("dbo.FixedAssetTypeInfo", new[] { "DeleterUserId" });
  3030. DropIndex("dbo.FixedAssetInfo", new[] { "CreatorUserId" });
  3031. DropIndex("dbo.FixedAssetInfo", new[] { "LastModifierUserId" });
  3032. DropIndex("dbo.FixedAssetInfo", new[] { "DeleterUserId" });
  3033. DropIndex("dbo.ExpressProviderMappers", new[] { "ProviderId" });
  3034. DropIndex("dbo.ExpressProviderMappers", new[] { "ExpressId" });
  3035. DropIndex("dbo.EmployeeWorkPerformanceInfo", new[] { "CreatorUserId" });
  3036. DropIndex("dbo.EmployeeWorkPerformanceInfo", new[] { "EmployeeId" });
  3037. DropIndex("dbo.EmployeeInfo", new[] { "CreatorUserId" });
  3038. DropIndex("dbo.EmployeeInfo", new[] { "LastModifierUserId" });
  3039. DropIndex("dbo.EmployeeInfo", new[] { "DeleterUserId" });
  3040. DropIndex("dbo.DisqualifiedProductInfo", new[] { "CreatorUserId" });
  3041. DropIndex("dbo.DeviceMgPlanInfo", new[] { "CreatorUserId" });
  3042. DropIndex("dbo.DeviceMgPlanInfo", new[] { "LastModifierUserId" });
  3043. DropIndex("dbo.DeviceMgPlanInfo", new[] { "DeleterUserId" });
  3044. DropIndex("dbo.Sys_UserRoles", new[] { "UserId" });
  3045. DropIndex("dbo.Sys_Users", new[] { "CreatorUserId" });
  3046. DropIndex("dbo.Sys_Users", new[] { "LastModifierUserId" });
  3047. DropIndex("dbo.Sys_Users", new[] { "DeleterUserId" });
  3048. DropIndex("dbo.CustomerDisProductInfo", new[] { "CreatorUserId" });
  3049. DropTable("dbo.v_OrderStickBill");
  3050. DropTable("dbo.N_ViewStatementBill");
  3051. DropTable("dbo.N_ViewSemiOutStore");
  3052. DropTable("dbo.N_ViewSemiEnterStore");
  3053. DropTable("dbo.N_ViewScrapEnterStore",
  3054. removedAnnotations: new Dictionary<string, object>
  3055. {
  3056. { "DynamicFilter_ViewScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3057. });
  3058. DropTable("dbo.N_ViewRmOutStore",
  3059. removedAnnotations: new Dictionary<string, object>
  3060. {
  3061. { "DynamicFilter_ViewRmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3062. });
  3063. DropTable("dbo.N_ViewRmEnterStore",
  3064. removedAnnotations: new Dictionary<string, object>
  3065. {
  3066. { "DynamicFilter_ViewRmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3067. });
  3068. DropTable("dbo.v_QueryCurrentProductNum");
  3069. DropTable("dbo.N_ViewProductOutStore");
  3070. DropTable("dbo.N_ViewProductEnterStore");
  3071. DropTable("dbo.N_ViewPackageApply");
  3072. DropTable("dbo.vwOrderSendBill");
  3073. DropTable("dbo.N_ViewOrderSends");
  3074. DropTable("dbo.v_OrderSendBill");
  3075. DropTable("dbo.N_ViewOrderItems");
  3076. DropTable("dbo.N_ViewInventoryCheckRecord_Semi");
  3077. DropTable("dbo.N_ViewInventoryCheckRecord_Product");
  3078. DropTable("dbo.v_EnterOutSemiProductStore");
  3079. DropTable("dbo.v_Store_Query");
  3080. DropTable("dbo.vEnterOutLogDetail_c");
  3081. DropTable("dbo.NV_ViewEmployeeInfo");
  3082. DropTable("dbo.N_ViewDisqualifiedReturn");
  3083. DropTable("dbo.N_ViewDisqualifiedProduction");
  3084. DropTable("dbo.v_customerstick");
  3085. DropTable("dbo.v_ProductStoreInfo");
  3086. DropTable("dbo.v_SemiProductStoreInfo");
  3087. DropTable("dbo.N_ViewCurrentSemiStoreHouse");
  3088. DropTable("dbo.N_ViewCurrentRmStoreHouse",
  3089. removedAnnotations: new Dictionary<string, object>
  3090. {
  3091. { "DynamicFilter_ViewCurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3092. });
  3093. DropTable("dbo.N_ViewCurrentProductStoreHouse");
  3094. DropTable("dbo.v_CanProductStore");
  3095. DropTable("dbo.v_BookedProductNum");
  3096. DropTable("dbo.Sys_UserLogins");
  3097. DropTable("dbo.Sys_UserLoginLogs");
  3098. DropTable("dbo.TemplateInfos");
  3099. DropTable("dbo.Sys_States",
  3100. removedAnnotations: new Dictionary<string, object>
  3101. {
  3102. { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3103. });
  3104. DropTable("dbo.Sys_Helps");
  3105. DropTable("dbo.Sys_AttachFiles");
  3106. DropTable("dbo.StoreHouse");
  3107. DropTable("dbo.StoreHouseLocation",
  3108. removedAnnotations: new Dictionary<string, object>
  3109. {
  3110. { "DynamicFilter_StoreHouseLocation_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3111. });
  3112. DropTable("dbo.StatementBill");
  3113. DropTable("dbo.Standard");
  3114. DropTable("dbo.StandardDetail",
  3115. removedAnnotations: new Dictionary<string, object>
  3116. {
  3117. { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3118. });
  3119. DropTable("dbo.StandardCatalog",
  3120. removedAnnotations: new Dictionary<string, object>
  3121. {
  3122. { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3123. });
  3124. DropTable("dbo.ShortMsgDetail");
  3125. DropTable("dbo.ShortMessage");
  3126. DropTable("dbo.Sys_Settings",
  3127. removedAnnotations: new Dictionary<string, object>
  3128. {
  3129. { "DynamicFilter_SysSetting_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3130. });
  3131. DropTable("dbo.SemiProductStore");
  3132. DropTable("dbo.SemiProducts");
  3133. DropTable("dbo.SemiOutStores");
  3134. DropTable("dbo.SemiEnterStore");
  3135. DropTable("dbo.ScrapTypeInfo",
  3136. removedAnnotations: new Dictionary<string, object>
  3137. {
  3138. { "DynamicFilter_ScrapType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3139. });
  3140. DropTable("dbo.ScrapEnterStore",
  3141. removedAnnotations: new Dictionary<string, object>
  3142. {
  3143. { "DynamicFilter_ScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3144. });
  3145. DropTable("dbo.N_ViewScheduleOrderSend");
  3146. DropTable("dbo.ScheduleOrderSend");
  3147. DropTable("dbo.Sys_Roles",
  3148. removedAnnotations: new Dictionary<string, object>
  3149. {
  3150. { "DynamicFilter_SysRole_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3151. });
  3152. DropTable("dbo.RmProduct",
  3153. removedAnnotations: new Dictionary<string, object>
  3154. {
  3155. { "DynamicFilter_RmProduct_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3156. });
  3157. DropTable("dbo.RmOutStore",
  3158. removedAnnotations: new Dictionary<string, object>
  3159. {
  3160. { "DynamicFilter_RmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3161. });
  3162. DropTable("dbo.RmEnterStore",
  3163. removedAnnotations: new Dictionary<string, object>
  3164. {
  3165. { "DynamicFilter_RmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3166. });
  3167. DropTable("dbo.ReturnGoodOrder",
  3168. removedAnnotations: new Dictionary<string, object>
  3169. {
  3170. { "DynamicFilter_ReturnGoodOrder_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3171. });
  3172. DropTable("dbo.Regions");
  3173. DropTable("dbo.QualityIssueLabelInfo",
  3174. removedAnnotations: new Dictionary<string, object>
  3175. {
  3176. { "DynamicFilter_QualityIssueLabel_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3177. });
  3178. DropTable("dbo.ProductInspectReportContents");
  3179. DropTable("dbo.Products");
  3180. DropTable("dbo.ProductProperties",
  3181. removedAnnotations: new Dictionary<string, object>
  3182. {
  3183. { "DynamicFilter_ProductProperty_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3184. });
  3185. DropTable("dbo.ProductOutStore");
  3186. DropTable("dbo.ProductMapper",
  3187. removedAnnotations: new Dictionary<string, object>
  3188. {
  3189. { "DynamicFilter_ProductMapper_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3190. });
  3191. DropTable("dbo.ProductionOrders");
  3192. DropTable("dbo.ProductionOrderLogInfo");
  3193. DropTable("dbo.ProductInspectReportInfos");
  3194. DropTable("dbo.ProductInspectInfos");
  3195. DropTable("dbo.Sys_Permissions");
  3196. DropTable("dbo.PackageApply");
  3197. DropTable("dbo.OutFactory");
  3198. DropTable("dbo.OrderUnit");
  3199. DropTable("dbo.OrderStickBills");
  3200. DropTable("dbo.OrderSend");
  3201. DropTable("dbo.OrderSendExceed");
  3202. DropTable("dbo.OrderSendBills");
  3203. DropTable("dbo.OrderProduction");
  3204. DropTable("dbo.OrderItems");
  3205. DropTable("dbo.OrderHeader");
  3206. DropTable("dbo.MoldProductionRecord");
  3207. DropTable("dbo.MoldInfo",
  3208. removedAnnotations: new Dictionary<string, object>
  3209. {
  3210. { "DynamicFilter_Mold_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3211. });
  3212. DropTable("dbo.MaintenanceRecordInfo");
  3213. DropTable("dbo.MaintenanceMemberInfo");
  3214. DropTable("dbo.LicenseTypeInfo");
  3215. DropTable("dbo.LicenseDocumentInfo",
  3216. removedAnnotations: new Dictionary<string, object>
  3217. {
  3218. { "DynamicFilter_LicenseDocument_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3219. });
  3220. DropTable("dbo.InventoryCheckRecord");
  3221. DropTable("dbo.InventoryCheck",
  3222. removedAnnotations: new Dictionary<string, object>
  3223. {
  3224. { "DynamicFilter_InventoryCheckInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3225. });
  3226. DropTable("dbo.Sys_Functions",
  3227. removedAnnotations: new Dictionary<string, object>
  3228. {
  3229. { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3230. });
  3231. DropTable("dbo.FixedAssetTypeInfo",
  3232. removedAnnotations: new Dictionary<string, object>
  3233. {
  3234. { "DynamicFilter_FixedAssetType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3235. });
  3236. DropTable("dbo.FixedAssetInfo",
  3237. removedAnnotations: new Dictionary<string, object>
  3238. {
  3239. { "DynamicFilter_FixedAsset_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3240. });
  3241. DropTable("dbo.FinshedEnterStore");
  3242. DropTable("dbo.Factories");
  3243. DropTable("dbo.ExpressServiceProviders");
  3244. DropTable("dbo.ExpressProviderMappers");
  3245. DropTable("dbo.ExpressLogistics");
  3246. DropTable("dbo.EmployeeWorkPerformanceInfo");
  3247. DropTable("dbo.EmployeeInfo",
  3248. removedAnnotations: new Dictionary<string, object>
  3249. {
  3250. { "DynamicFilter_Employee_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3251. });
  3252. DropTable("dbo.Dutys");
  3253. DropTable("dbo.DisqualifiedProductInfo");
  3254. DropTable("dbo.DeviceMgPlanInfo",
  3255. removedAnnotations: new Dictionary<string, object>
  3256. {
  3257. { "DynamicFilter_DeviceMgPlan_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3258. });
  3259. DropTable("dbo.Departments");
  3260. DropTable("dbo.CustomerSend");
  3261. DropTable("dbo.Customers");
  3262. DropTable("dbo.CustomerInvoiceAddress",
  3263. removedAnnotations: new Dictionary<string, object>
  3264. {
  3265. { "DynamicFilter_CustomerInvoiceAddress_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3266. });
  3267. DropTable("dbo.Sys_UserRoles");
  3268. DropTable("dbo.Sys_Users",
  3269. removedAnnotations: new Dictionary<string, object>
  3270. {
  3271. { "DynamicFilter_SysUser_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3272. });
  3273. DropTable("dbo.CustomerDisProductInfo");
  3274. DropTable("dbo.CustomerDefaultProduct");
  3275. DropTable("dbo.CurrentSemiStoreHouse");
  3276. DropTable("dbo.CurrentRmStoreHouse",
  3277. removedAnnotations: new Dictionary<string, object>
  3278. {
  3279. { "DynamicFilter_CurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3280. });
  3281. DropTable("dbo.CurrentProductStoreHouse");
  3282. DropTable("dbo.CurrencyExchangeRate");
  3283. DropTable("dbo.Currency");
  3284. DropTable("dbo.BusinessLogs",
  3285. removedAnnotations: new Dictionary<string, object>
  3286. {
  3287. { "DynamicFilter_BusinessLog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  3288. });
  3289. DropTable("dbo.BulletinInfo");
  3290. DropTable("dbo.BackUpCurrentSemiStoreHouse");
  3291. DropTable("dbo.Sys_AuditLogs");
  3292. DropTable("dbo.Sys_AppGuids");
  3293. }
  3294. }
  3295. }