BusinessMigrationDbContextModelSnapshot.cs 176 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502
  1. // <auto-generated />
  2. using System;
  3. using Business.EntityFrameworkCore;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Metadata;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. using Volo.Abp.EntityFrameworkCore;
  9. #nullable disable
  10. namespace Business.Migrations
  11. {
  12. [DbContext(typeof(BusinessMigrationDbContext))]
  13. partial class BusinessMigrationDbContextModelSnapshot : ModelSnapshot
  14. {
  15. protected override void BuildModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
  20. .HasAnnotation("ProductVersion", "6.0.5")
  21. .HasAnnotation("Relational:MaxIdentifierLength", 128);
  22. SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
  23. modelBuilder.Entity("Business.Model.Bang.b_bom_pretreatment", b =>
  24. {
  25. b.Property<long>("Id")
  26. .HasColumnType("bigint");
  27. b.Property<bool>("IsDeleted")
  28. .ValueGeneratedOnAdd()
  29. .HasColumnType("bit")
  30. .HasDefaultValue(false)
  31. .HasColumnName("IsDeleted")
  32. .HasComment("删除标识");
  33. b.Property<int>("backflush")
  34. .HasColumnType("int")
  35. .HasComment("是否倒冲");
  36. b.Property<long?>("bom_child_id")
  37. .HasColumnType("bigint")
  38. .HasComment("bom明细主键");
  39. b.Property<long?>("bom_id")
  40. .HasColumnType("bigint")
  41. .HasComment("BOMid");
  42. b.Property<string>("bom_number")
  43. .HasMaxLength(20)
  44. .HasColumnType("nvarchar(20)")
  45. .HasComment("bom编号");
  46. b.Property<long?>("create_by")
  47. .HasColumnType("bigint")
  48. .HasComment("创建人id");
  49. b.Property<string>("create_by_name")
  50. .HasMaxLength(50)
  51. .HasColumnType("nvarchar(50)")
  52. .HasComment("创建人名称");
  53. b.Property<DateTime?>("create_time")
  54. .HasColumnType("datetime2")
  55. .HasComment("创建时间");
  56. b.Property<int>("erp_cls")
  57. .HasColumnType("int")
  58. .HasComment("物料属性");
  59. b.Property<string>("erp_cls_name")
  60. .HasMaxLength(80)
  61. .HasColumnType("nvarchar(80)")
  62. .HasComment("物料属性名称");
  63. b.Property<long?>("factory_id")
  64. .HasColumnType("bigint")
  65. .HasComment("工厂ID");
  66. b.Property<long>("fid")
  67. .HasColumnType("bigint")
  68. .HasComment("本级id");
  69. b.Property<int>("haveicsubs")
  70. .HasColumnType("int")
  71. .HasComment("存在替代关系");
  72. b.Property<long?>("item_id")
  73. .HasColumnType("bigint")
  74. .HasComment("物料id");
  75. b.Property<string>("item_name")
  76. .HasMaxLength(80)
  77. .HasColumnType("nvarchar(80)")
  78. .HasComment("物料名称");
  79. b.Property<string>("item_number")
  80. .HasMaxLength(80)
  81. .HasColumnType("nvarchar(80)")
  82. .HasComment("物料编号");
  83. b.Property<int>("level")
  84. .HasColumnType("int")
  85. .HasComment("level");
  86. b.Property<string>("model")
  87. .HasMaxLength(200)
  88. .HasColumnType("nvarchar(200)")
  89. .HasComment("规格型号");
  90. b.Property<string>("num")
  91. .HasMaxLength(20)
  92. .HasColumnType("nvarchar(20)")
  93. .HasComment("项次号");
  94. b.Property<long?>("num_order")
  95. .HasColumnType("bigint")
  96. .HasComment("供排序使用");
  97. b.Property<long?>("org_id")
  98. .HasColumnType("bigint")
  99. .HasComment("组织ID");
  100. b.Property<long?>("parent_id")
  101. .HasColumnType("bigint")
  102. .HasComment("父级");
  103. b.Property<decimal?>("qty")
  104. .HasPrecision(23, 10)
  105. .HasColumnType("decimal(23,10)")
  106. .HasComment("单位用量");
  107. b.Property<long>("sourceid")
  108. .HasColumnType("bigint")
  109. .HasComment("所属BOM");
  110. b.Property<string>("substitute_code")
  111. .HasMaxLength(20)
  112. .HasColumnType("nvarchar(20)")
  113. .HasComment("群组代码");
  114. b.Property<int>("substitute_mode")
  115. .HasColumnType("int")
  116. .HasComment("替代方式");
  117. b.Property<int>("substitute_strategy")
  118. .HasColumnType("int")
  119. .HasComment("替代策略");
  120. b.Property<long>("tenant_id")
  121. .HasColumnType("bigint")
  122. .HasComment("企业ID");
  123. b.Property<int>("type")
  124. .HasColumnType("int")
  125. .HasComment("类型");
  126. b.Property<string>("unit")
  127. .HasMaxLength(80)
  128. .HasColumnType("nvarchar(80)")
  129. .HasComment("单位");
  130. b.Property<long?>("update_by")
  131. .HasColumnType("bigint")
  132. .HasComment("修改人");
  133. b.Property<string>("update_by_name")
  134. .HasMaxLength(50)
  135. .HasColumnType("nvarchar(50)")
  136. .HasComment("修改人名称");
  137. b.Property<DateTime?>("update_time")
  138. .HasColumnType("datetime2")
  139. .HasComment("修改时间");
  140. b.Property<string>("version")
  141. .HasMaxLength(80)
  142. .HasColumnType("nvarchar(80)")
  143. .HasComment("版本");
  144. b.HasKey("Id");
  145. b.ToTable("b_bom_pretreatment", (string)null);
  146. b.HasComment("Bom预处理");
  147. });
  148. modelBuilder.Entity("Business.Model.MES.IC.ic_bom", b =>
  149. {
  150. b.Property<long>("Id")
  151. .HasColumnType("bigint");
  152. b.Property<bool>("IsDeleted")
  153. .ValueGeneratedOnAdd()
  154. .HasColumnType("bit")
  155. .HasDefaultValue(false)
  156. .HasColumnName("IsDeleted")
  157. .HasComment("删除标识");
  158. b.Property<DateTime?>("begin_day")
  159. .HasColumnType("datetime2")
  160. .HasComment("生效日期");
  161. b.Property<string>("biller")
  162. .HasMaxLength(80)
  163. .HasColumnType("nvarchar(80)")
  164. .HasComment("图片");
  165. b.Property<int?>("bom_num")
  166. .HasColumnType("int")
  167. .HasComment("序号");
  168. b.Property<string>("bom_number")
  169. .HasMaxLength(20)
  170. .HasColumnType("nvarchar(20)")
  171. .HasComment("bom单编号");
  172. b.Property<string>("chartnumber")
  173. .HasMaxLength(80)
  174. .HasColumnType("nvarchar(80)")
  175. .HasComment("图表编号");
  176. b.Property<DateTime?>("check_date")
  177. .HasColumnType("datetime2")
  178. .HasComment("检验时间");
  179. b.Property<string>("checker")
  180. .HasMaxLength(80)
  181. .HasColumnType("nvarchar(80)")
  182. .HasComment("检验人");
  183. b.Property<long?>("create_by")
  184. .HasColumnType("bigint")
  185. .HasComment("创建人id");
  186. b.Property<string>("create_by_name")
  187. .HasMaxLength(50)
  188. .HasColumnType("nvarchar(50)")
  189. .HasComment("创建人名称");
  190. b.Property<DateTime?>("create_time")
  191. .HasColumnType("datetime2")
  192. .HasComment("创建时间");
  193. b.Property<DateTime?>("end_day")
  194. .HasColumnType("datetime2")
  195. .HasComment("失效日期");
  196. b.Property<long?>("factory_id")
  197. .HasColumnType("bigint")
  198. .HasComment("工厂ID");
  199. b.Property<long>("icitem_id")
  200. .HasColumnType("bigint")
  201. .HasComment("物料id");
  202. b.Property<string>("item_name")
  203. .HasMaxLength(200)
  204. .HasColumnType("nvarchar(200)")
  205. .HasComment("物料名称");
  206. b.Property<string>("item_number")
  207. .HasMaxLength(80)
  208. .HasColumnType("nvarchar(80)")
  209. .HasComment("物料代码");
  210. b.Property<long?>("org_id")
  211. .HasColumnType("bigint")
  212. .HasComment("组织ID");
  213. b.Property<string>("product_designer")
  214. .HasMaxLength(80)
  215. .HasColumnType("nvarchar(80)")
  216. .HasComment("产品设计员");
  217. b.Property<string>("product_principal")
  218. .HasMaxLength(80)
  219. .HasColumnType("nvarchar(80)")
  220. .HasComment("生产负责人");
  221. b.Property<long>("tenant_id")
  222. .HasColumnType("bigint")
  223. .HasComment("企业ID");
  224. b.Property<string>("unit")
  225. .HasMaxLength(20)
  226. .HasColumnType("nvarchar(20)")
  227. .HasComment("单位");
  228. b.Property<long?>("update_by")
  229. .HasColumnType("bigint")
  230. .HasComment("修改人");
  231. b.Property<string>("update_by_name")
  232. .HasMaxLength(50)
  233. .HasColumnType("nvarchar(50)")
  234. .HasComment("修改人名称");
  235. b.Property<DateTime?>("update_time")
  236. .HasColumnType("datetime2")
  237. .HasComment("修改时间");
  238. b.Property<DateTime?>("use_date")
  239. .HasColumnType("datetime2")
  240. .HasComment("bom创建时间");
  241. b.Property<int?>("use_status")
  242. .HasColumnType("int")
  243. .HasComment("使用状态");
  244. b.Property<string>("user")
  245. .HasMaxLength(20)
  246. .HasColumnType("nvarchar(20)")
  247. .HasComment("bom创建人");
  248. b.Property<string>("version")
  249. .HasMaxLength(80)
  250. .HasColumnType("nvarchar(80)")
  251. .HasComment("版本");
  252. b.HasKey("Id");
  253. b.HasIndex("bom_number", "item_number", "version", "tenant_id", "factory_id")
  254. .IsUnique()
  255. .HasFilter("[bom_number] IS NOT NULL AND [item_number] IS NOT NULL AND [version] IS NOT NULL AND [factory_id] IS NOT NULL");
  256. b.ToTable("ic_bom", (string)null);
  257. b.HasComment("物料BOM");
  258. });
  259. modelBuilder.Entity("Business.Model.MES.IC.ic_bom_child", b =>
  260. {
  261. b.Property<long>("Id")
  262. .HasColumnType("bigint");
  263. b.Property<bool>("IsDeleted")
  264. .ValueGeneratedOnAdd()
  265. .HasColumnType("bit")
  266. .HasDefaultValue(false)
  267. .HasColumnName("IsDeleted")
  268. .HasComment("删除标识");
  269. b.Property<int?>("backflush")
  270. .HasColumnType("int")
  271. .HasComment("是否倒冲");
  272. b.Property<DateTime?>("begin_day")
  273. .HasColumnType("datetime2")
  274. .HasComment("生效日期");
  275. b.Property<long?>("bom_id")
  276. .IsRequired()
  277. .HasColumnType("bigint")
  278. .HasComment("bom主键");
  279. b.Property<string>("bom_number")
  280. .HasMaxLength(20)
  281. .HasColumnType("nvarchar(20)")
  282. .HasComment("bom单编号");
  283. b.Property<int?>("child_num")
  284. .HasColumnType("int")
  285. .HasComment("序号");
  286. b.Property<long?>("create_by")
  287. .HasColumnType("bigint")
  288. .HasComment("创建人id");
  289. b.Property<string>("create_by_name")
  290. .HasMaxLength(50)
  291. .HasColumnType("nvarchar(50)")
  292. .HasComment("创建人名称");
  293. b.Property<DateTime?>("create_time")
  294. .HasColumnType("datetime2")
  295. .HasComment("创建时间");
  296. b.Property<DateTime?>("end_day")
  297. .HasColumnType("datetime2")
  298. .HasComment("失效日期");
  299. b.Property<int?>("entryid")
  300. .HasColumnType("int")
  301. .HasComment("顺序号");
  302. b.Property<int?>("erp_cls")
  303. .HasColumnType("int")
  304. .HasComment("物料属性");
  305. b.Property<long?>("factory_id")
  306. .HasColumnType("bigint")
  307. .HasComment("工厂ID");
  308. b.Property<int?>("haveicsubs")
  309. .HasColumnType("int")
  310. .HasComment("存在替代关系");
  311. b.Property<long?>("icitem_id")
  312. .IsRequired()
  313. .HasColumnType("bigint")
  314. .HasComment("物料id");
  315. b.Property<string>("icitem_ids")
  316. .HasMaxLength(2000)
  317. .HasColumnType("nvarchar(2000)")
  318. .HasComment("组合模式");
  319. b.Property<int?>("is_bom")
  320. .HasColumnType("int")
  321. .HasComment("是否是BOM");
  322. b.Property<int?>("is_replace")
  323. .HasColumnType("int")
  324. .HasComment("是否群组替代");
  325. b.Property<int?>("iskeyitem")
  326. .HasColumnType("int")
  327. .HasComment("是否关键件");
  328. b.Property<string>("item_name")
  329. .HasMaxLength(200)
  330. .HasColumnType("nvarchar(200)")
  331. .HasComment("物料名称");
  332. b.Property<string>("item_number")
  333. .HasMaxLength(80)
  334. .HasColumnType("nvarchar(80)")
  335. .HasComment("物料代码");
  336. b.Property<string>("note")
  337. .HasMaxLength(1000)
  338. .HasColumnType("nvarchar(1000)")
  339. .HasComment("备注");
  340. b.Property<DateTime?>("op_time")
  341. .HasColumnType("datetime2")
  342. .HasComment("操作时间");
  343. b.Property<long?>("org_id")
  344. .HasColumnType("bigint")
  345. .HasComment("组织ID");
  346. b.Property<decimal?>("qty")
  347. .HasPrecision(23, 10)
  348. .HasColumnType("decimal(23,10)")
  349. .HasComment("用量");
  350. b.Property<decimal?>("scrap")
  351. .HasPrecision(23, 10)
  352. .HasColumnType("decimal(23,10)")
  353. .HasComment("损耗率");
  354. b.Property<string>("substitute_code")
  355. .HasMaxLength(20)
  356. .HasColumnType("nvarchar(20)")
  357. .HasComment("群组代码");
  358. b.Property<long>("tenant_id")
  359. .HasColumnType("bigint")
  360. .HasComment("企业ID");
  361. b.Property<int?>("type")
  362. .HasColumnType("int")
  363. .HasComment("物料类型");
  364. b.Property<string>("unit")
  365. .HasMaxLength(20)
  366. .HasColumnType("nvarchar(20)")
  367. .HasComment("单位");
  368. b.Property<long?>("update_by")
  369. .HasColumnType("bigint")
  370. .HasComment("修改人");
  371. b.Property<string>("update_by_name")
  372. .HasMaxLength(50)
  373. .HasColumnType("nvarchar(50)")
  374. .HasComment("修改人名称");
  375. b.Property<DateTime?>("update_time")
  376. .HasColumnType("datetime2")
  377. .HasComment("修改时间");
  378. b.Property<int?>("use_status")
  379. .HasColumnType("int")
  380. .HasComment("使用状态");
  381. b.Property<string>("version")
  382. .HasMaxLength(80)
  383. .HasColumnType("nvarchar(80)")
  384. .HasComment("版本");
  385. b.HasKey("Id");
  386. b.HasIndex("bom_number", "item_number", "version", "tenant_id", "factory_id")
  387. .IsUnique()
  388. .HasFilter("[bom_number] IS NOT NULL AND [item_number] IS NOT NULL AND [version] IS NOT NULL AND [factory_id] IS NOT NULL");
  389. b.HasIndex("bom_id", "bom_number", "item_number", "version", "tenant_id", "factory_id");
  390. b.ToTable("ic_bom_child", (string)null);
  391. b.HasComment("物料BOM明细");
  392. });
  393. modelBuilder.Entity("Business.Model.MES.IC.ic_item", b =>
  394. {
  395. b.Property<long>("Id")
  396. .HasColumnType("bigint");
  397. b.Property<bool>("IsDeleted")
  398. .ValueGeneratedOnAdd()
  399. .HasColumnType("bit")
  400. .HasDefaultValue(false)
  401. .HasColumnName("IsDeleted")
  402. .HasComment("删除标识");
  403. b.Property<decimal?>("Shipping_date")
  404. .HasPrecision(23, 10)
  405. .HasColumnType("decimal(23,10)")
  406. .HasComment("发运提前期");
  407. b.Property<decimal?>("Warehousing_date")
  408. .HasPrecision(23, 10)
  409. .HasColumnType("decimal(23,10)")
  410. .HasComment("入库提前期");
  411. b.Property<string>("abc")
  412. .HasColumnType("nvarchar(max)")
  413. .HasComment("ABC分类");
  414. b.Property<int?>("allowbatch")
  415. .HasColumnType("int")
  416. .HasComment("批号管理");
  417. b.Property<int?>("allowmanu")
  418. .HasColumnType("int")
  419. .HasComment("允许生产");
  420. b.Property<int?>("allowout")
  421. .HasColumnType("int")
  422. .HasComment("允许委外");
  423. b.Property<int?>("allowpur")
  424. .HasColumnType("int")
  425. .HasComment("允许采购");
  426. b.Property<int?>("allowsale")
  427. .HasColumnType("int")
  428. .HasComment("允许销售");
  429. b.Property<int?>("allowserial")
  430. .HasColumnType("int")
  431. .HasComment("序列号管理");
  432. b.Property<decimal?>("bat_change_economy")
  433. .HasPrecision(23, 10)
  434. .HasColumnType("decimal(23,10)")
  435. .HasComment("变动提前期批量");
  436. b.Property<int>("batch_manager")
  437. .HasColumnType("int")
  438. .HasComment("是否采用业务批次管理");
  439. b.Property<string>("box_model")
  440. .HasMaxLength(200)
  441. .HasColumnType("nvarchar(200)")
  442. .HasComment("盒贴规格");
  443. b.Property<string>("chart_number")
  444. .HasMaxLength(80)
  445. .HasColumnType("nvarchar(80)")
  446. .HasComment("图号");
  447. b.Property<decimal?>("clean_leadtime")
  448. .HasPrecision(23, 10)
  449. .HasColumnType("decimal(23,10)")
  450. .HasComment("预处理提前期");
  451. b.Property<long?>("create_by")
  452. .HasColumnType("bigint")
  453. .HasComment("创建人id");
  454. b.Property<string>("create_by_name")
  455. .HasMaxLength(50)
  456. .HasColumnType("nvarchar(50)")
  457. .HasComment("创建人名称");
  458. b.Property<DateTime?>("create_time")
  459. .HasColumnType("datetime2")
  460. .HasComment("创建时间");
  461. b.Property<string>("cubic_measure")
  462. .HasMaxLength(80)
  463. .HasColumnType("nvarchar(80)")
  464. .HasComment("长度单位");
  465. b.Property<int?>("enable_warning")
  466. .HasColumnType("int")
  467. .HasComment("启用预警");
  468. b.Property<int?>("erp_cls")
  469. .HasColumnType("int")
  470. .HasComment("物料属性");
  471. b.Property<string>("erp_cls_name")
  472. .HasMaxLength(80)
  473. .HasColumnType("nvarchar(80)")
  474. .HasComment("物料属性");
  475. b.Property<string>("erp_oldnumber")
  476. .HasMaxLength(80)
  477. .HasColumnType("nvarchar(80)")
  478. .HasComment("erp旧料号");
  479. b.Property<long?>("factory_id")
  480. .HasColumnType("bigint")
  481. .HasComment("工厂ID");
  482. b.Property<decimal?>("fix_leadtime")
  483. .HasPrecision(23, 10)
  484. .HasColumnType("decimal(23,10)")
  485. .HasComment("固定提前期(天)");
  486. b.Property<string>("fmr")
  487. .HasColumnType("nvarchar(max)")
  488. .HasComment("FMR分类");
  489. b.Property<string>("fms_number")
  490. .HasMaxLength(80)
  491. .HasColumnType("nvarchar(80)")
  492. .HasComment("fms旧料号");
  493. b.Property<string>("full_name")
  494. .HasMaxLength(255)
  495. .HasColumnType("nvarchar(255)")
  496. .HasComment("全名");
  497. b.Property<string>("fversion")
  498. .HasMaxLength(80)
  499. .HasColumnType("nvarchar(80)")
  500. .HasComment("版本号");
  501. b.Property<decimal?>("gross_weight")
  502. .HasPrecision(23, 10)
  503. .HasColumnType("decimal(23,10)")
  504. .HasComment("毛重");
  505. b.Property<decimal?>("height")
  506. .HasPrecision(23, 10)
  507. .HasColumnType("decimal(23,10)")
  508. .HasComment("高度");
  509. b.Property<int?>("is_clean")
  510. .HasColumnType("int")
  511. .HasComment("是否备料前预处理");
  512. b.Property<int?>("is_equipment")
  513. .HasColumnType("int")
  514. .HasComment("是否为设备");
  515. b.Property<int?>("isbackflush")
  516. .HasColumnType("int")
  517. .HasComment("是否倒冲");
  518. b.Property<int?>("isfixedreorder")
  519. .HasColumnType("int")
  520. .HasComment("设置为固定再订货点");
  521. b.Property<int?>("iskeyitem")
  522. .HasColumnType("int")
  523. .HasComment("是否关键件");
  524. b.Property<long?>("item_level")
  525. .HasColumnType("bigint")
  526. .HasComment("物料等级");
  527. b.Property<decimal?>("lead_time")
  528. .HasPrecision(23, 10)
  529. .HasColumnType("decimal(23,10)")
  530. .HasComment("变动提前期");
  531. b.Property<decimal?>("length")
  532. .HasPrecision(23, 10)
  533. .HasColumnType("decimal(23,10)")
  534. .HasComment("长度");
  535. b.Property<int?>("life_state")
  536. .HasColumnType("int")
  537. .HasComment("生命周期状态");
  538. b.Property<decimal?>("maq")
  539. .HasPrecision(23, 10)
  540. .HasColumnType("decimal(23,10)")
  541. .HasComment("最大生产批量");
  542. b.Property<string>("maund")
  543. .HasMaxLength(80)
  544. .HasColumnType("nvarchar(80)")
  545. .HasComment("重量单位");
  546. b.Property<decimal?>("minorderqty")
  547. .IsRequired()
  548. .HasPrecision(23, 10)
  549. .HasColumnType("decimal(23,10)")
  550. .HasComment("最小订单量");
  551. b.Property<decimal?>("minpackqty")
  552. .IsRequired()
  553. .HasPrecision(23, 10)
  554. .HasColumnType("decimal(23,10)")
  555. .HasComment("最小包装量");
  556. b.Property<string>("model")
  557. .HasMaxLength(200)
  558. .HasColumnType("nvarchar(200)")
  559. .HasComment("规格型号");
  560. b.Property<decimal?>("moq")
  561. .HasPrecision(23, 10)
  562. .HasColumnType("decimal(23,10)")
  563. .HasComment("经济生产批量");
  564. b.Property<string>("name")
  565. .HasMaxLength(80)
  566. .HasColumnType("nvarchar(80)")
  567. .HasComment("物料名称");
  568. b.Property<decimal?>("net_weight")
  569. .HasPrecision(23, 10)
  570. .HasColumnType("decimal(23,10)")
  571. .HasComment("净重");
  572. b.Property<string>("number")
  573. .HasMaxLength(80)
  574. .HasColumnType("nvarchar(80)")
  575. .HasComment("物料编码");
  576. b.Property<decimal?>("order_inter_val")
  577. .HasPrecision(23, 10)
  578. .HasColumnType("decimal(23,10)")
  579. .HasComment("订货间隔期_天");
  580. b.Property<decimal?>("order_leadtime")
  581. .IsRequired()
  582. .HasPrecision(23, 10)
  583. .HasColumnType("decimal(23,10)")
  584. .HasComment("下单前置期_天");
  585. b.Property<decimal?>("order_point")
  586. .HasPrecision(23, 10)
  587. .HasColumnType("decimal(23,10)")
  588. .HasComment("再订货点");
  589. b.Property<int?>("order_trategy")
  590. .HasColumnType("int")
  591. .HasComment("订货策略");
  592. b.Property<decimal?>("ordissu_days")
  593. .HasPrecision(23, 10)
  594. .HasColumnType("decimal(23,10)")
  595. .HasComment("工单发料时间/天");
  596. b.Property<long?>("org_id")
  597. .HasColumnType("bigint")
  598. .HasComment("组织ID");
  599. b.Property<long?>("output_type_id")
  600. .HasColumnType("bigint")
  601. .HasComment("出库类型");
  602. b.Property<string>("photo")
  603. .HasMaxLength(80)
  604. .HasColumnType("nvarchar(80)")
  605. .HasComment("图片");
  606. b.Property<long?>("picktype")
  607. .HasColumnType("bigint")
  608. .HasComment("领料类型");
  609. b.Property<int?>("plan_trategy")
  610. .HasColumnType("int")
  611. .HasComment("计划策略");
  612. b.Property<string>("product_line")
  613. .HasMaxLength(80)
  614. .HasColumnType("nvarchar(80)")
  615. .HasComment("产品线");
  616. b.Property<decimal?>("production_leadtime")
  617. .IsRequired()
  618. .HasPrecision(23, 10)
  619. .HasColumnType("decimal(23,10)")
  620. .HasComment("生产中提前期_天");
  621. b.Property<int?>("put_integer")
  622. .HasColumnType("int")
  623. .HasComment("投料自动取整");
  624. b.Property<decimal?>("secinv")
  625. .HasPrecision(23, 10)
  626. .HasColumnType("decimal(23,10)")
  627. .HasComment("安全库存数量");
  628. b.Property<decimal?>("secinv_ratio")
  629. .HasPrecision(23, 10)
  630. .HasColumnType("decimal(23,10)")
  631. .HasComment("安全库存触发采购比例");
  632. b.Property<decimal?>("self_inspection_date")
  633. .HasPrecision(23, 10)
  634. .HasColumnType("decimal(23,10)")
  635. .HasComment("自检提前期");
  636. b.Property<decimal?>("size")
  637. .HasPrecision(23, 10)
  638. .HasColumnType("decimal(23,10)")
  639. .HasComment("体积");
  640. b.Property<string>("source")
  641. .HasMaxLength(200)
  642. .HasColumnType("nvarchar(200)")
  643. .HasComment("来源");
  644. b.Property<decimal?>("standard_manhour")
  645. .HasPrecision(23, 10)
  646. .HasColumnType("decimal(23,10)")
  647. .HasComment("单位标准工时_小时");
  648. b.Property<decimal?>("standard_period")
  649. .HasPrecision(23, 10)
  650. .HasColumnType("decimal(23,10)")
  651. .HasComment("标准工期");
  652. b.Property<decimal?>("sterilize_leadtime")
  653. .HasPrecision(23, 10)
  654. .HasColumnType("decimal(23,10)")
  655. .HasComment("工序委外提前期");
  656. b.Property<decimal?>("stock_leadtime")
  657. .IsRequired()
  658. .HasPrecision(23, 10)
  659. .HasColumnType("decimal(23,10)")
  660. .HasComment("仓库中提前期_天");
  661. b.Property<long>("tenant_id")
  662. .HasColumnType("bigint")
  663. .HasComment("企业ID");
  664. b.Property<decimal?>("total_tqq")
  665. .HasPrecision(23, 10)
  666. .HasColumnType("decimal(23,10)")
  667. .HasComment("累计提前期");
  668. b.Property<decimal?>("transfer_leadtime")
  669. .HasPrecision(23, 10)
  670. .HasColumnType("decimal(23,10)")
  671. .HasComment("平台调拨提前期");
  672. b.Property<decimal?>("transportation_leadtime")
  673. .IsRequired()
  674. .HasPrecision(23, 10)
  675. .HasColumnType("decimal(23,10)")
  676. .HasComment("运输中提前期_天");
  677. b.Property<string>("unit")
  678. .HasMaxLength(80)
  679. .HasColumnType("nvarchar(80)")
  680. .HasComment("单位");
  681. b.Property<decimal?>("unit_qty")
  682. .HasPrecision(23, 10)
  683. .HasColumnType("decimal(23,10)")
  684. .HasComment("单位包装数量");
  685. b.Property<decimal?>("unititem_amount")
  686. .HasPrecision(23, 10)
  687. .HasColumnType("decimal(23,10)")
  688. .HasComment("单位材料定额_元");
  689. b.Property<long?>("update_by")
  690. .HasColumnType("bigint")
  691. .HasComment("修改人");
  692. b.Property<string>("update_by_name")
  693. .HasMaxLength(50)
  694. .HasColumnType("nvarchar(50)")
  695. .HasComment("修改人名称");
  696. b.Property<DateTime?>("update_time")
  697. .HasColumnType("datetime2")
  698. .HasComment("修改时间");
  699. b.Property<decimal?>("width")
  700. .HasPrecision(23, 10)
  701. .HasColumnType("decimal(23,10)")
  702. .HasComment("宽度");
  703. b.HasKey("Id");
  704. b.HasIndex("number", "fversion", "tenant_id", "factory_id")
  705. .IsUnique()
  706. .HasFilter("[number] IS NOT NULL AND [fversion] IS NOT NULL AND [factory_id] IS NOT NULL");
  707. b.HasIndex("number", "name", "tenant_id", "factory_id");
  708. b.ToTable("ic_item", (string)null);
  709. b.HasComment("物料详情");
  710. });
  711. modelBuilder.Entity("Business.Model.MES.IC.ic_item_stock", b =>
  712. {
  713. b.Property<long>("Id")
  714. .HasColumnType("bigint");
  715. b.Property<bool>("IsDeleted")
  716. .ValueGeneratedOnAdd()
  717. .HasColumnType("bit")
  718. .HasDefaultValue(false)
  719. .HasColumnName("IsDeleted")
  720. .HasComment("删除标识");
  721. b.Property<long?>("create_by")
  722. .HasColumnType("bigint")
  723. .HasComment("创建人id");
  724. b.Property<string>("create_by_name")
  725. .HasMaxLength(50)
  726. .HasColumnType("nvarchar(50)")
  727. .HasComment("创建人名称");
  728. b.Property<DateTime?>("create_time")
  729. .HasColumnType("datetime2")
  730. .HasComment("创建时间");
  731. b.Property<long?>("factory_id")
  732. .HasColumnType("bigint")
  733. .HasComment("工厂ID");
  734. b.Property<string>("fversion")
  735. .HasMaxLength(80)
  736. .HasColumnType("nvarchar(80)")
  737. .HasComment("版本号");
  738. b.Property<long>("icitem_id")
  739. .HasColumnType("bigint")
  740. .HasComment("物料id");
  741. b.Property<string>("icitem_name")
  742. .HasMaxLength(80)
  743. .HasColumnType("nvarchar(80)")
  744. .HasComment("物料名称");
  745. b.Property<string>("icitem_number")
  746. .HasMaxLength(80)
  747. .HasColumnType("nvarchar(80)")
  748. .HasComment("物料编码");
  749. b.Property<long?>("org_id")
  750. .HasColumnType("bigint")
  751. .HasComment("组织ID");
  752. b.Property<decimal?>("quantity_in_transit")
  753. .HasPrecision(23, 10)
  754. .HasColumnType("decimal(23,10)")
  755. .HasComment("调拨在途数量");
  756. b.Property<decimal?>("sqty")
  757. .HasPrecision(23, 10)
  758. .HasColumnType("decimal(23,10)")
  759. .HasComment("物料库存量");
  760. b.Property<long>("tenant_id")
  761. .HasColumnType("bigint")
  762. .HasComment("企业ID");
  763. b.Property<long?>("update_by")
  764. .HasColumnType("bigint")
  765. .HasComment("修改人");
  766. b.Property<string>("update_by_name")
  767. .HasMaxLength(50)
  768. .HasColumnType("nvarchar(50)")
  769. .HasComment("修改人名称");
  770. b.Property<DateTime?>("update_time")
  771. .HasColumnType("datetime2")
  772. .HasComment("修改时间");
  773. b.HasKey("Id");
  774. b.HasIndex("icitem_id", "icitem_name", "tenant_id", "factory_id");
  775. b.HasIndex("icitem_number", "fversion", "tenant_id", "factory_id")
  776. .IsUnique()
  777. .HasFilter("[icitem_number] IS NOT NULL AND [fversion] IS NOT NULL AND [factory_id] IS NOT NULL");
  778. b.ToTable("ic_item_stock", (string)null);
  779. b.HasComment("物料库存表");
  780. });
  781. modelBuilder.Entity("Business.Model.MES.IC.ic_substitute", b =>
  782. {
  783. b.Property<long>("Id")
  784. .HasColumnType("bigint");
  785. b.Property<bool>("IsDeleted")
  786. .ValueGeneratedOnAdd()
  787. .HasColumnType("bit")
  788. .HasDefaultValue(false)
  789. .HasColumnName("IsDeleted")
  790. .HasComment("删除标识");
  791. b.Property<long?>("create_by")
  792. .HasColumnType("bigint")
  793. .HasComment("创建人id");
  794. b.Property<string>("create_by_name")
  795. .HasMaxLength(50)
  796. .HasColumnType("nvarchar(50)")
  797. .HasComment("创建人名称");
  798. b.Property<DateTime?>("create_time")
  799. .HasColumnType("datetime2")
  800. .HasComment("创建时间");
  801. b.Property<long?>("factory_id")
  802. .HasColumnType("bigint")
  803. .HasComment("工厂ID");
  804. b.Property<long?>("org_id")
  805. .HasColumnType("bigint")
  806. .HasComment("组织ID");
  807. b.Property<string>("substitute_code")
  808. .HasMaxLength(20)
  809. .HasColumnType("nvarchar(20)")
  810. .HasComment("群组代码");
  811. b.Property<int?>("substitute_mode")
  812. .HasColumnType("int")
  813. .HasComment("替代方式");
  814. b.Property<int?>("substitute_strategy")
  815. .HasColumnType("int")
  816. .HasComment("替代策略");
  817. b.Property<int?>("substitute_type")
  818. .HasColumnType("int")
  819. .HasComment("替代类型");
  820. b.Property<long>("tenant_id")
  821. .HasColumnType("bigint")
  822. .HasComment("企业ID");
  823. b.Property<long?>("update_by")
  824. .HasColumnType("bigint")
  825. .HasComment("修改人");
  826. b.Property<string>("update_by_name")
  827. .HasMaxLength(50)
  828. .HasColumnType("nvarchar(50)")
  829. .HasComment("修改人名称");
  830. b.Property<DateTime?>("update_time")
  831. .HasColumnType("datetime2")
  832. .HasComment("修改时间");
  833. b.HasKey("Id");
  834. b.HasIndex("substitute_code", "tenant_id", "factory_id");
  835. b.ToTable("ic_substitute", (string)null);
  836. b.HasComment("替代群组");
  837. });
  838. modelBuilder.Entity("Business.Model.MES.IC.ic_substitute_group", b =>
  839. {
  840. b.Property<long>("Id")
  841. .HasColumnType("bigint");
  842. b.Property<bool>("IsDeleted")
  843. .ValueGeneratedOnAdd()
  844. .HasColumnType("bit")
  845. .HasDefaultValue(false)
  846. .HasColumnName("IsDeleted")
  847. .HasComment("删除标识");
  848. b.Property<long?>("create_by")
  849. .HasColumnType("bigint")
  850. .HasComment("创建人id");
  851. b.Property<string>("create_by_name")
  852. .HasMaxLength(50)
  853. .HasColumnType("nvarchar(50)")
  854. .HasComment("创建人名称");
  855. b.Property<DateTime?>("create_time")
  856. .HasColumnType("datetime2")
  857. .HasComment("创建时间");
  858. b.Property<long?>("factory_id")
  859. .HasColumnType("bigint")
  860. .HasComment("工厂ID");
  861. b.Property<int?>("main_material")
  862. .HasColumnType("int")
  863. .HasComment("主料/替代料");
  864. b.Property<int?>("order_num")
  865. .HasColumnType("int")
  866. .HasComment("群组优先级");
  867. b.Property<long?>("org_id")
  868. .HasColumnType("bigint")
  869. .HasComment("组织ID");
  870. b.Property<string>("product_line")
  871. .HasMaxLength(50)
  872. .HasColumnType("nvarchar(50)")
  873. .HasComment("产品线");
  874. b.Property<string>("replace_name")
  875. .HasMaxLength(50)
  876. .HasColumnType("nvarchar(50)")
  877. .HasComment("替代名称");
  878. b.Property<string>("replace_relation")
  879. .HasMaxLength(2000)
  880. .HasColumnType("nvarchar(2000)")
  881. .HasComment("替代关系");
  882. b.Property<string>("replace_way")
  883. .HasMaxLength(50)
  884. .HasColumnType("nvarchar(50)")
  885. .HasComment("替代方式");
  886. b.Property<string>("substitute_code")
  887. .HasMaxLength(20)
  888. .HasColumnType("nvarchar(20)")
  889. .HasComment("群组代码");
  890. b.Property<long>("substitute_group_id")
  891. .HasColumnType("bigint")
  892. .HasComment("群组主键");
  893. b.Property<long>("tenant_id")
  894. .HasColumnType("bigint")
  895. .HasComment("企业ID");
  896. b.Property<long?>("update_by")
  897. .HasColumnType("bigint")
  898. .HasComment("修改人");
  899. b.Property<string>("update_by_name")
  900. .HasMaxLength(50)
  901. .HasColumnType("nvarchar(50)")
  902. .HasComment("修改人名称");
  903. b.Property<DateTime?>("update_time")
  904. .HasColumnType("datetime2")
  905. .HasComment("修改时间");
  906. b.Property<string>("use_model")
  907. .HasMaxLength(5000)
  908. .HasColumnType("nvarchar(max)")
  909. .HasComment("使用机型");
  910. b.HasKey("Id");
  911. b.HasIndex("substitute_code", "tenant_id", "factory_id");
  912. b.ToTable("ic_substitute_group", (string)null);
  913. b.HasComment("物料替代多群组");
  914. });
  915. modelBuilder.Entity("Business.Model.MES.IC.ic_substitute_group_detail", b =>
  916. {
  917. b.Property<long>("Id")
  918. .HasColumnType("bigint");
  919. b.Property<bool>("IsDeleted")
  920. .ValueGeneratedOnAdd()
  921. .HasColumnType("bit")
  922. .HasDefaultValue(false)
  923. .HasColumnName("IsDeleted")
  924. .HasComment("删除标识");
  925. b.Property<long?>("create_by")
  926. .HasColumnType("bigint")
  927. .HasComment("创建人id");
  928. b.Property<string>("create_by_name")
  929. .HasMaxLength(50)
  930. .HasColumnType("nvarchar(50)")
  931. .HasComment("创建人名称");
  932. b.Property<DateTime?>("create_time")
  933. .HasColumnType("datetime2")
  934. .HasComment("创建时间");
  935. b.Property<long?>("factory_id")
  936. .HasColumnType("bigint")
  937. .HasComment("工厂ID");
  938. b.Property<string>("fversion")
  939. .HasMaxLength(80)
  940. .HasColumnType("nvarchar(80)")
  941. .HasComment("版本号");
  942. b.Property<long>("icitem_id")
  943. .HasColumnType("bigint")
  944. .HasComment("物料主键");
  945. b.Property<string>("icitem_number")
  946. .HasMaxLength(20)
  947. .HasColumnType("nvarchar(20)")
  948. .HasComment("物料编码");
  949. b.Property<int?>("ismain")
  950. .HasColumnType("int")
  951. .HasComment("主/替");
  952. b.Property<long?>("org_id")
  953. .HasColumnType("bigint")
  954. .HasComment("组织ID");
  955. b.Property<decimal?>("replace_qty")
  956. .HasPrecision(23, 10)
  957. .HasColumnType("decimal(23,10)")
  958. .HasComment("替代数量");
  959. b.Property<int?>("seq")
  960. .HasColumnType("int")
  961. .HasComment("序号");
  962. b.Property<string>("substitute_code")
  963. .HasMaxLength(20)
  964. .HasColumnType("nvarchar(20)")
  965. .HasComment("群组代码");
  966. b.Property<long>("substitute_group_id")
  967. .HasColumnType("bigint")
  968. .HasComment("替代多群组主键");
  969. b.Property<long>("tenant_id")
  970. .HasColumnType("bigint")
  971. .HasComment("企业ID");
  972. b.Property<long?>("update_by")
  973. .HasColumnType("bigint")
  974. .HasComment("修改人");
  975. b.Property<string>("update_by_name")
  976. .HasMaxLength(50)
  977. .HasColumnType("nvarchar(50)")
  978. .HasComment("修改人名称");
  979. b.Property<DateTime?>("update_time")
  980. .HasColumnType("datetime2")
  981. .HasComment("修改时间");
  982. b.HasKey("Id");
  983. b.HasIndex("substitute_code", "icitem_number", "tenant_id", "factory_id");
  984. b.ToTable("ic_substitute_group_detail", (string)null);
  985. b.HasComment("物料替代多群组明细");
  986. });
  987. modelBuilder.Entity("Business.Model.Production.mes_moentry", b =>
  988. {
  989. b.Property<long>("Id")
  990. .HasColumnType("bigint");
  991. b.Property<bool>("IsDeleted")
  992. .ValueGeneratedOnAdd()
  993. .HasColumnType("bit")
  994. .HasDefaultValue(false)
  995. .HasColumnName("IsDeleted")
  996. .HasComment("删除标识");
  997. b.Property<long?>("create_by")
  998. .HasColumnType("bigint")
  999. .HasComment("创建人id");
  1000. b.Property<string>("create_by_name")
  1001. .HasMaxLength(50)
  1002. .HasColumnType("nvarchar(50)")
  1003. .HasComment("创建人名称");
  1004. b.Property<DateTime?>("create_time")
  1005. .HasColumnType("datetime2")
  1006. .HasComment("创建时间");
  1007. b.Property<long?>("factory_id")
  1008. .HasColumnType("bigint")
  1009. .HasComment("工厂ID");
  1010. b.Property<string>("fbill_no")
  1011. .HasMaxLength(80)
  1012. .HasColumnType("nvarchar(80)")
  1013. .HasComment("订单编号");
  1014. b.Property<long?>("fentry_id")
  1015. .HasColumnType("bigint")
  1016. .HasComment("订单行号");
  1017. b.Property<long?>("moentry_moid")
  1018. .HasColumnType("bigint")
  1019. .HasComment("工单主表id");
  1020. b.Property<string>("moentry_mono")
  1021. .HasMaxLength(80)
  1022. .HasColumnType("nvarchar(80)")
  1023. .HasComment("工单编号");
  1024. b.Property<decimal?>("morder_production_number")
  1025. .HasPrecision(23, 10)
  1026. .HasColumnType("decimal(23,10)")
  1027. .HasComment("工单生产数量(计划数量)");
  1028. b.Property<decimal?>("need_number")
  1029. .HasPrecision(23, 10)
  1030. .HasColumnType("decimal(23,10)")
  1031. .HasComment("需求数量");
  1032. b.Property<long?>("org_id")
  1033. .HasColumnType("bigint")
  1034. .HasComment("组织ID");
  1035. b.Property<decimal?>("remaining_number")
  1036. .HasPrecision(23, 10)
  1037. .HasColumnType("decimal(23,10)")
  1038. .HasComment("剩余可用数量");
  1039. b.Property<long?>("soentry_id")
  1040. .HasColumnType("bigint")
  1041. .HasComment("订单行id");
  1042. b.Property<long>("tenant_id")
  1043. .HasColumnType("bigint")
  1044. .HasComment("企业ID");
  1045. b.Property<string>("unit")
  1046. .HasMaxLength(80)
  1047. .HasColumnType("nvarchar(80)")
  1048. .HasComment("单位");
  1049. b.Property<long?>("update_by")
  1050. .HasColumnType("bigint")
  1051. .HasComment("修改人");
  1052. b.Property<string>("update_by_name")
  1053. .HasMaxLength(50)
  1054. .HasColumnType("nvarchar(50)")
  1055. .HasComment("修改人名称");
  1056. b.Property<DateTime?>("update_time")
  1057. .HasColumnType("datetime2")
  1058. .HasComment("修改时间");
  1059. b.HasKey("Id");
  1060. b.HasIndex("moentry_moid", "moentry_mono", "tenant_id", "factory_id");
  1061. b.ToTable("mes_moentry", (string)null);
  1062. b.HasComment("生成工单子表");
  1063. });
  1064. modelBuilder.Entity("Business.Model.Production.mes_mooccupy", b =>
  1065. {
  1066. b.Property<long>("Id")
  1067. .HasColumnType("bigint");
  1068. b.Property<bool>("IsDeleted")
  1069. .ValueGeneratedOnAdd()
  1070. .HasColumnType("bit")
  1071. .HasDefaultValue(false)
  1072. .HasColumnName("IsDeleted")
  1073. .HasComment("删除标识");
  1074. b.Property<long?>("create_by")
  1075. .HasColumnType("bigint")
  1076. .HasComment("创建人id");
  1077. b.Property<string>("create_by_name")
  1078. .HasMaxLength(50)
  1079. .HasColumnType("nvarchar(50)")
  1080. .HasComment("创建人名称");
  1081. b.Property<DateTime?>("create_time")
  1082. .HasColumnType("datetime2")
  1083. .HasComment("创建时间");
  1084. b.Property<long?>("factory_id")
  1085. .HasColumnType("bigint")
  1086. .HasComment("工厂ID");
  1087. b.Property<string>("fbill_no")
  1088. .HasMaxLength(50)
  1089. .HasColumnType("nvarchar(50)")
  1090. .HasComment("订单号");
  1091. b.Property<long?>("fentry_id")
  1092. .HasColumnType("bigint")
  1093. .HasComment("行号");
  1094. b.Property<string>("fitem_name")
  1095. .IsRequired()
  1096. .HasMaxLength(500)
  1097. .HasColumnType("nvarchar(500)")
  1098. .HasComment("物料名称");
  1099. b.Property<string>("fitem_number")
  1100. .IsRequired()
  1101. .HasMaxLength(50)
  1102. .HasColumnType("nvarchar(50)")
  1103. .HasComment("物料编码");
  1104. b.Property<string>("fmodel")
  1105. .HasMaxLength(500)
  1106. .HasColumnType("nvarchar(500)")
  1107. .HasComment("规格型号");
  1108. b.Property<string>("moo_cbr")
  1109. .HasMaxLength(50)
  1110. .HasColumnType("nvarchar(50)")
  1111. .HasComment("变更人");
  1112. b.Property<string>("moo_creason")
  1113. .HasMaxLength(500)
  1114. .HasColumnType("nvarchar(500)")
  1115. .HasComment("变更原因");
  1116. b.Property<DateTime?>("moo_ctime")
  1117. .HasColumnType("datetime2")
  1118. .HasComment("变更时间");
  1119. b.Property<DateTime?>("moo_etime")
  1120. .HasColumnType("datetime2")
  1121. .HasComment("结束时间");
  1122. b.Property<long?>("moo_id_billid")
  1123. .HasColumnType("bigint")
  1124. .HasComment("订单id");
  1125. b.Property<string>("moo_id_type")
  1126. .HasMaxLength(50)
  1127. .HasColumnType("nvarchar(50)")
  1128. .HasComment("类型--原始,分配");
  1129. b.Property<string>("moo_mo")
  1130. .HasMaxLength(50)
  1131. .HasColumnType("nvarchar(50)")
  1132. .HasComment("工单号");
  1133. b.Property<long?>("moo_moid")
  1134. .HasColumnType("bigint")
  1135. .HasComment("工单id");
  1136. b.Property<decimal?>("moo_qty")
  1137. .HasPrecision(23, 10)
  1138. .HasColumnType("decimal(23,10)")
  1139. .HasComment("占用量");
  1140. b.Property<int?>("moo_state")
  1141. .HasColumnType("int")
  1142. .HasComment("占用状态-1占用 默认0");
  1143. b.Property<DateTime?>("moo_stime")
  1144. .HasColumnType("datetime2")
  1145. .HasComment("开始时间");
  1146. b.Property<long?>("org_id")
  1147. .HasColumnType("bigint")
  1148. .HasComment("组织ID");
  1149. b.Property<long>("tenant_id")
  1150. .HasColumnType("bigint")
  1151. .HasComment("企业ID");
  1152. b.Property<long?>("update_by")
  1153. .HasColumnType("bigint")
  1154. .HasComment("修改人");
  1155. b.Property<string>("update_by_name")
  1156. .HasMaxLength(50)
  1157. .HasColumnType("nvarchar(50)")
  1158. .HasComment("修改人名称");
  1159. b.Property<DateTime?>("update_time")
  1160. .HasColumnType("datetime2")
  1161. .HasComment("修改时间");
  1162. b.HasKey("Id");
  1163. b.HasIndex("moo_id_billid", "tenant_id", "factory_id");
  1164. b.ToTable("mes_mooccupy", (string)null);
  1165. b.HasComment("在制工单占用记录表");
  1166. });
  1167. modelBuilder.Entity("Business.Model.Production.mes_morder", b =>
  1168. {
  1169. b.Property<long>("Id")
  1170. .HasColumnType("bigint");
  1171. b.Property<bool>("IsDeleted")
  1172. .ValueGeneratedOnAdd()
  1173. .HasColumnType("bit")
  1174. .HasDefaultValue(false)
  1175. .HasColumnName("IsDeleted")
  1176. .HasComment("删除标识");
  1177. b.Property<string>("bom_number")
  1178. .HasMaxLength(80)
  1179. .HasColumnType("nvarchar(80)")
  1180. .HasComment("bom编码");
  1181. b.Property<DateTime?>("convey_date")
  1182. .HasColumnType("datetime2")
  1183. .HasComment("下达日期");
  1184. b.Property<long?>("create_by")
  1185. .HasColumnType("bigint")
  1186. .HasComment("创建人id");
  1187. b.Property<string>("create_by_name")
  1188. .HasMaxLength(50)
  1189. .HasColumnType("nvarchar(50)")
  1190. .HasComment("创建人名称");
  1191. b.Property<DateTime?>("create_time")
  1192. .HasColumnType("datetime2")
  1193. .HasComment("创建时间");
  1194. b.Property<long?>("factory_id")
  1195. .HasColumnType("bigint")
  1196. .HasComment("工厂ID");
  1197. b.Property<string>("fmodel")
  1198. .HasMaxLength(500)
  1199. .HasColumnType("nvarchar(500)")
  1200. .HasComment("规格型号");
  1201. b.Property<string>("fms_number")
  1202. .HasMaxLength(80)
  1203. .HasColumnType("nvarchar(80)")
  1204. .HasComment("fms旧料号");
  1205. b.Property<decimal?>("inspection_number")
  1206. .HasPrecision(23, 10)
  1207. .HasColumnType("decimal(23,10)")
  1208. .HasComment("报检数量");
  1209. b.Property<decimal?>("inventory_number")
  1210. .HasPrecision(23, 10)
  1211. .HasColumnType("decimal(23,10)")
  1212. .HasComment("入库数量");
  1213. b.Property<DateTime?>("mat_end_date")
  1214. .HasColumnType("datetime2")
  1215. .HasComment("基于物料结束时间");
  1216. b.Property<DateTime?>("mat_start_date")
  1217. .HasColumnType("datetime2")
  1218. .HasComment("基于物料开始时间");
  1219. b.Property<DateTime?>("moentry_etime")
  1220. .HasColumnType("datetime2")
  1221. .HasComment("生产工单结束日期");
  1222. b.Property<long?>("moentry_prd")
  1223. .HasColumnType("bigint")
  1224. .HasComment("生产组织id");
  1225. b.Property<string>("moentry_prdname")
  1226. .HasMaxLength(50)
  1227. .HasColumnType("nvarchar(50)")
  1228. .HasComment("生产组织名称");
  1229. b.Property<int?>("moentry_startup_status")
  1230. .HasColumnType("int")
  1231. .HasComment("启动状态");
  1232. b.Property<DateTime?>("moentry_stime")
  1233. .HasColumnType("datetime2")
  1234. .HasComment("生产工单开始日期");
  1235. b.Property<DateTime?>("moentry_sys_etime")
  1236. .HasColumnType("datetime2")
  1237. .HasComment("系统建议完工时间");
  1238. b.Property<DateTime?>("moentry_sys_stime")
  1239. .HasColumnType("datetime2")
  1240. .HasComment("系统建议开工时间");
  1241. b.Property<long?>("moentry_wrkc")
  1242. .HasColumnType("bigint")
  1243. .HasComment("工作中心id");
  1244. b.Property<string>("moentry_wrkcname")
  1245. .HasMaxLength(50)
  1246. .HasColumnType("nvarchar(50)")
  1247. .HasComment("工作中心名称");
  1248. b.Property<string>("morder_batchno")
  1249. .HasMaxLength(100)
  1250. .HasColumnType("nvarchar(100)")
  1251. .HasComment("工单批号--(批号管理的物料出入库要使用)");
  1252. b.Property<DateTime?>("morder_date")
  1253. .HasColumnType("datetime2")
  1254. .HasComment("生产工单日期");
  1255. b.Property<string>("morder_fstate")
  1256. .HasMaxLength(50)
  1257. .HasColumnType("nvarchar(50)")
  1258. .HasComment("前状态--计划、下达、完成、关闭");
  1259. b.Property<string>("morder_icitem_type")
  1260. .HasMaxLength(255)
  1261. .HasColumnType("nvarchar(255)")
  1262. .HasComment("工单所属物料类型");
  1263. b.Property<decimal?>("morder_need_time")
  1264. .HasPrecision(23, 10)
  1265. .HasColumnType("decimal(23,10)")
  1266. .HasComment("工单所需工时");
  1267. b.Property<string>("morder_no")
  1268. .IsRequired()
  1269. .HasMaxLength(50)
  1270. .HasColumnType("nvarchar(50)")
  1271. .HasComment("生产工单编号");
  1272. b.Property<decimal?>("morder_production_number")
  1273. .HasPrecision(23, 10)
  1274. .HasColumnType("decimal(23,10)")
  1275. .HasComment("工单生产数量(计划数量)");
  1276. b.Property<string>("morder_progress")
  1277. .HasMaxLength(1000)
  1278. .HasColumnType("nvarchar(1000)")
  1279. .HasComment("工单进度");
  1280. b.Property<string>("morder_state")
  1281. .HasMaxLength(50)
  1282. .HasColumnType("nvarchar(50)")
  1283. .HasComment("生产工单状态(订单状态:初始,下达,暂停、完成)");
  1284. b.Property<string>("morder_type")
  1285. .HasMaxLength(50)
  1286. .HasColumnType("nvarchar(50)")
  1287. .HasComment("生产工单类型(类型:计划工单、销售工单、委外工单、预测工单)");
  1288. b.Property<decimal?>("need_number")
  1289. .HasPrecision(23, 10)
  1290. .HasColumnType("decimal(23,10)")
  1291. .HasComment("需求数量");
  1292. b.Property<decimal?>("notice_qty")
  1293. .HasPrecision(23, 10)
  1294. .HasColumnType("decimal(23,10)")
  1295. .HasComment("已开入库通知单数量");
  1296. b.Property<long?>("org_id")
  1297. .HasColumnType("bigint")
  1298. .HasComment("组织ID");
  1299. b.Property<string>("overdue_Remark")
  1300. .HasMaxLength(255)
  1301. .HasColumnType("nvarchar(255)")
  1302. .HasComment("逾期原因备注");
  1303. b.Property<long?>("parent_id")
  1304. .HasColumnType("bigint")
  1305. .HasComment("上级工单id");
  1306. b.Property<DateTime?>("pause_time")
  1307. .HasColumnType("datetime2")
  1308. .HasComment("最近暂停时间");
  1309. b.Property<decimal?>("picking_qty")
  1310. .HasPrecision(23, 10)
  1311. .HasColumnType("decimal(23,10)")
  1312. .HasComment("已领料数量");
  1313. b.Property<DateTime?>("planner_end_date")
  1314. .HasColumnType("datetime2")
  1315. .HasComment("计划员设定结束时间");
  1316. b.Property<string>("planner_name")
  1317. .HasMaxLength(80)
  1318. .HasColumnType("nvarchar(80)")
  1319. .HasComment("计划员名称");
  1320. b.Property<string>("planner_num")
  1321. .HasMaxLength(80)
  1322. .HasColumnType("nvarchar(80)")
  1323. .HasComment("计划员工号");
  1324. b.Property<DateTime?>("planner_start_date")
  1325. .HasColumnType("datetime2")
  1326. .HasComment("计划员设定开始时间");
  1327. b.Property<string>("product_code")
  1328. .HasMaxLength(80)
  1329. .HasColumnType("nvarchar(80)")
  1330. .HasComment("产品代码");
  1331. b.Property<string>("product_name")
  1332. .HasMaxLength(500)
  1333. .HasColumnType("nvarchar(500)")
  1334. .HasComment("产品名称");
  1335. b.Property<string>("project_name")
  1336. .HasMaxLength(255)
  1337. .HasColumnType("nvarchar(255)")
  1338. .HasComment("项目名称");
  1339. b.Property<decimal?>("qualified_number")
  1340. .HasPrecision(23, 10)
  1341. .HasColumnType("decimal(23,10)")
  1342. .HasComment("合格数量");
  1343. b.Property<DateTime?>("reality_end_time")
  1344. .HasColumnType("datetime2")
  1345. .HasComment("实际结束时间");
  1346. b.Property<DateTime?>("reality_start_time")
  1347. .HasColumnType("datetime2")
  1348. .HasComment("实际开始时间");
  1349. b.Property<long?>("relation_moid")
  1350. .HasColumnType("bigint")
  1351. .HasComment("关联工单id");
  1352. b.Property<string>("relation_mono")
  1353. .HasMaxLength(50)
  1354. .HasColumnType("nvarchar(50)")
  1355. .HasComment("关联编号");
  1356. b.Property<decimal?>("remaining_number")
  1357. .HasPrecision(23, 10)
  1358. .HasColumnType("decimal(23,10)")
  1359. .HasComment("剩余可用数量");
  1360. b.Property<DateTime?>("restart_time")
  1361. .HasColumnType("datetime2")
  1362. .HasComment("最近重启时间");
  1363. b.Property<DateTime?>("start_time")
  1364. .HasColumnType("datetime2")
  1365. .HasComment("开始时间");
  1366. b.Property<long>("tenant_id")
  1367. .HasColumnType("bigint")
  1368. .HasComment("企业ID");
  1369. b.Property<string>("unit")
  1370. .HasMaxLength(80)
  1371. .HasColumnType("nvarchar(80)")
  1372. .HasComment("单位");
  1373. b.Property<long?>("update_by")
  1374. .HasColumnType("bigint")
  1375. .HasComment("修改人");
  1376. b.Property<string>("update_by_name")
  1377. .HasMaxLength(50)
  1378. .HasColumnType("nvarchar(50)")
  1379. .HasComment("修改人名称");
  1380. b.Property<DateTime?>("update_time")
  1381. .HasColumnType("datetime2")
  1382. .HasComment("修改时间");
  1383. b.Property<int>("urgent")
  1384. .HasColumnType("int")
  1385. .HasComment("加急级别");
  1386. b.Property<decimal?>("work_number")
  1387. .HasPrecision(23, 10)
  1388. .HasColumnType("decimal(23,10)")
  1389. .HasComment("报工数量");
  1390. b.Property<string>("work_order_type")
  1391. .HasMaxLength(255)
  1392. .HasColumnType("nvarchar(255)")
  1393. .HasComment("工单类型(类型:发货工单、试产工单、备库工单、常规工单、返工工单)");
  1394. b.HasKey("Id");
  1395. b.HasIndex("morder_no", "tenant_id", "factory_id");
  1396. b.ToTable("mes_morder", (string)null);
  1397. b.HasComment("工单主表");
  1398. });
  1399. modelBuilder.Entity("Business.Model.Production.mes_oorder", b =>
  1400. {
  1401. b.Property<long>("Id")
  1402. .HasColumnType("bigint");
  1403. b.Property<bool>("IsDeleted")
  1404. .ValueGeneratedOnAdd()
  1405. .HasColumnType("bit")
  1406. .HasDefaultValue(false)
  1407. .HasColumnName("IsDeleted")
  1408. .HasComment("删除标识");
  1409. b.Property<string>("bom_number")
  1410. .HasMaxLength(80)
  1411. .HasColumnType("nvarchar(80)")
  1412. .HasComment("bom编码");
  1413. b.Property<long?>("create_by")
  1414. .HasColumnType("bigint")
  1415. .HasComment("创建人id");
  1416. b.Property<string>("create_by_name")
  1417. .HasMaxLength(50)
  1418. .HasColumnType("nvarchar(50)")
  1419. .HasComment("创建人名称");
  1420. b.Property<DateTime?>("create_time")
  1421. .HasColumnType("datetime2")
  1422. .HasComment("创建时间");
  1423. b.Property<long?>("factory_id")
  1424. .HasColumnType("bigint")
  1425. .HasComment("工厂ID");
  1426. b.Property<string>("ffms_number")
  1427. .HasMaxLength(80)
  1428. .HasColumnType("nvarchar(80)")
  1429. .HasComment("fms旧料号");
  1430. b.Property<decimal?>("inspection_number")
  1431. .HasPrecision(23, 10)
  1432. .HasColumnType("decimal(23,10)")
  1433. .HasComment("报检数量");
  1434. b.Property<decimal?>("inventory_number")
  1435. .HasPrecision(23, 10)
  1436. .HasColumnType("decimal(23,10)")
  1437. .HasComment("入库数量");
  1438. b.Property<int?>("moentry_on")
  1439. .HasColumnType("int")
  1440. .HasComment("启动状态");
  1441. b.Property<decimal?>("morder_production_number")
  1442. .HasPrecision(20, 10)
  1443. .HasColumnType("decimal(20,10)")
  1444. .HasComment("工单生产数量(计划数量)");
  1445. b.Property<string>("morder_progress")
  1446. .HasMaxLength(500)
  1447. .HasColumnType("nvarchar(500)")
  1448. .HasComment("工单进度");
  1449. b.Property<int?>("need_icitem_status")
  1450. .HasColumnType("int")
  1451. .HasComment("所需物料是否充足 1-充足 0-缺料");
  1452. b.Property<decimal?>("need_number")
  1453. .HasPrecision(20, 10)
  1454. .HasColumnType("decimal(20,10)")
  1455. .HasComment("需求数量");
  1456. b.Property<decimal?>("notice_qty")
  1457. .HasPrecision(23, 10)
  1458. .HasColumnType("decimal(23,10)")
  1459. .HasComment("已开通知单数量");
  1460. b.Property<DateTime?>("ooentry_etime")
  1461. .HasColumnType("datetime2")
  1462. .HasComment("计划完工日期");
  1463. b.Property<long?>("ooentry_prd")
  1464. .HasColumnType("bigint")
  1465. .HasComment("生产组织");
  1466. b.Property<string>("ooentry_prdname")
  1467. .HasMaxLength(50)
  1468. .HasColumnType("nvarchar(50)")
  1469. .HasComment("生产组织名称");
  1470. b.Property<DateTime?>("ooentry_stime")
  1471. .HasColumnType("datetime2")
  1472. .HasComment("计划开工日期");
  1473. b.Property<long?>("ooentry_wrkc")
  1474. .HasColumnType("bigint")
  1475. .HasComment("工作中心id");
  1476. b.Property<string>("ooentry_wrkcname")
  1477. .HasMaxLength(50)
  1478. .HasColumnType("nvarchar(50)")
  1479. .HasComment("工作中心名称");
  1480. b.Property<DateTime?>("oorder_date")
  1481. .HasColumnType("datetime2")
  1482. .HasComment("委外订单日期");
  1483. b.Property<string>("oorder_no")
  1484. .HasMaxLength(50)
  1485. .HasColumnType("nvarchar(50)")
  1486. .HasComment("生产工单编号");
  1487. b.Property<string>("oorder_state")
  1488. .HasMaxLength(50)
  1489. .HasColumnType("nvarchar(50)")
  1490. .HasComment("订单状态");
  1491. b.Property<string>("oorder_type")
  1492. .HasMaxLength(80)
  1493. .HasColumnType("nvarchar(80)")
  1494. .HasComment("生产工单类型");
  1495. b.Property<long?>("org_id")
  1496. .HasColumnType("bigint")
  1497. .HasComment("组织ID");
  1498. b.Property<DateTime?>("pause_time")
  1499. .HasColumnType("datetime2")
  1500. .HasComment("最近暂停时间");
  1501. b.Property<string>("planner_name")
  1502. .HasMaxLength(80)
  1503. .HasColumnType("nvarchar(80)")
  1504. .HasComment("计划员名称");
  1505. b.Property<string>("planner_num")
  1506. .HasMaxLength(80)
  1507. .HasColumnType("nvarchar(80)")
  1508. .HasComment("计划员工号");
  1509. b.Property<string>("product_code")
  1510. .HasMaxLength(80)
  1511. .HasColumnType("nvarchar(80)")
  1512. .HasComment("产品代码");
  1513. b.Property<string>("product_name")
  1514. .HasMaxLength(500)
  1515. .HasColumnType("nvarchar(500)")
  1516. .HasComment("产品名称");
  1517. b.Property<string>("production_unit")
  1518. .HasMaxLength(100)
  1519. .HasColumnType("nvarchar(100)")
  1520. .HasComment("加工单位");
  1521. b.Property<string>("production_unit_code")
  1522. .HasMaxLength(20)
  1523. .HasColumnType("nvarchar(20)")
  1524. .HasComment("加工单位编码");
  1525. b.Property<string>("project_name")
  1526. .HasMaxLength(255)
  1527. .HasColumnType("nvarchar(255)")
  1528. .HasComment("项目名称");
  1529. b.Property<decimal?>("qualified_number")
  1530. .HasPrecision(23, 10)
  1531. .HasColumnType("decimal(23,10)")
  1532. .HasComment("合格数量");
  1533. b.Property<decimal?>("remaining_number")
  1534. .HasPrecision(20, 10)
  1535. .HasColumnType("decimal(20,10)")
  1536. .HasComment("剩余可用数量");
  1537. b.Property<DateTime?>("restart_time")
  1538. .HasColumnType("datetime2")
  1539. .HasComment("最近重启时间");
  1540. b.Property<int?>("sent_status")
  1541. .HasColumnType("int")
  1542. .HasComment("发料状态 1-待发料 2-已发料");
  1543. b.Property<long?>("sentry_id")
  1544. .HasColumnType("bigint")
  1545. .HasComment("订单行id");
  1546. b.Property<string>("specification_model")
  1547. .HasMaxLength(500)
  1548. .HasColumnType("nvarchar(500)")
  1549. .HasComment("规格型号");
  1550. b.Property<DateTime?>("start_time")
  1551. .HasColumnType("datetime2")
  1552. .HasComment("开始时间");
  1553. b.Property<long>("tenant_id")
  1554. .HasColumnType("bigint")
  1555. .HasComment("企业ID");
  1556. b.Property<string>("unit")
  1557. .HasMaxLength(80)
  1558. .HasColumnType("nvarchar(80)")
  1559. .HasComment("单位");
  1560. b.Property<long?>("update_by")
  1561. .HasColumnType("bigint")
  1562. .HasComment("修改人");
  1563. b.Property<string>("update_by_name")
  1564. .HasMaxLength(50)
  1565. .HasColumnType("nvarchar(50)")
  1566. .HasComment("修改人名称");
  1567. b.Property<DateTime?>("update_time")
  1568. .HasColumnType("datetime2")
  1569. .HasComment("修改时间");
  1570. b.Property<decimal?>("work_number")
  1571. .HasPrecision(23, 10)
  1572. .HasColumnType("decimal(23,10)")
  1573. .HasComment("报工数量");
  1574. b.HasKey("Id");
  1575. b.ToTable("mes_oorder", (string)null);
  1576. b.HasComment("委外订单表");
  1577. });
  1578. modelBuilder.Entity("Business.Model.Production.mes_stockoccupy", b =>
  1579. {
  1580. b.Property<long>("Id")
  1581. .HasColumnType("bigint");
  1582. b.Property<bool>("IsDeleted")
  1583. .ValueGeneratedOnAdd()
  1584. .HasColumnType("bit")
  1585. .HasDefaultValue(false)
  1586. .HasColumnName("IsDeleted")
  1587. .HasComment("删除标识");
  1588. b.Property<long?>("create_by")
  1589. .HasColumnType("bigint")
  1590. .HasComment("创建人id");
  1591. b.Property<string>("create_by_name")
  1592. .HasMaxLength(50)
  1593. .HasColumnType("nvarchar(50)")
  1594. .HasComment("创建人名称");
  1595. b.Property<DateTime?>("create_time")
  1596. .HasColumnType("datetime2")
  1597. .HasComment("创建时间");
  1598. b.Property<long?>("factory_id")
  1599. .HasColumnType("bigint")
  1600. .HasComment("工厂ID");
  1601. b.Property<string>("fbill_no")
  1602. .HasMaxLength(50)
  1603. .HasColumnType("nvarchar(50)")
  1604. .HasComment("订单编号");
  1605. b.Property<long?>("fentry_id")
  1606. .HasColumnType("bigint")
  1607. .HasComment("订单行号");
  1608. b.Property<string>("fitem_name")
  1609. .HasMaxLength(200)
  1610. .HasColumnType("nvarchar(200)")
  1611. .HasComment("物料名称");
  1612. b.Property<string>("fitem_number")
  1613. .HasMaxLength(50)
  1614. .HasColumnType("nvarchar(50)")
  1615. .HasComment("物料编码");
  1616. b.Property<string>("fmodel")
  1617. .HasMaxLength(200)
  1618. .HasColumnType("nvarchar(200)")
  1619. .HasComment("规格型号");
  1620. b.Property<decimal?>("occupyqty")
  1621. .HasPrecision(20, 2)
  1622. .HasColumnType("decimal(20,2)")
  1623. .HasComment("占用量");
  1624. b.Property<long?>("org_id")
  1625. .HasColumnType("bigint")
  1626. .HasComment("组织ID");
  1627. b.Property<string>("soccupy_cby")
  1628. .HasMaxLength(50)
  1629. .HasColumnType("nvarchar(50)")
  1630. .HasComment("变更人");
  1631. b.Property<string>("soccupy_creason")
  1632. .HasMaxLength(255)
  1633. .HasColumnType("nvarchar(255)")
  1634. .HasComment("变更原因");
  1635. b.Property<DateTime?>("soccupy_ctime")
  1636. .HasColumnType("datetime2")
  1637. .HasComment("变更时间");
  1638. b.Property<DateTime?>("soccupy_etime")
  1639. .HasColumnType("datetime2")
  1640. .HasComment("结束时间");
  1641. b.Property<string>("soccupy_state")
  1642. .HasMaxLength(50)
  1643. .HasColumnType("nvarchar(50)")
  1644. .HasComment("占用状态");
  1645. b.Property<DateTime?>("soccupy_stime")
  1646. .HasColumnType("datetime2")
  1647. .HasComment("开始时间");
  1648. b.Property<string>("soccupy_type")
  1649. .IsRequired()
  1650. .HasMaxLength(50)
  1651. .HasColumnType("nvarchar(50)")
  1652. .HasComment("类型");
  1653. b.Property<long?>("soentry_id")
  1654. .HasColumnType("bigint")
  1655. .HasComment("订单行id");
  1656. b.Property<long>("tenant_id")
  1657. .HasColumnType("bigint")
  1658. .HasComment("企业ID");
  1659. b.Property<long?>("update_by")
  1660. .HasColumnType("bigint")
  1661. .HasComment("修改人");
  1662. b.Property<string>("update_by_name")
  1663. .HasMaxLength(50)
  1664. .HasColumnType("nvarchar(50)")
  1665. .HasComment("修改人名称");
  1666. b.Property<DateTime?>("update_time")
  1667. .HasColumnType("datetime2")
  1668. .HasComment("修改时间");
  1669. b.Property<long>("warehouse_id")
  1670. .HasColumnType("bigint")
  1671. .HasComment("仓库id");
  1672. b.Property<string>("warehouse_name")
  1673. .HasMaxLength(80)
  1674. .HasColumnType("nvarchar(80)")
  1675. .HasComment("仓库名称");
  1676. b.Property<string>("warehouse_type")
  1677. .HasMaxLength(50)
  1678. .HasColumnType("nvarchar(50)")
  1679. .HasComment("仓库类型");
  1680. b.HasKey("Id");
  1681. b.HasIndex("fbill_no", "fitem_number", "tenant_id", "factory_id");
  1682. b.ToTable("mes_stockoccupy", (string)null);
  1683. b.HasComment("成品库存占用表");
  1684. });
  1685. modelBuilder.Entity("Business.Model.Sale.crm_customer", b =>
  1686. {
  1687. b.Property<long>("Id")
  1688. .HasColumnType("bigint");
  1689. b.Property<bool>("IsDeleted")
  1690. .ValueGeneratedOnAdd()
  1691. .HasColumnType("bit")
  1692. .HasDefaultValue(false)
  1693. .HasColumnName("IsDeleted")
  1694. .HasComment("删除标识");
  1695. b.Property<string>("address")
  1696. .HasMaxLength(255)
  1697. .HasColumnType("nvarchar(255)")
  1698. .HasComment("地址");
  1699. b.Property<int?>("carrying_aos")
  1700. .IsRequired()
  1701. .HasColumnType("int")
  1702. .HasComment("默认运输提前期_天");
  1703. b.Property<string>("city")
  1704. .HasMaxLength(255)
  1705. .HasColumnType("nvarchar(255)")
  1706. .HasComment("城市");
  1707. b.Property<string>("contact")
  1708. .HasMaxLength(80)
  1709. .HasColumnType("nvarchar(80)")
  1710. .HasComment("联系人");
  1711. b.Property<string>("corperate")
  1712. .HasMaxLength(255)
  1713. .HasColumnType("nvarchar(255)")
  1714. .HasComment("法人代表");
  1715. b.Property<string>("country")
  1716. .HasMaxLength(255)
  1717. .HasColumnType("nvarchar(255)")
  1718. .HasComment("国别地区");
  1719. b.Property<long?>("create_by")
  1720. .HasColumnType("bigint")
  1721. .HasComment("创建人id");
  1722. b.Property<string>("create_by_name")
  1723. .HasMaxLength(50)
  1724. .HasColumnType("nvarchar(50)")
  1725. .HasComment("创建人名称");
  1726. b.Property<DateTime?>("create_time")
  1727. .HasColumnType("datetime2")
  1728. .HasComment("创建时间");
  1729. b.Property<string>("currency")
  1730. .HasMaxLength(80)
  1731. .HasColumnType("nvarchar(80)")
  1732. .HasComment("结算币种");
  1733. b.Property<string>("cust_group_name")
  1734. .HasMaxLength(255)
  1735. .HasColumnType("nvarchar(255)")
  1736. .HasComment("客户分组名称");
  1737. b.Property<string>("cust_group_number")
  1738. .HasMaxLength(255)
  1739. .HasColumnType("nvarchar(255)")
  1740. .HasComment("客户分组编号");
  1741. b.Property<string>("cust_type")
  1742. .HasMaxLength(255)
  1743. .HasColumnType("nvarchar(255)")
  1744. .HasComment("客户类别");
  1745. b.Property<string>("cust_type_number")
  1746. .HasMaxLength(255)
  1747. .HasColumnType("nvarchar(255)")
  1748. .HasComment("客户类别编码");
  1749. b.Property<int?>("customer_level")
  1750. .HasMaxLength(255)
  1751. .HasColumnType("int")
  1752. .HasComment("客户级别");
  1753. b.Property<string>("customer_name")
  1754. .HasMaxLength(255)
  1755. .HasColumnType("nvarchar(255)")
  1756. .HasComment("客户名称");
  1757. b.Property<string>("customer_no")
  1758. .HasMaxLength(80)
  1759. .HasColumnType("nvarchar(80)")
  1760. .HasComment("客户编号");
  1761. b.Property<string>("email")
  1762. .HasMaxLength(80)
  1763. .HasColumnType("nvarchar(80)")
  1764. .HasComment("邮件地址");
  1765. b.Property<string>("employee_name")
  1766. .HasMaxLength(80)
  1767. .HasColumnType("nvarchar(80)")
  1768. .HasComment("专营业务员");
  1769. b.Property<string>("employee_no")
  1770. .HasMaxLength(80)
  1771. .HasColumnType("nvarchar(80)")
  1772. .HasComment("专营业务员_工号");
  1773. b.Property<long?>("factory_id")
  1774. .HasColumnType("bigint")
  1775. .HasComment("工厂ID");
  1776. b.Property<string>("mobile")
  1777. .HasMaxLength(80)
  1778. .HasColumnType("nvarchar(80)")
  1779. .HasComment("手机号码");
  1780. b.Property<DateTime?>("op_time")
  1781. .HasColumnType("datetime2")
  1782. .HasComment("操作时间");
  1783. b.Property<long?>("org_id")
  1784. .HasColumnType("bigint")
  1785. .HasComment("组织ID");
  1786. b.Property<string>("post_code")
  1787. .HasMaxLength(80)
  1788. .HasColumnType("nvarchar(80)")
  1789. .HasComment("邮政编码");
  1790. b.Property<string>("province")
  1791. .HasMaxLength(255)
  1792. .HasColumnType("nvarchar(255)")
  1793. .HasComment("省份");
  1794. b.Property<string>("region")
  1795. .HasMaxLength(255)
  1796. .HasColumnType("nvarchar(255)")
  1797. .HasComment("区");
  1798. b.Property<string>("sale_mode")
  1799. .HasMaxLength(255)
  1800. .HasColumnType("nvarchar(255)")
  1801. .HasComment("销售模式");
  1802. b.Property<string>("short_name")
  1803. .HasMaxLength(255)
  1804. .HasColumnType("nvarchar(255)")
  1805. .HasComment("客户简称");
  1806. b.Property<string>("short_number")
  1807. .HasMaxLength(255)
  1808. .HasColumnType("nvarchar(255)")
  1809. .HasComment("客户简码");
  1810. b.Property<string>("state")
  1811. .HasMaxLength(80)
  1812. .HasColumnType("nvarchar(80)")
  1813. .HasComment("状态");
  1814. b.Property<string>("telephone")
  1815. .HasMaxLength(80)
  1816. .HasColumnType("nvarchar(80)")
  1817. .HasComment("电话号码");
  1818. b.Property<long>("tenant_id")
  1819. .HasColumnType("bigint")
  1820. .HasComment("企业ID");
  1821. b.Property<long?>("update_by")
  1822. .HasColumnType("bigint")
  1823. .HasComment("修改人");
  1824. b.Property<string>("update_by_name")
  1825. .HasMaxLength(50)
  1826. .HasColumnType("nvarchar(50)")
  1827. .HasComment("修改人名称");
  1828. b.Property<DateTime?>("update_time")
  1829. .HasColumnType("datetime2")
  1830. .HasComment("修改时间");
  1831. b.Property<decimal?>("value_add_rate")
  1832. .HasPrecision(18, 10)
  1833. .HasColumnType("decimal(18,10)")
  1834. .HasComment("增值税率");
  1835. b.HasKey("Id");
  1836. b.HasIndex("customer_no", "tenant_id", "factory_id")
  1837. .IsUnique()
  1838. .HasFilter("[customer_no] IS NOT NULL AND [factory_id] IS NOT NULL");
  1839. b.ToTable("crm_customer", (string)null);
  1840. b.HasComment("客户");
  1841. });
  1842. modelBuilder.Entity("Business.Model.Sale.crm_seorder", b =>
  1843. {
  1844. b.Property<long>("Id")
  1845. .HasColumnType("bigint");
  1846. b.Property<bool>("IsDeleted")
  1847. .ValueGeneratedOnAdd()
  1848. .HasColumnType("bit")
  1849. .HasDefaultValue(false)
  1850. .HasColumnName("IsDeleted")
  1851. .HasComment("删除标识");
  1852. b.Property<DateTime?>("audit_date")
  1853. .HasColumnType("datetime2")
  1854. .HasComment("审核日期");
  1855. b.Property<string>("auditor")
  1856. .HasMaxLength(50)
  1857. .HasColumnType("nvarchar(50)")
  1858. .HasComment("审核人");
  1859. b.Property<string>("bill_from")
  1860. .HasMaxLength(255)
  1861. .HasColumnType("nvarchar(255)")
  1862. .HasComment("订单来源");
  1863. b.Property<string>("bill_no")
  1864. .HasMaxLength(50)
  1865. .HasColumnType("nvarchar(50)")
  1866. .HasComment("订单编号");
  1867. b.Property<string>("biller")
  1868. .HasMaxLength(50)
  1869. .HasColumnType("nvarchar(50)")
  1870. .HasComment("制单人");
  1871. b.Property<bool>("closed")
  1872. .HasColumnType("bit")
  1873. .HasComment("是否关闭1关闭0未关闭");
  1874. b.Property<long?>("create_by")
  1875. .HasColumnType("bigint")
  1876. .HasComment("创建人id");
  1877. b.Property<string>("create_by_name")
  1878. .HasMaxLength(50)
  1879. .HasColumnType("nvarchar(50)")
  1880. .HasComment("创建人名称");
  1881. b.Property<long?>("create_dept")
  1882. .HasColumnType("bigint")
  1883. .HasComment("创建部门id");
  1884. b.Property<DateTime?>("create_time")
  1885. .HasColumnType("datetime2")
  1886. .HasComment("创建时间");
  1887. b.Property<int?>("currency")
  1888. .HasMaxLength(50)
  1889. .HasColumnType("int")
  1890. .HasComment("币种");
  1891. b.Property<int?>("custom_id")
  1892. .HasColumnType("int")
  1893. .HasComment("客户id");
  1894. b.Property<int?>("custom_level")
  1895. .HasMaxLength(80)
  1896. .HasColumnType("int")
  1897. .HasComment("客户级别");
  1898. b.Property<string>("custom_name")
  1899. .HasMaxLength(80)
  1900. .HasColumnType("nvarchar(80)")
  1901. .HasComment("客户名称");
  1902. b.Property<string>("custom_no")
  1903. .HasMaxLength(80)
  1904. .HasColumnType("nvarchar(80)")
  1905. .HasComment("客户编码");
  1906. b.Property<DateTime?>("date")
  1907. .HasColumnType("datetime2")
  1908. .HasComment("签订日期");
  1909. b.Property<string>("emp_name")
  1910. .HasMaxLength(50)
  1911. .HasColumnType("nvarchar(50)")
  1912. .HasComment("业务员名称");
  1913. b.Property<string>("emp_no")
  1914. .HasMaxLength(50)
  1915. .HasColumnType("nvarchar(50)")
  1916. .HasComment("业务员工号");
  1917. b.Property<decimal?>("exchange_rate")
  1918. .HasPrecision(20, 8)
  1919. .HasColumnType("decimal(20,8)")
  1920. .HasComment("汇率");
  1921. b.Property<long?>("factory_id")
  1922. .HasColumnType("bigint")
  1923. .HasComment("工厂ID");
  1924. b.Property<DateTime?>("op_time")
  1925. .HasColumnType("datetime2")
  1926. .HasComment("操作时间");
  1927. b.Property<int?>("order_type")
  1928. .HasColumnType("int")
  1929. .HasComment("订单类别(销售、计划)");
  1930. b.Property<long?>("org_id")
  1931. .HasColumnType("bigint")
  1932. .HasComment("组织ID");
  1933. b.Property<int?>("out_stock_type")
  1934. .HasColumnType("int")
  1935. .HasComment("销售出库类型");
  1936. b.Property<string>("project_code")
  1937. .HasMaxLength(255)
  1938. .HasColumnType("nvarchar(255)")
  1939. .HasComment("项目编号");
  1940. b.Property<string>("project_name")
  1941. .HasMaxLength(255)
  1942. .HasColumnType("nvarchar(255)")
  1943. .HasComment("项目名称");
  1944. b.Property<DateTime?>("rdate")
  1945. .HasColumnType("datetime2")
  1946. .HasComment("采购下单日期");
  1947. b.Property<string>("sale_dept_code")
  1948. .HasMaxLength(80)
  1949. .HasColumnType("nvarchar(80)")
  1950. .HasComment("销售部门编号");
  1951. b.Property<long?>("sale_dept_id")
  1952. .HasColumnType("bigint")
  1953. .HasComment("销售部门id");
  1954. b.Property<string>("sale_dept_name")
  1955. .HasMaxLength(80)
  1956. .HasColumnType("nvarchar(80)")
  1957. .HasComment("销售部门名称");
  1958. b.Property<int?>("sale_style")
  1959. .HasColumnType("int")
  1960. .HasComment("销售订单类型");
  1961. b.Property<string>("sale_style_no")
  1962. .HasMaxLength(80)
  1963. .HasColumnType("nvarchar(80)")
  1964. .HasComment("销售订单类型编码");
  1965. b.Property<int?>("status")
  1966. .HasColumnType("int")
  1967. .HasComment("订单状态");
  1968. b.Property<long>("tenant_id")
  1969. .HasColumnType("bigint")
  1970. .HasComment("企业ID");
  1971. b.Property<int?>("trade_type")
  1972. .HasColumnType("int")
  1973. .HasComment("贸易类型");
  1974. b.Property<long?>("update_by")
  1975. .HasColumnType("bigint")
  1976. .HasComment("修改人");
  1977. b.Property<string>("update_by_name")
  1978. .HasMaxLength(50)
  1979. .HasColumnType("nvarchar(50)")
  1980. .HasComment("修改人名称");
  1981. b.Property<DateTime?>("update_time")
  1982. .HasColumnType("datetime2")
  1983. .HasComment("修改时间");
  1984. b.Property<int>("urgent")
  1985. .HasColumnType("int")
  1986. .HasComment("加急级别");
  1987. b.HasKey("Id");
  1988. b.HasIndex("bill_no", "tenant_id", "factory_id")
  1989. .IsUnique()
  1990. .HasFilter("[bill_no] IS NOT NULL AND [factory_id] IS NOT NULL");
  1991. b.ToTable("crm_seorder", (string)null);
  1992. b.HasComment("销售订单表");
  1993. });
  1994. modelBuilder.Entity("Business.Model.Sale.crm_seorderentry", b =>
  1995. {
  1996. b.Property<long>("Id")
  1997. .HasColumnType("bigint");
  1998. b.Property<bool>("IsDeleted")
  1999. .ValueGeneratedOnAdd()
  2000. .HasColumnType("bit")
  2001. .HasDefaultValue(false)
  2002. .HasColumnName("IsDeleted")
  2003. .HasComment("删除标识");
  2004. b.Property<DateTime?>("adjust_date")
  2005. .HasColumnType("datetime2")
  2006. .HasComment("调整建议交期");
  2007. b.Property<decimal?>("amount")
  2008. .HasPrecision(23, 10)
  2009. .HasColumnType("decimal(23,10)")
  2010. .HasComment("金额");
  2011. b.Property<decimal?>("aux_price_discount")
  2012. .HasPrecision(23, 10)
  2013. .HasColumnType("decimal(23,10)")
  2014. .HasComment("实际含税单价");
  2015. b.Property<string>("bill_no")
  2016. .HasMaxLength(50)
  2017. .HasColumnType("nvarchar(50)")
  2018. .HasComment("销售订单编号");
  2019. b.Property<string>("bom_number")
  2020. .HasMaxLength(255)
  2021. .HasColumnType("nvarchar(255)")
  2022. .HasComment("BOM编号");
  2023. b.Property<string>("contract_no")
  2024. .HasMaxLength(50)
  2025. .HasColumnType("nvarchar(50)")
  2026. .HasComment("合同编号");
  2027. b.Property<long?>("create_by")
  2028. .HasColumnType("bigint")
  2029. .HasComment("创建人id");
  2030. b.Property<string>("create_by_name")
  2031. .HasMaxLength(50)
  2032. .HasColumnType("nvarchar(50)")
  2033. .HasComment("创建人名称");
  2034. b.Property<long?>("create_dept")
  2035. .HasColumnType("bigint")
  2036. .HasComment("创建部门id");
  2037. b.Property<DateTime?>("create_time")
  2038. .HasColumnType("datetime2")
  2039. .HasComment("创建时间");
  2040. b.Property<string>("custom_order_bill_no")
  2041. .HasMaxLength(50)
  2042. .HasColumnType("nvarchar(50)")
  2043. .HasComment("客户订单号");
  2044. b.Property<int?>("custom_order_entryid")
  2045. .HasColumnType("int")
  2046. .HasComment("客户订单行号");
  2047. b.Property<string>("custom_order_itemno")
  2048. .HasMaxLength(80)
  2049. .HasColumnType("nvarchar(80)")
  2050. .HasComment("客户料号");
  2051. b.Property<DateTime?>("date")
  2052. .HasColumnType("datetime2")
  2053. .HasComment("最终交货日期");
  2054. b.Property<decimal?>("deliver_count")
  2055. .HasPrecision(23, 10)
  2056. .HasColumnType("decimal(23,10)")
  2057. .HasComment("发货数量(已出库数量)");
  2058. b.Property<decimal?>("deliver_notice_count")
  2059. .HasPrecision(23, 10)
  2060. .HasColumnType("decimal(23,10)")
  2061. .HasComment("发货通知单数量");
  2062. b.Property<decimal?>("discount_amount")
  2063. .HasPrecision(23, 10)
  2064. .HasColumnType("decimal(23,10)")
  2065. .HasComment("折扣额");
  2066. b.Property<decimal?>("discount_rate")
  2067. .HasPrecision(23, 10)
  2068. .HasColumnType("decimal(23,10)")
  2069. .HasComment("折扣率");
  2070. b.Property<int?>("entry_seq")
  2071. .HasColumnType("int")
  2072. .HasComment("行号");
  2073. b.Property<long?>("factory_id")
  2074. .HasColumnType("bigint")
  2075. .HasComment("工厂ID");
  2076. b.Property<string>("fms_number")
  2077. .HasMaxLength(255)
  2078. .HasColumnType("nvarchar(255)")
  2079. .HasComment("FMS旧料号");
  2080. b.Property<bool?>("is_checked")
  2081. .HasColumnType("bit")
  2082. .HasComment("是否完成检测,0未完成,1完成");
  2083. b.Property<string>("item_name")
  2084. .HasMaxLength(255)
  2085. .HasColumnType("nvarchar(255)")
  2086. .HasComment("产品名称");
  2087. b.Property<string>("item_number")
  2088. .HasMaxLength(255)
  2089. .HasColumnType("nvarchar(255)")
  2090. .HasComment("产品代码");
  2091. b.Property<string>("map_name")
  2092. .HasMaxLength(255)
  2093. .HasColumnType("nvarchar(255)")
  2094. .HasComment("代码名称");
  2095. b.Property<string>("map_number")
  2096. .HasMaxLength(255)
  2097. .HasColumnType("nvarchar(255)")
  2098. .HasComment("对应代码");
  2099. b.Property<bool?>("mrp_closed")
  2100. .HasColumnType("bit")
  2101. .HasComment("mrp关闭");
  2102. b.Property<DateTime?>("op_time")
  2103. .HasColumnType("datetime2")
  2104. .HasComment("操作时间");
  2105. b.Property<long?>("org_id")
  2106. .HasColumnType("bigint")
  2107. .HasComment("组织ID");
  2108. b.Property<string>("out_stock_type")
  2109. .HasMaxLength(50)
  2110. .HasColumnType("nvarchar(50)")
  2111. .HasComment("出库类型");
  2112. b.Property<DateTime?>("plan_date")
  2113. .HasColumnType("datetime2")
  2114. .HasComment("客户要求交期");
  2115. b.Property<string>("planner_name")
  2116. .HasMaxLength(50)
  2117. .HasColumnType("nvarchar(50)")
  2118. .HasComment("计划员");
  2119. b.Property<string>("planner_no")
  2120. .HasMaxLength(50)
  2121. .HasColumnType("nvarchar(50)")
  2122. .HasComment("计划员_工号");
  2123. b.Property<decimal?>("price")
  2124. .HasPrecision(23, 10)
  2125. .HasColumnType("decimal(23,10)")
  2126. .HasComment("单价");
  2127. b.Property<string>("progress")
  2128. .HasMaxLength(255)
  2129. .HasColumnType("nvarchar(255)")
  2130. .HasComment("订单进度");
  2131. b.Property<decimal?>("qty")
  2132. .HasPrecision(20, 8)
  2133. .HasColumnType("decimal(20,8)")
  2134. .HasComment("订单数量");
  2135. b.Property<string>("remark")
  2136. .HasMaxLength(255)
  2137. .HasColumnType("nvarchar(255)")
  2138. .HasComment("备注");
  2139. b.Property<int?>("rnumber")
  2140. .HasColumnType("int")
  2141. .HasComment("评审次数");
  2142. b.Property<int?>("rstate")
  2143. .HasColumnType("int")
  2144. .HasComment("评审状态");
  2145. b.Property<string>("se_reject_reason")
  2146. .HasMaxLength(80)
  2147. .HasColumnType("nvarchar(80)")
  2148. .HasComment("业务员工号");
  2149. b.Property<long?>("seorder_id")
  2150. .HasColumnType("bigint")
  2151. .HasComment("销售订单id");
  2152. b.Property<string>("soure_bill_no")
  2153. .HasMaxLength(50)
  2154. .HasColumnType("nvarchar(50)")
  2155. .HasComment("源单编号");
  2156. b.Property<string>("specification")
  2157. .HasMaxLength(255)
  2158. .HasColumnType("nvarchar(255)")
  2159. .HasComment("规格型号");
  2160. b.Property<bool?>("state")
  2161. .HasColumnType("bit")
  2162. .HasComment("数据状态标识 0停用 1启用");
  2163. b.Property<DateTime?>("sys_capacity_date")
  2164. .HasColumnType("datetime2")
  2165. .HasComment("系统建议交期(产能)");
  2166. b.Property<DateTime?>("sys_material_date")
  2167. .HasColumnType("datetime2")
  2168. .HasComment("系统建议交期(物料)");
  2169. b.Property<decimal?>("tax_amtount")
  2170. .HasPrecision(23, 10)
  2171. .HasColumnType("decimal(23,10)")
  2172. .HasComment("销项税额");
  2173. b.Property<decimal?>("tax_price")
  2174. .HasPrecision(23, 10)
  2175. .HasColumnType("decimal(23,10)")
  2176. .HasComment("含税单价");
  2177. b.Property<decimal?>("tax_rate")
  2178. .HasPrecision(23, 10)
  2179. .HasColumnType("decimal(23,10)")
  2180. .HasComment("税率");
  2181. b.Property<long>("tenant_id")
  2182. .HasColumnType("bigint")
  2183. .HasComment("企业ID");
  2184. b.Property<decimal?>("total_amount")
  2185. .HasPrecision(23, 10)
  2186. .HasColumnType("decimal(23,10)")
  2187. .HasComment("价税合计");
  2188. b.Property<string>("unit")
  2189. .HasMaxLength(50)
  2190. .HasColumnType("nvarchar(50)")
  2191. .HasComment("单位");
  2192. b.Property<long?>("update_by")
  2193. .HasColumnType("bigint")
  2194. .HasComment("修改人");
  2195. b.Property<string>("update_by_name")
  2196. .HasMaxLength(50)
  2197. .HasColumnType("nvarchar(50)")
  2198. .HasComment("修改人名称");
  2199. b.Property<DateTime?>("update_time")
  2200. .HasColumnType("datetime2")
  2201. .HasComment("修改时间");
  2202. b.Property<int?>("urgent")
  2203. .HasColumnType("int")
  2204. .HasComment("加急级别");
  2205. b.HasKey("Id");
  2206. b.HasIndex("bill_no", "entry_seq", "tenant_id", "factory_id")
  2207. .IsUnique()
  2208. .HasFilter("[bill_no] IS NOT NULL AND [entry_seq] IS NOT NULL AND [factory_id] IS NOT NULL");
  2209. b.HasIndex("seorder_id", "bill_no", "item_number", "tenant_id", "factory_id");
  2210. b.ToTable("crm_seorderentry", (string)null);
  2211. b.HasComment("销售订单明细表");
  2212. });
  2213. modelBuilder.Entity("Business.Model.SRM.srm_po_list", b =>
  2214. {
  2215. b.Property<long>("Id")
  2216. .HasColumnType("bigint");
  2217. b.Property<bool>("IsDeleted")
  2218. .ValueGeneratedOnAdd()
  2219. .HasColumnType("bit")
  2220. .HasDefaultValue(false)
  2221. .HasColumnName("IsDeleted")
  2222. .HasComment("删除标识");
  2223. b.Property<string>("ItemNum")
  2224. .HasMaxLength(100)
  2225. .HasColumnType("nvarchar(100)")
  2226. .HasComment("物料编码");
  2227. b.Property<long?>("create_by")
  2228. .HasColumnType("bigint")
  2229. .HasComment("创建人id");
  2230. b.Property<string>("create_by_name")
  2231. .HasMaxLength(50)
  2232. .HasColumnType("nvarchar(50)")
  2233. .HasComment("创建人名称");
  2234. b.Property<DateTime?>("create_time")
  2235. .HasColumnType("datetime2")
  2236. .HasComment("创建时间");
  2237. b.Property<long?>("currencytype")
  2238. .IsRequired()
  2239. .HasColumnType("bigint")
  2240. .HasComment("币别");
  2241. b.Property<int?>("deliveryconfirmstate")
  2242. .HasColumnType("int")
  2243. .HasComment("交期确认状态");
  2244. b.Property<decimal?>("esqty")
  2245. .HasPrecision(23, 10)
  2246. .HasColumnType("decimal(23,10)")
  2247. .HasComment("已入库数量");
  2248. b.Property<long?>("factory_id")
  2249. .HasColumnType("bigint")
  2250. .HasComment("工厂ID");
  2251. b.Property<long?>("icitem_id")
  2252. .IsRequired()
  2253. .HasColumnType("bigint")
  2254. .HasComment("物料id");
  2255. b.Property<string>("icitem_name")
  2256. .HasMaxLength(100)
  2257. .HasColumnType("nvarchar(100)")
  2258. .HasComment("物料名称");
  2259. b.Property<int?>("logisticsstate")
  2260. .HasColumnType("int")
  2261. .HasComment("物流状态");
  2262. b.Property<string>("model")
  2263. .HasMaxLength(200)
  2264. .HasColumnType("nvarchar(200)")
  2265. .HasComment("规格型号");
  2266. b.Property<decimal?>("netprice")
  2267. .HasPrecision(23, 10)
  2268. .HasColumnType("decimal(23,10)")
  2269. .HasComment("净价");
  2270. b.Property<string>("number")
  2271. .HasMaxLength(80)
  2272. .HasColumnType("nvarchar(80)")
  2273. .HasComment("物料编码");
  2274. b.Property<long?>("org_id")
  2275. .HasColumnType("bigint")
  2276. .HasComment("组织ID");
  2277. b.Property<decimal?>("plan_qty")
  2278. .HasPrecision(23, 10)
  2279. .HasColumnType("decimal(23,10)")
  2280. .HasComment("计划数量");
  2281. b.Property<string>("po_billno")
  2282. .HasMaxLength(80)
  2283. .HasColumnType("nvarchar(80)")
  2284. .HasComment("po单号");
  2285. b.Property<long?>("po_id")
  2286. .IsRequired()
  2287. .HasColumnType("bigint")
  2288. .HasComment("po单id");
  2289. b.Property<string>("po_mono")
  2290. .HasMaxLength(80)
  2291. .HasColumnType("nvarchar(80)")
  2292. .HasComment("关联工单号");
  2293. b.Property<int?>("polist_row")
  2294. .HasColumnType("int")
  2295. .HasComment("行号");
  2296. b.Property<string>("pr_billno")
  2297. .HasMaxLength(80)
  2298. .HasColumnType("nvarchar(80)")
  2299. .HasComment("pr申请单号");
  2300. b.Property<long?>("pr_id")
  2301. .IsRequired()
  2302. .HasColumnType("bigint")
  2303. .HasComment("pr申请单id");
  2304. b.Property<long?>("pr_purchase_id")
  2305. .IsRequired()
  2306. .HasColumnType("bigint")
  2307. .HasComment("供应商id");
  2308. b.Property<string>("pr_purchase_name")
  2309. .HasMaxLength(80)
  2310. .HasColumnType("nvarchar(80)")
  2311. .HasComment("供应商名称");
  2312. b.Property<decimal?>("price")
  2313. .HasPrecision(23, 10)
  2314. .HasColumnType("decimal(23,10)")
  2315. .HasComment("含税单价");
  2316. b.Property<DateTime?>("procurement_rarr_date")
  2317. .HasColumnType("datetime2")
  2318. .HasComment("采购到货日期");
  2319. b.Property<DateTime?>("pur_affirmdate")
  2320. .HasColumnType("datetime2")
  2321. .HasComment("采购确认到货日期");
  2322. b.Property<DateTime?>("purchase_date")
  2323. .HasColumnType("datetime2")
  2324. .HasComment("供应商交期");
  2325. b.Property<decimal?>("qty")
  2326. .HasPrecision(23, 10)
  2327. .HasColumnType("decimal(23,10)")
  2328. .HasComment("订单数量");
  2329. b.Property<DateTime?>("rarrdate")
  2330. .HasColumnType("datetime2")
  2331. .HasComment("需求到货日期");
  2332. b.Property<decimal?>("rate")
  2333. .HasPrecision(23, 10)
  2334. .HasColumnType("decimal(23,10)")
  2335. .HasComment("税率");
  2336. b.Property<int>("rnumber")
  2337. .HasColumnType("int")
  2338. .HasComment("评审次数");
  2339. b.Property<DateTime?>("rparrive_date")
  2340. .HasColumnType("datetime2")
  2341. .HasComment("再计划到货日期");
  2342. b.Property<decimal?>("rqty")
  2343. .HasPrecision(23, 10)
  2344. .HasColumnType("decimal(23,10)")
  2345. .HasComment("已收货数量");
  2346. b.Property<int?>("rstate")
  2347. .HasColumnType("int")
  2348. .HasComment("评审状态");
  2349. b.Property<decimal?>("shippedqty")
  2350. .HasPrecision(23, 10)
  2351. .HasColumnType("decimal(23,10)")
  2352. .HasComment("已发货数量");
  2353. b.Property<int?>("state")
  2354. .HasColumnType("int")
  2355. .HasComment("数据状态标识");
  2356. b.Property<long?>("stock_id")
  2357. .IsRequired()
  2358. .HasColumnType("bigint")
  2359. .HasComment("收货仓库id");
  2360. b.Property<string>("stock_name")
  2361. .HasMaxLength(80)
  2362. .HasColumnType("nvarchar(80)")
  2363. .HasComment("收货仓库名称");
  2364. b.Property<long>("tenant_id")
  2365. .HasColumnType("bigint")
  2366. .HasComment("企业ID");
  2367. b.Property<decimal?>("total_price")
  2368. .HasPrecision(23, 10)
  2369. .HasColumnType("decimal(23,10)")
  2370. .HasComment("总价");
  2371. b.Property<string>("unit")
  2372. .HasColumnType("nvarchar(max)")
  2373. .HasComment("单位");
  2374. b.Property<long?>("update_by")
  2375. .HasColumnType("bigint")
  2376. .HasComment("修改人");
  2377. b.Property<string>("update_by_name")
  2378. .HasMaxLength(50)
  2379. .HasColumnType("nvarchar(50)")
  2380. .HasComment("修改人名称");
  2381. b.Property<DateTime?>("update_time")
  2382. .HasColumnType("datetime2")
  2383. .HasComment("修改时间");
  2384. b.HasKey("Id");
  2385. b.HasIndex("po_billno", "number", "tenant_id", "factory_id");
  2386. b.HasIndex("po_billno", "polist_row", "tenant_id", "factory_id")
  2387. .IsUnique()
  2388. .HasFilter("[po_billno] IS NOT NULL AND [polist_row] IS NOT NULL AND [factory_id] IS NOT NULL");
  2389. b.ToTable("srm_po_list", (string)null);
  2390. b.HasComment("采购订单明细详情");
  2391. });
  2392. modelBuilder.Entity("Business.Model.SRM.srm_po_main", b =>
  2393. {
  2394. b.Property<long>("Id")
  2395. .HasColumnType("bigint");
  2396. b.Property<bool>("IsDeleted")
  2397. .ValueGeneratedOnAdd()
  2398. .HasColumnType("bit")
  2399. .HasDefaultValue(false)
  2400. .HasColumnName("IsDeleted")
  2401. .HasComment("删除标识");
  2402. b.Property<int?>("bill_type")
  2403. .HasColumnType("int")
  2404. .HasComment("金蝶单据类型值");
  2405. b.Property<int?>("confirmstate")
  2406. .HasColumnType("int")
  2407. .HasComment("确认状态");
  2408. b.Property<string>("contact")
  2409. .HasMaxLength(80)
  2410. .HasColumnType("nvarchar(80)")
  2411. .HasComment("供应商联系人");
  2412. b.Property<long?>("create_by")
  2413. .HasColumnType("bigint")
  2414. .HasComment("创建人id");
  2415. b.Property<string>("create_by_name")
  2416. .HasMaxLength(50)
  2417. .HasColumnType("nvarchar(50)")
  2418. .HasComment("创建人名称");
  2419. b.Property<DateTime?>("create_time")
  2420. .HasColumnType("datetime2")
  2421. .HasComment("创建时间");
  2422. b.Property<long?>("currency")
  2423. .IsRequired()
  2424. .HasColumnType("bigint")
  2425. .HasComment("币别");
  2426. b.Property<string>("deliveryaddress")
  2427. .HasMaxLength(200)
  2428. .HasColumnType("nvarchar(200)")
  2429. .HasComment("收货地址");
  2430. b.Property<long?>("factory_id")
  2431. .HasColumnType("bigint")
  2432. .HasComment("工厂ID");
  2433. b.Property<int?>("financialstate")
  2434. .HasColumnType("int")
  2435. .HasComment("财务状态");
  2436. b.Property<int?>("logisticsstate")
  2437. .HasColumnType("int")
  2438. .HasComment("物流状态");
  2439. b.Property<long?>("org_id")
  2440. .HasColumnType("bigint")
  2441. .HasComment("组织ID");
  2442. b.Property<string>("po_billno")
  2443. .HasMaxLength(80)
  2444. .HasColumnType("nvarchar(80)")
  2445. .HasComment("PO单号");
  2446. b.Property<long?>("po_delivery")
  2447. .IsRequired()
  2448. .HasColumnType("bigint")
  2449. .HasComment("交货方式");
  2450. b.Property<int?>("po_express")
  2451. .HasColumnType("int")
  2452. .HasComment("是否加急");
  2453. b.Property<string>("po_note")
  2454. .HasMaxLength(1000)
  2455. .HasColumnType("nvarchar(1000)")
  2456. .HasComment("备注");
  2457. b.Property<int?>("po_order_type")
  2458. .HasColumnType("int")
  2459. .HasComment("单据类型");
  2460. b.Property<string>("po_purchaser")
  2461. .HasMaxLength(80)
  2462. .HasColumnType("nvarchar(80)")
  2463. .HasComment("采购员");
  2464. b.Property<string>("po_purchaser_no")
  2465. .HasMaxLength(80)
  2466. .HasColumnType("nvarchar(80)")
  2467. .HasComment("采购员工号");
  2468. b.Property<DateTime?>("po_ssend_date")
  2469. .HasColumnType("datetime2")
  2470. .HasComment("下单日期");
  2471. b.Property<decimal?>("po_tax_rate")
  2472. .HasPrecision(23, 10)
  2473. .HasColumnType("decimal(23,10)")
  2474. .HasComment("税率");
  2475. b.Property<decimal?>("po_total")
  2476. .HasPrecision(23, 10)
  2477. .HasColumnType("decimal(23,10)")
  2478. .HasComment("订单总价");
  2479. b.Property<long?>("purchasing_orgid")
  2480. .HasColumnType("bigint")
  2481. .HasComment("采购组织id");
  2482. b.Property<string>("purchasing_orgname")
  2483. .HasMaxLength(50)
  2484. .HasColumnType("nvarchar(50)")
  2485. .HasComment("采购组织名称");
  2486. b.Property<DateTime?>("review_rtime")
  2487. .HasColumnType("datetime2")
  2488. .HasComment("评审通过时间");
  2489. b.Property<decimal?>("rnumber")
  2490. .HasPrecision(23, 10)
  2491. .HasColumnType("decimal(23,10)")
  2492. .HasComment("评审次数");
  2493. b.Property<int?>("rstate")
  2494. .HasColumnType("int")
  2495. .HasComment("评审状态");
  2496. b.Property<int?>("state")
  2497. .HasColumnType("int")
  2498. .HasComment("数据状态");
  2499. b.Property<long?>("supplier_id")
  2500. .IsRequired()
  2501. .HasColumnType("bigint")
  2502. .HasComment("供应商id");
  2503. b.Property<string>("supplier_name")
  2504. .HasMaxLength(80)
  2505. .HasColumnType("nvarchar(80)")
  2506. .HasComment("供应商名称");
  2507. b.Property<string>("supplier_no")
  2508. .HasMaxLength(80)
  2509. .HasColumnType("nvarchar(80)")
  2510. .HasComment("供应商编号");
  2511. b.Property<string>("supplierdddress")
  2512. .HasMaxLength(200)
  2513. .HasColumnType("nvarchar(200)")
  2514. .HasComment("供应地址");
  2515. b.Property<string>("suppliertelephone")
  2516. .HasMaxLength(80)
  2517. .HasColumnType("nvarchar(80)")
  2518. .HasComment("供应商联系人电话");
  2519. b.Property<string>("telephone")
  2520. .HasMaxLength(80)
  2521. .HasColumnType("nvarchar(80)")
  2522. .HasComment("采购联系人电话");
  2523. b.Property<long>("tenant_id")
  2524. .HasColumnType("bigint")
  2525. .HasComment("企业ID");
  2526. b.Property<long?>("update_by")
  2527. .HasColumnType("bigint")
  2528. .HasComment("修改人");
  2529. b.Property<string>("update_by_name")
  2530. .HasMaxLength(50)
  2531. .HasColumnType("nvarchar(50)")
  2532. .HasComment("修改人名称");
  2533. b.Property<DateTime?>("update_time")
  2534. .HasColumnType("datetime2")
  2535. .HasComment("修改时间");
  2536. b.HasKey("Id");
  2537. b.HasIndex("po_billno", "tenant_id", "factory_id")
  2538. .IsUnique()
  2539. .HasFilter("[po_billno] IS NOT NULL AND [factory_id] IS NOT NULL");
  2540. b.ToTable("srm_po_main", (string)null);
  2541. b.HasComment("采购订单");
  2542. });
  2543. modelBuilder.Entity("Business.Model.SRM.srm_po_occupy", b =>
  2544. {
  2545. b.Property<long>("Id")
  2546. .HasColumnType("bigint");
  2547. b.Property<bool>("IsDeleted")
  2548. .ValueGeneratedOnAdd()
  2549. .HasColumnType("bit")
  2550. .HasDefaultValue(false)
  2551. .HasColumnName("IsDeleted")
  2552. .HasComment("删除标识");
  2553. b.Property<long?>("bill_no")
  2554. .HasColumnType("bigint")
  2555. .HasComment("客户订单id");
  2556. b.Property<string>("cby")
  2557. .HasMaxLength(80)
  2558. .HasColumnType("nvarchar(80)")
  2559. .HasComment("变更人");
  2560. b.Property<string>("creason")
  2561. .HasMaxLength(1000)
  2562. .HasColumnType("nvarchar(1000)")
  2563. .HasComment("变更原因");
  2564. b.Property<long?>("create_by")
  2565. .HasColumnType("bigint")
  2566. .HasComment("创建人id");
  2567. b.Property<string>("create_by_name")
  2568. .HasMaxLength(50)
  2569. .HasColumnType("nvarchar(50)")
  2570. .HasComment("创建人名称");
  2571. b.Property<DateTime?>("create_time")
  2572. .HasColumnType("datetime2")
  2573. .HasComment("创建时间");
  2574. b.Property<DateTime?>("ctime")
  2575. .HasColumnType("datetime2")
  2576. .HasComment("变更时间");
  2577. b.Property<long?>("eid")
  2578. .HasColumnType("bigint")
  2579. .HasComment("客户订单行id");
  2580. b.Property<int>("entry_id")
  2581. .HasColumnType("int")
  2582. .HasComment("行号");
  2583. b.Property<DateTime?>("etime")
  2584. .HasColumnType("datetime2")
  2585. .HasComment("结束时间");
  2586. b.Property<long?>("factory_id")
  2587. .HasColumnType("bigint")
  2588. .HasComment("工厂ID");
  2589. b.Property<long?>("morder_id")
  2590. .HasColumnType("bigint")
  2591. .HasComment("工单ID");
  2592. b.Property<string>("morder_mo")
  2593. .IsRequired()
  2594. .HasColumnType("nvarchar(max)")
  2595. .HasComment("工单编号");
  2596. b.Property<long?>("org_id")
  2597. .HasColumnType("bigint")
  2598. .HasComment("组织ID");
  2599. b.Property<long?>("polist_id")
  2600. .IsRequired()
  2601. .HasColumnType("bigint")
  2602. .HasComment("采购订单id");
  2603. b.Property<int?>("polist_row")
  2604. .HasColumnType("int")
  2605. .HasComment("采购订单行号");
  2606. b.Property<decimal?>("qty")
  2607. .HasPrecision(23, 10)
  2608. .HasColumnType("decimal(23,10)")
  2609. .HasComment("占用量");
  2610. b.Property<int?>("state")
  2611. .HasColumnType("int")
  2612. .HasComment("占用状态");
  2613. b.Property<DateTime?>("stime")
  2614. .HasColumnType("datetime2")
  2615. .HasComment("开始时间");
  2616. b.Property<long>("tenant_id")
  2617. .HasColumnType("bigint")
  2618. .HasComment("企业ID");
  2619. b.Property<string>("type")
  2620. .HasMaxLength(80)
  2621. .HasColumnType("nvarchar(80)")
  2622. .HasComment("类型");
  2623. b.Property<long?>("update_by")
  2624. .HasColumnType("bigint")
  2625. .HasComment("修改人");
  2626. b.Property<string>("update_by_name")
  2627. .HasMaxLength(50)
  2628. .HasColumnType("nvarchar(50)")
  2629. .HasComment("修改人名称");
  2630. b.Property<DateTime?>("update_time")
  2631. .HasColumnType("datetime2")
  2632. .HasComment("修改时间");
  2633. b.HasKey("Id");
  2634. b.HasIndex("polist_id", "tenant_id", "factory_id");
  2635. b.ToTable("srm_po_occupy", (string)null);
  2636. b.HasComment("采购订单占用详情");
  2637. });
  2638. modelBuilder.Entity("Business.Model.SRM.srm_pr_main", b =>
  2639. {
  2640. b.Property<long>("Id")
  2641. .HasColumnType("bigint");
  2642. b.Property<bool>("IsDeleted")
  2643. .ValueGeneratedOnAdd()
  2644. .HasColumnType("bit")
  2645. .HasDefaultValue(false)
  2646. .HasColumnName("IsDeleted")
  2647. .HasComment("删除标识");
  2648. b.Property<long?>("create_by")
  2649. .HasColumnType("bigint")
  2650. .HasComment("创建人id");
  2651. b.Property<string>("create_by_name")
  2652. .HasMaxLength(50)
  2653. .HasColumnType("nvarchar(50)")
  2654. .HasComment("创建人名称");
  2655. b.Property<DateTime?>("create_time")
  2656. .HasColumnType("datetime2")
  2657. .HasComment("创建时间");
  2658. b.Property<long?>("currencytype")
  2659. .IsRequired()
  2660. .HasColumnType("bigint")
  2661. .HasComment("币种");
  2662. b.Property<int?>("entity_id")
  2663. .HasColumnType("int")
  2664. .HasComment("工单行号");
  2665. b.Property<long?>("factory_id")
  2666. .HasColumnType("bigint")
  2667. .HasComment("工厂ID");
  2668. b.Property<long?>("icitem_id")
  2669. .IsRequired()
  2670. .HasColumnType("bigint")
  2671. .HasComment("物料id");
  2672. b.Property<string>("icitem_name")
  2673. .HasMaxLength(80)
  2674. .HasColumnType("nvarchar(80)")
  2675. .HasComment("物料名称");
  2676. b.Property<decimal?>("old_apply_aqty")
  2677. .HasPrecision(23, 10)
  2678. .HasColumnType("decimal(23,10)")
  2679. .HasComment("已申请数量");
  2680. b.Property<long?>("org_id")
  2681. .HasColumnType("bigint")
  2682. .HasComment("组织ID");
  2683. b.Property<decimal?>("pr_aqty")
  2684. .HasPrecision(23, 10)
  2685. .HasColumnType("decimal(23,10)")
  2686. .HasComment("申请数量");
  2687. b.Property<string>("pr_billno")
  2688. .HasMaxLength(80)
  2689. .HasColumnType("nvarchar(80)")
  2690. .HasComment("pr单号");
  2691. b.Property<DateTime?>("pr_bsarrive_date")
  2692. .HasColumnType("datetime2")
  2693. .HasComment("采购员建议到货日期");
  2694. b.Property<string>("pr_mono")
  2695. .HasMaxLength(80)
  2696. .HasColumnType("nvarchar(80)")
  2697. .HasComment("关联工单号");
  2698. b.Property<DateTime?>("pr_oarrive_date")
  2699. .HasColumnType("datetime2")
  2700. .HasComment("订单到货日期");
  2701. b.Property<int?>("pr_order_type")
  2702. .HasColumnType("int")
  2703. .HasComment("单据类型");
  2704. b.Property<decimal?>("pr_orderprice")
  2705. .HasPrecision(23, 10)
  2706. .HasColumnType("decimal(23,10)")
  2707. .HasComment("订单价格(含税)");
  2708. b.Property<DateTime?>("pr_parrive_date")
  2709. .HasColumnType("datetime2")
  2710. .HasComment("计划到达日期");
  2711. b.Property<decimal?>("pr_price")
  2712. .HasPrecision(23, 10)
  2713. .HasColumnType("decimal(23,10)")
  2714. .HasComment("采购净价(不含税)");
  2715. b.Property<DateTime?>("pr_psend_date")
  2716. .HasColumnType("datetime2")
  2717. .HasComment("计划下单日期");
  2718. b.Property<DateTime?>("pr_pur_affirm_date")
  2719. .HasColumnType("datetime2")
  2720. .HasComment("采购确认到货日期");
  2721. b.Property<long?>("pr_purchaseid")
  2722. .IsRequired()
  2723. .HasColumnType("bigint")
  2724. .HasComment("供应商id");
  2725. b.Property<string>("pr_purchasename")
  2726. .HasMaxLength(80)
  2727. .HasColumnType("nvarchar(80)")
  2728. .HasComment("供应商名称");
  2729. b.Property<string>("pr_purchasenumber")
  2730. .HasMaxLength(80)
  2731. .HasColumnType("nvarchar(80)")
  2732. .HasComment("供应商编码");
  2733. b.Property<string>("pr_purchaser")
  2734. .HasMaxLength(80)
  2735. .HasColumnType("nvarchar(80)")
  2736. .HasComment("采购员");
  2737. b.Property<string>("pr_purchaser_num")
  2738. .HasMaxLength(80)
  2739. .HasColumnType("nvarchar(80)")
  2740. .HasComment("采购员工号");
  2741. b.Property<DateTime?>("pr_rarrive_date")
  2742. .HasColumnType("datetime2")
  2743. .HasComment("需求到货日期");
  2744. b.Property<decimal?>("pr_rate")
  2745. .HasPrecision(23, 10)
  2746. .HasColumnType("decimal(23,10)")
  2747. .HasComment("税率");
  2748. b.Property<DateTime?>("pr_rparrive_date")
  2749. .HasColumnType("datetime2")
  2750. .HasComment("再计划到货日期");
  2751. b.Property<decimal?>("pr_rqty")
  2752. .HasPrecision(23, 10)
  2753. .HasColumnType("decimal(23,10)")
  2754. .HasComment("需求数量");
  2755. b.Property<string>("pr_rreason")
  2756. .HasMaxLength(1000)
  2757. .HasColumnType("nvarchar(1000)")
  2758. .HasComment("拒绝原因");
  2759. b.Property<DateTime?>("pr_sarrive_date")
  2760. .HasColumnType("datetime2")
  2761. .HasComment("系统建议到达日期");
  2762. b.Property<decimal?>("pr_sqty")
  2763. .HasPrecision(23, 10)
  2764. .HasColumnType("decimal(23,10)")
  2765. .HasComment("建议数量");
  2766. b.Property<DateTime?>("pr_ssend_date")
  2767. .HasColumnType("datetime2")
  2768. .HasComment("系统建议下单日期");
  2769. b.Property<decimal?>("pr_sysprice")
  2770. .HasPrecision(23, 10)
  2771. .HasColumnType("decimal(23,10)")
  2772. .HasComment("系统价格(含税)");
  2773. b.Property<int?>("pr_type")
  2774. .HasColumnType("int")
  2775. .HasComment("申请类型");
  2776. b.Property<string>("pr_unit")
  2777. .HasMaxLength(20)
  2778. .HasColumnType("nvarchar(20)")
  2779. .HasComment("单位");
  2780. b.Property<string>("refer_pr_billno")
  2781. .HasMaxLength(80)
  2782. .HasColumnType("nvarchar(80)")
  2783. .HasComment("关联pr单号");
  2784. b.Property<string>("remark")
  2785. .HasMaxLength(1000)
  2786. .HasColumnType("nvarchar(1000)")
  2787. .HasComment("备注");
  2788. b.Property<decimal?>("secInv_ratio")
  2789. .HasPrecision(23, 10)
  2790. .HasColumnType("decimal(23,10)")
  2791. .HasComment("安全库存触发采购比例");
  2792. b.Property<long?>("sentry_id")
  2793. .HasColumnType("bigint")
  2794. .HasComment("订单行id");
  2795. b.Property<int?>("state")
  2796. .HasColumnType("int")
  2797. .HasComment("状态");
  2798. b.Property<long>("tenant_id")
  2799. .HasColumnType("bigint")
  2800. .HasComment("企业ID");
  2801. b.Property<long?>("update_by")
  2802. .HasColumnType("bigint")
  2803. .HasComment("修改人");
  2804. b.Property<string>("update_by_name")
  2805. .HasMaxLength(50)
  2806. .HasColumnType("nvarchar(50)")
  2807. .HasComment("修改人名称");
  2808. b.Property<DateTime?>("update_time")
  2809. .HasColumnType("datetime2")
  2810. .HasComment("修改时间");
  2811. b.HasKey("Id");
  2812. b.HasIndex("pr_billno", "tenant_id", "factory_id")
  2813. .IsUnique()
  2814. .HasFilter("[pr_billno] IS NOT NULL AND [factory_id] IS NOT NULL");
  2815. b.HasIndex("pr_billno", "pr_purchasenumber", "tenant_id", "factory_id");
  2816. b.ToTable("srm_pr_main", (string)null);
  2817. b.HasComment("采购申请单");
  2818. });
  2819. modelBuilder.Entity("Business.Model.SRM.srm_purchase", b =>
  2820. {
  2821. b.Property<long>("Id")
  2822. .HasColumnType("bigint");
  2823. b.Property<bool>("IsDeleted")
  2824. .ValueGeneratedOnAdd()
  2825. .HasColumnType("bit")
  2826. .HasDefaultValue(false)
  2827. .HasColumnName("IsDeleted")
  2828. .HasComment("删除标识");
  2829. b.Property<decimal?>("batch_append_qty")
  2830. .HasPrecision(23, 10)
  2831. .HasColumnType("decimal(23,10)")
  2832. .HasComment("批量增量");
  2833. b.Property<long?>("create_by")
  2834. .HasColumnType("bigint")
  2835. .HasComment("创建人id");
  2836. b.Property<string>("create_by_name")
  2837. .HasMaxLength(50)
  2838. .HasColumnType("nvarchar(50)")
  2839. .HasComment("创建人名称");
  2840. b.Property<DateTime?>("create_time")
  2841. .HasColumnType("datetime2")
  2842. .HasComment("创建时间");
  2843. b.Property<long?>("currency_type")
  2844. .HasColumnType("bigint")
  2845. .HasComment("币种");
  2846. b.Property<string>("factory_code")
  2847. .HasMaxLength(80)
  2848. .HasColumnType("nvarchar(80)")
  2849. .HasComment("工厂编码");
  2850. b.Property<long?>("factory_id")
  2851. .HasColumnType("bigint")
  2852. .HasComment("工厂ID");
  2853. b.Property<long>("icitem_id")
  2854. .HasColumnType("bigint")
  2855. .HasComment("物料id");
  2856. b.Property<string>("icitem_name")
  2857. .HasMaxLength(80)
  2858. .HasColumnType("nvarchar(80)")
  2859. .HasComment("物料名称");
  2860. b.Property<string>("is_days")
  2861. .IsRequired()
  2862. .HasMaxLength(80)
  2863. .HasColumnType("nvarchar(80)")
  2864. .HasComment("每周几送货");
  2865. b.Property<bool>("is_week")
  2866. .HasColumnType("bit")
  2867. .HasComment("是否周期合并");
  2868. b.Property<string>("icitem_number")
  2869. .HasMaxLength(20)
  2870. .HasColumnType("nvarchar(20)")
  2871. .HasComment("物料编码");
  2872. b.Property<decimal?>("netpurchase_price")
  2873. .HasPrecision(23, 10)
  2874. .HasColumnType("decimal(23,10)")
  2875. .HasComment("采购净价(不含税)");
  2876. b.Property<string>("order_dept")
  2877. .HasMaxLength(80)
  2878. .HasColumnType("nvarchar(80)")
  2879. .HasComment("采购部门");
  2880. b.Property<decimal?>("order_price")
  2881. .HasPrecision(23, 10)
  2882. .HasColumnType("decimal(23,10)")
  2883. .HasComment("采购单价");
  2884. b.Property<string>("order_rector_name")
  2885. .HasMaxLength(80)
  2886. .HasColumnType("nvarchar(80)")
  2887. .HasComment("采购负责人");
  2888. b.Property<string>("order_rector_num")
  2889. .HasMaxLength(80)
  2890. .HasColumnType("nvarchar(80)")
  2891. .HasComment("采购负责人_工号");
  2892. b.Property<long?>("org_id")
  2893. .HasColumnType("bigint")
  2894. .HasComment("组织ID");
  2895. b.Property<string>("purchase_unit")
  2896. .HasMaxLength(80)
  2897. .HasColumnType("nvarchar(80)")
  2898. .HasComment("采购计量单位");
  2899. b.Property<string>("purcher")
  2900. .HasMaxLength(80)
  2901. .HasColumnType("nvarchar(80)")
  2902. .HasComment("采购员");
  2903. b.Property<string>("purchgroup")
  2904. .HasMaxLength(80)
  2905. .HasColumnType("nvarchar(80)")
  2906. .HasComment("采购组");
  2907. b.Property<decimal?>("qty_min")
  2908. .HasPrecision(23, 10)
  2909. .HasColumnType("decimal(23,10)")
  2910. .HasComment("最小订货量");
  2911. b.Property<decimal?>("sale_price")
  2912. .HasPrecision(23, 10)
  2913. .HasColumnType("decimal(23,10)")
  2914. .HasComment("销售单价");
  2915. b.Property<string>("sourcelist_number")
  2916. .HasMaxLength(80)
  2917. .HasColumnType("nvarchar(80)")
  2918. .HasComment("货源清单编号");
  2919. b.Property<long?>("supplier_id")
  2920. .HasColumnType("bigint")
  2921. .HasComment("供应商id");
  2922. b.Property<string>("supplier_name")
  2923. .HasMaxLength(80)
  2924. .HasColumnType("nvarchar(80)")
  2925. .HasComment("供应商名称");
  2926. b.Property<string>("supplier_number")
  2927. .HasMaxLength(80)
  2928. .HasColumnType("nvarchar(80)")
  2929. .HasComment("供应商编码");
  2930. b.Property<decimal?>("taxrate")
  2931. .HasPrecision(23, 10)
  2932. .HasColumnType("decimal(23,10)")
  2933. .HasComment("税率");
  2934. b.Property<long>("tenant_id")
  2935. .HasColumnType("bigint")
  2936. .HasComment("企业ID");
  2937. b.Property<long?>("update_by")
  2938. .HasColumnType("bigint")
  2939. .HasComment("修改人");
  2940. b.Property<string>("update_by_name")
  2941. .HasMaxLength(50)
  2942. .HasColumnType("nvarchar(50)")
  2943. .HasComment("修改人名称");
  2944. b.Property<DateTime?>("update_time")
  2945. .HasColumnType("datetime2")
  2946. .HasComment("修改时间");
  2947. b.HasKey("Id");
  2948. b.HasIndex("icitem_id", "supplier_number", "tenant_id", "factory_id");
  2949. b.HasIndex("sourcelist_number", "icitem_number", "tenant_id", "factory_id")
  2950. .IsUnique()
  2951. .HasFilter("[sourcelist_number] IS NOT NULL AND [icitem_number] IS NOT NULL AND [factory_id] IS NOT NULL");
  2952. b.ToTable("srm_purchase", (string)null);
  2953. b.HasComment("物料采购报价单");
  2954. });
  2955. modelBuilder.Entity("Business.Model.SRM.srm_supplier", b =>
  2956. {
  2957. b.Property<long>("Id")
  2958. .HasColumnType("bigint");
  2959. b.Property<bool>("IsDeleted")
  2960. .ValueGeneratedOnAdd()
  2961. .HasColumnType("bit")
  2962. .HasDefaultValue(false)
  2963. .HasColumnName("IsDeleted")
  2964. .HasComment("删除标识");
  2965. b.Property<string>("addr_en")
  2966. .HasMaxLength(255)
  2967. .HasColumnType("nvarchar(255)")
  2968. .HasComment("英文地址");
  2969. b.Property<DateTime?>("approve_date")
  2970. .HasColumnType("datetime2")
  2971. .HasComment("批准日期");
  2972. b.Property<bool?>("auto_create_mr")
  2973. .HasColumnType("bit")
  2974. .HasComment("交货自动生成收货单据");
  2975. b.Property<bool?>("auto_validate_order")
  2976. .HasColumnType("bit")
  2977. .HasComment("自动确认订单");
  2978. b.Property<string>("bank")
  2979. .HasMaxLength(255)
  2980. .HasColumnType("nvarchar(255)")
  2981. .HasComment("开户银行");
  2982. b.Property<string>("bank_account")
  2983. .HasMaxLength(80)
  2984. .HasColumnType("nvarchar(80)")
  2985. .HasComment("银行账号");
  2986. b.Property<DateTime?>("begin_day")
  2987. .HasColumnType("datetime2")
  2988. .HasComment("生效日期");
  2989. b.Property<string>("branch_info")
  2990. .HasMaxLength(255)
  2991. .HasColumnType("nvarchar(255)")
  2992. .HasComment("分支机构信息");
  2993. b.Property<string>("checker")
  2994. .HasMaxLength(80)
  2995. .HasColumnType("nvarchar(80)")
  2996. .HasComment("审核人");
  2997. b.Property<string>("company_type")
  2998. .HasMaxLength(80)
  2999. .HasColumnType("nvarchar(80)")
  3000. .HasComment("公司类别");
  3001. b.Property<string>("contact")
  3002. .HasMaxLength(80)
  3003. .HasColumnType("nvarchar(80)")
  3004. .HasComment("联系人");
  3005. b.Property<string>("country")
  3006. .HasMaxLength(255)
  3007. .HasColumnType("nvarchar(255)")
  3008. .HasComment("国别地区");
  3009. b.Property<long?>("create_by")
  3010. .HasColumnType("bigint")
  3011. .HasComment("创建人id");
  3012. b.Property<string>("create_by_name")
  3013. .HasMaxLength(50)
  3014. .HasColumnType("nvarchar(50)")
  3015. .HasComment("创建人名称");
  3016. b.Property<DateTime?>("create_time")
  3017. .HasColumnType("datetime2")
  3018. .HasComment("创建时间");
  3019. b.Property<string>("currency")
  3020. .HasMaxLength(80)
  3021. .HasColumnType("nvarchar(80)")
  3022. .HasComment("结算币种");
  3023. b.Property<string>("department")
  3024. .HasMaxLength(80)
  3025. .HasColumnType("nvarchar(80)")
  3026. .HasComment("分管部门");
  3027. b.Property<string>("email")
  3028. .HasMaxLength(80)
  3029. .HasColumnType("nvarchar(80)")
  3030. .HasComment("邮件地址");
  3031. b.Property<string>("employee_name")
  3032. .HasMaxLength(80)
  3033. .HasColumnType("nvarchar(80)")
  3034. .HasComment("专营业务员");
  3035. b.Property<string>("employee_no")
  3036. .HasMaxLength(80)
  3037. .HasColumnType("nvarchar(80)")
  3038. .HasComment("专营业务员_工号");
  3039. b.Property<DateTime?>("end_day")
  3040. .HasColumnType("datetime2")
  3041. .HasComment("失效日期");
  3042. b.Property<long?>("factory_id")
  3043. .HasColumnType("bigint")
  3044. .HasComment("工厂ID");
  3045. b.Property<string>("fax")
  3046. .HasMaxLength(80)
  3047. .HasColumnType("nvarchar(80)")
  3048. .HasComment("传真号码");
  3049. b.Property<bool?>("isuse_supplier_portal")
  3050. .HasColumnType("bit")
  3051. .HasComment("启用供应商门户");
  3052. b.Property<string>("licence")
  3053. .HasMaxLength(255)
  3054. .HasColumnType("nvarchar(255)")
  3055. .HasComment("营业执照");
  3056. b.Property<string>("mobile")
  3057. .HasMaxLength(80)
  3058. .HasColumnType("nvarchar(80)")
  3059. .HasComment("移动电话");
  3060. b.Property<string>("name_en")
  3061. .HasMaxLength(255)
  3062. .HasColumnType("nvarchar(255)")
  3063. .HasComment("英文名称");
  3064. b.Property<DateTime?>("op_time")
  3065. .HasColumnType("datetime2")
  3066. .HasComment("操作时间");
  3067. b.Property<long?>("org_id")
  3068. .HasColumnType("bigint")
  3069. .HasComment("组织ID");
  3070. b.Property<string>("po_mode")
  3071. .HasMaxLength(80)
  3072. .HasColumnType("nvarchar(80)")
  3073. .HasComment("采购模式");
  3074. b.Property<string>("post_code")
  3075. .HasMaxLength(80)
  3076. .HasColumnType("nvarchar(80)")
  3077. .HasComment("邮政编码");
  3078. b.Property<string>("region")
  3079. .HasMaxLength(255)
  3080. .HasColumnType("nvarchar(255)")
  3081. .HasComment("区域");
  3082. b.Property<string>("regmark")
  3083. .HasMaxLength(255)
  3084. .HasColumnType("nvarchar(255)")
  3085. .HasComment("注册商标");
  3086. b.Property<DateTime?>("regster_date")
  3087. .HasColumnType("datetime2")
  3088. .HasComment("注册日期");
  3089. b.Property<string>("settlement")
  3090. .HasMaxLength(80)
  3091. .HasColumnType("nvarchar(80)")
  3092. .HasComment("结算方式");
  3093. b.Property<string>("state")
  3094. .HasMaxLength(80)
  3095. .HasColumnType("nvarchar(80)")
  3096. .HasComment("状态");
  3097. b.Property<string>("stockid_assignee")
  3098. .HasMaxLength(255)
  3099. .HasColumnType("nvarchar(255)")
  3100. .HasComment("受托代销虚仓");
  3101. b.Property<string>("supplier_address")
  3102. .HasMaxLength(255)
  3103. .HasColumnType("nvarchar(255)")
  3104. .HasComment("供应商地址");
  3105. b.Property<string>("supplier_full_name")
  3106. .HasMaxLength(255)
  3107. .HasColumnType("nvarchar(255)")
  3108. .HasComment("供应商全称");
  3109. b.Property<string>("supplier_help_code")
  3110. .HasMaxLength(80)
  3111. .HasColumnType("nvarchar(80)")
  3112. .HasComment("供应商助记码");
  3113. b.Property<string>("supplier_name")
  3114. .HasMaxLength(255)
  3115. .HasColumnType("nvarchar(255)")
  3116. .HasComment("供应商名称");
  3117. b.Property<string>("supplier_no")
  3118. .HasMaxLength(80)
  3119. .HasColumnType("nvarchar(80)")
  3120. .HasComment("供应商编号");
  3121. b.Property<string>("supplier_short_name")
  3122. .HasMaxLength(255)
  3123. .HasColumnType("nvarchar(255)")
  3124. .HasComment("供应商简称");
  3125. b.Property<string>("supply_grade")
  3126. .HasMaxLength(80)
  3127. .HasColumnType("nvarchar(80)")
  3128. .HasComment("供应商等级");
  3129. b.Property<string>("supply_type")
  3130. .HasMaxLength(80)
  3131. .HasColumnType("nvarchar(80)")
  3132. .HasComment("供应类别");
  3133. b.Property<string>("taxid")
  3134. .HasMaxLength(255)
  3135. .HasColumnType("nvarchar(255)")
  3136. .HasComment("税务登记号");
  3137. b.Property<string>("telephone")
  3138. .HasMaxLength(80)
  3139. .HasColumnType("nvarchar(80)")
  3140. .HasComment("联系电话");
  3141. b.Property<long>("tenant_id")
  3142. .HasColumnType("bigint")
  3143. .HasComment("企业ID");
  3144. b.Property<string>("trade")
  3145. .HasMaxLength(255)
  3146. .HasColumnType("nvarchar(255)")
  3147. .HasComment("行业");
  3148. b.Property<string>("type")
  3149. .HasMaxLength(80)
  3150. .HasColumnType("nvarchar(80)")
  3151. .HasComment("供应商分类");
  3152. b.Property<long?>("update_by")
  3153. .HasColumnType("bigint")
  3154. .HasComment("修改人");
  3155. b.Property<string>("update_by_name")
  3156. .HasMaxLength(50)
  3157. .HasColumnType("nvarchar(50)")
  3158. .HasComment("修改人名称");
  3159. b.Property<DateTime?>("update_time")
  3160. .HasColumnType("datetime2")
  3161. .HasComment("修改时间");
  3162. b.Property<decimal?>("value_add_rate")
  3163. .HasPrecision(23, 10)
  3164. .HasColumnType("decimal(23,10)")
  3165. .HasComment("增值税率");
  3166. b.Property<string>("vmi_stock")
  3167. .HasMaxLength(255)
  3168. .HasColumnType("nvarchar(255)")
  3169. .HasComment("VMI仓");
  3170. b.HasKey("Id");
  3171. b.HasIndex("supplier_no", "tenant_id", "factory_id")
  3172. .IsUnique()
  3173. .HasFilter("[supplier_no] IS NOT NULL AND [factory_id] IS NOT NULL");
  3174. b.ToTable("srm_supplier", (string)null);
  3175. b.HasComment("供应商");
  3176. });
  3177. modelBuilder.Entity("Business.Model.Tech.mes_process", b =>
  3178. {
  3179. b.Property<long>("Id")
  3180. .HasColumnType("bigint");
  3181. b.Property<bool>("IsDeleted")
  3182. .ValueGeneratedOnAdd()
  3183. .HasColumnType("bit")
  3184. .HasDefaultValue(false)
  3185. .HasColumnName("IsDeleted")
  3186. .HasComment("删除标识");
  3187. b.Property<long?>("create_by")
  3188. .HasColumnType("bigint")
  3189. .HasComment("创建人id");
  3190. b.Property<string>("create_by_name")
  3191. .HasMaxLength(50)
  3192. .HasColumnType("nvarchar(50)")
  3193. .HasComment("创建人名称");
  3194. b.Property<DateTime?>("create_time")
  3195. .HasColumnType("datetime2")
  3196. .HasComment("创建时间");
  3197. b.Property<long?>("factory_id")
  3198. .HasColumnType("bigint")
  3199. .HasComment("工厂ID");
  3200. b.Property<string>("long_desc")
  3201. .HasMaxLength(2000)
  3202. .HasColumnType("nvarchar(2000)")
  3203. .HasComment("详细描述");
  3204. b.Property<long?>("org_id")
  3205. .HasColumnType("bigint")
  3206. .HasComment("组织ID");
  3207. b.Property<string>("proc_name")
  3208. .IsRequired()
  3209. .HasMaxLength(100)
  3210. .HasColumnType("nvarchar(100)")
  3211. .HasComment("工序名称");
  3212. b.Property<string>("short_desc")
  3213. .HasMaxLength(500)
  3214. .HasColumnType("nvarchar(500)")
  3215. .HasComment("简述");
  3216. b.Property<string>("subids")
  3217. .HasMaxLength(2000)
  3218. .HasColumnType("nvarchar(2000)")
  3219. .HasComment("组合工序id");
  3220. b.Property<long>("tenant_id")
  3221. .HasColumnType("bigint")
  3222. .HasComment("企业ID");
  3223. b.Property<long?>("update_by")
  3224. .HasColumnType("bigint")
  3225. .HasComment("修改人");
  3226. b.Property<string>("update_by_name")
  3227. .HasMaxLength(50)
  3228. .HasColumnType("nvarchar(50)")
  3229. .HasComment("修改人名称");
  3230. b.Property<DateTime?>("update_time")
  3231. .HasColumnType("datetime2")
  3232. .HasComment("修改时间");
  3233. b.HasKey("Id");
  3234. b.ToTable("mes_process", (string)null);
  3235. b.HasComment("工序表");
  3236. });
  3237. modelBuilder.Entity("Business.Model.Tech.mes_tech_process", b =>
  3238. {
  3239. b.Property<long>("Id")
  3240. .HasColumnType("bigint");
  3241. b.Property<bool>("IsDeleted")
  3242. .ValueGeneratedOnAdd()
  3243. .HasColumnType("bit")
  3244. .HasDefaultValue(false)
  3245. .HasColumnName("IsDeleted")
  3246. .HasComment("删除标识");
  3247. b.Property<long?>("create_by")
  3248. .HasColumnType("bigint")
  3249. .HasComment("创建人id");
  3250. b.Property<string>("create_by_name")
  3251. .HasMaxLength(50)
  3252. .HasColumnType("nvarchar(50)")
  3253. .HasComment("创建人名称");
  3254. b.Property<DateTime?>("create_time")
  3255. .HasColumnType("datetime2")
  3256. .HasComment("创建时间");
  3257. b.Property<decimal?>("ct")
  3258. .HasPrecision(23, 10)
  3259. .HasColumnType("decimal(23,10)")
  3260. .HasComment("节拍时间");
  3261. b.Property<decimal?>("effect_ratio")
  3262. .HasPrecision(10, 4)
  3263. .HasColumnType("decimal(10,4)")
  3264. .HasComment("效率系数");
  3265. b.Property<long?>("factory_id")
  3266. .HasColumnType("bigint")
  3267. .HasComment("工厂ID");
  3268. b.Property<int?>("is_schedule")
  3269. .IsRequired()
  3270. .HasColumnType("int")
  3271. .HasComment("是否需要排产:1-是;0-否");
  3272. b.Property<int?>("level")
  3273. .IsRequired()
  3274. .HasColumnType("int")
  3275. .HasComment("组合层级");
  3276. b.Property<decimal?>("lq")
  3277. .HasPrecision(23, 10)
  3278. .HasColumnType("decimal(23,10)")
  3279. .HasComment("前置最小数量");
  3280. b.Property<decimal?>("lqt")
  3281. .HasPrecision(23, 10)
  3282. .HasColumnType("decimal(23,10)")
  3283. .HasComment("前置等待时间");
  3284. b.Property<int?>("maxworkshop")
  3285. .HasColumnType("int")
  3286. .HasComment("最大并行工位数");
  3287. b.Property<int?>("mototrack")
  3288. .HasColumnType("int")
  3289. .HasComment("是否需要跟踪工序");
  3290. b.Property<int?>("needqc")
  3291. .HasColumnType("int")
  3292. .HasComment("是否需要质检");
  3293. b.Property<long?>("nextprocid")
  3294. .HasColumnType("bigint")
  3295. .HasComment("下一工序id");
  3296. b.Property<long?>("org_id")
  3297. .HasColumnType("bigint")
  3298. .HasComment("组织ID");
  3299. b.Property<long?>("parentprocid")
  3300. .HasColumnType("bigint")
  3301. .HasComment("父级工序id");
  3302. b.Property<long?>("proc_id")
  3303. .IsRequired()
  3304. .HasColumnType("bigint")
  3305. .HasComment("工序主键");
  3306. b.Property<decimal?>("readytime")
  3307. .HasPrecision(20, 8)
  3308. .HasColumnType("decimal(20,8)")
  3309. .HasComment("前置准备时间");
  3310. b.Property<long?>("tech_id")
  3311. .IsRequired()
  3312. .HasColumnType("bigint")
  3313. .HasComment("工艺主键");
  3314. b.Property<long>("tenant_id")
  3315. .HasColumnType("bigint")
  3316. .HasComment("企业ID");
  3317. b.Property<long?>("update_by")
  3318. .HasColumnType("bigint")
  3319. .HasComment("修改人");
  3320. b.Property<string>("update_by_name")
  3321. .HasMaxLength(50)
  3322. .HasColumnType("nvarchar(50)")
  3323. .HasComment("修改人名称");
  3324. b.Property<DateTime?>("update_time")
  3325. .HasColumnType("datetime2")
  3326. .HasComment("修改时间");
  3327. b.Property<decimal?>("upe")
  3328. .HasPrecision(23, 10)
  3329. .HasColumnType("decimal(23,10)")
  3330. .HasComment("一次可加工数量");
  3331. b.Property<decimal?>("uph")
  3332. .HasPrecision(23, 10)
  3333. .HasColumnType("decimal(23,10)")
  3334. .HasComment("UPH");
  3335. b.Property<decimal?>("upp")
  3336. .HasPrecision(23, 10)
  3337. .HasColumnType("decimal(23,10)")
  3338. .HasComment("子工序加工数量");
  3339. b.Property<int?>("wctype")
  3340. .HasColumnType("int")
  3341. .HasComment("工作中心类型");
  3342. b.Property<int?>("wsinuse")
  3343. .HasColumnType("int")
  3344. .HasComment("实际运行工位数");
  3345. b.HasKey("Id");
  3346. b.ToTable("mes_tech_process", (string)null);
  3347. b.HasComment("工艺关联工序表");
  3348. });
  3349. modelBuilder.Entity("Business.Model.Tech.mes_technique", b =>
  3350. {
  3351. b.Property<long>("Id")
  3352. .HasColumnType("bigint");
  3353. b.Property<bool>("IsDeleted")
  3354. .ValueGeneratedOnAdd()
  3355. .HasColumnType("bit")
  3356. .HasDefaultValue(false)
  3357. .HasColumnName("IsDeleted")
  3358. .HasComment("删除标识");
  3359. b.Property<string>("bom")
  3360. .HasMaxLength(100)
  3361. .HasColumnType("nvarchar(100)")
  3362. .HasComment("产品");
  3363. b.Property<string>("bomver")
  3364. .HasMaxLength(100)
  3365. .HasColumnType("nvarchar(100)")
  3366. .HasComment("产品版本");
  3367. b.Property<long?>("create_by")
  3368. .HasColumnType("bigint")
  3369. .HasComment("创建人id");
  3370. b.Property<string>("create_by_name")
  3371. .HasMaxLength(50)
  3372. .HasColumnType("nvarchar(50)")
  3373. .HasComment("创建人名称");
  3374. b.Property<DateTime?>("create_time")
  3375. .HasColumnType("datetime2")
  3376. .HasComment("创建时间");
  3377. b.Property<string>("desc")
  3378. .HasMaxLength(100)
  3379. .HasColumnType("nvarchar(100)")
  3380. .HasComment("描述");
  3381. b.Property<long?>("factory_id")
  3382. .HasColumnType("bigint")
  3383. .HasComment("工厂ID");
  3384. b.Property<int?>("level")
  3385. .HasColumnType("int")
  3386. .HasComment("效率计算层级");
  3387. b.Property<long?>("org_id")
  3388. .HasColumnType("bigint")
  3389. .HasComment("组织ID");
  3390. b.Property<string>("tech_name")
  3391. .IsRequired()
  3392. .HasMaxLength(100)
  3393. .HasColumnType("nvarchar(100)")
  3394. .HasComment("工艺路径名称");
  3395. b.Property<long>("tenant_id")
  3396. .HasColumnType("bigint")
  3397. .HasComment("企业ID");
  3398. b.Property<long?>("update_by")
  3399. .HasColumnType("bigint")
  3400. .HasComment("修改人");
  3401. b.Property<string>("update_by_name")
  3402. .HasMaxLength(50)
  3403. .HasColumnType("nvarchar(50)")
  3404. .HasComment("修改人名称");
  3405. b.Property<DateTime?>("update_time")
  3406. .HasColumnType("datetime2")
  3407. .HasComment("修改时间");
  3408. b.HasKey("Id");
  3409. b.ToTable("mes_technique", (string)null);
  3410. b.HasComment("工艺路径表");
  3411. });
  3412. modelBuilder.Entity("Business.Model.Tech.mes_workshop", b =>
  3413. {
  3414. b.Property<long>("Id")
  3415. .HasColumnType("bigint");
  3416. b.Property<bool>("IsDeleted")
  3417. .ValueGeneratedOnAdd()
  3418. .HasColumnType("bit")
  3419. .HasDefaultValue(false)
  3420. .HasColumnName("IsDeleted")
  3421. .HasComment("删除标识");
  3422. b.Property<string>("building")
  3423. .HasMaxLength(100)
  3424. .HasColumnType("nvarchar(100)")
  3425. .HasComment("楼栋");
  3426. b.Property<long?>("create_by")
  3427. .HasColumnType("bigint")
  3428. .HasComment("创建人id");
  3429. b.Property<string>("create_by_name")
  3430. .HasMaxLength(50)
  3431. .HasColumnType("nvarchar(50)")
  3432. .HasComment("创建人名称");
  3433. b.Property<DateTime?>("create_time")
  3434. .HasColumnType("datetime2")
  3435. .HasComment("创建时间");
  3436. b.Property<long?>("factory_id")
  3437. .HasColumnType("bigint")
  3438. .HasComment("工厂ID");
  3439. b.Property<string>("floor")
  3440. .HasMaxLength(100)
  3441. .HasColumnType("nvarchar(100)")
  3442. .HasComment("楼层");
  3443. b.Property<string>("geoinfo")
  3444. .HasMaxLength(100)
  3445. .HasColumnType("nvarchar(100)")
  3446. .HasComment("坐标");
  3447. b.Property<string>("name")
  3448. .HasMaxLength(100)
  3449. .HasColumnType("nvarchar(100)")
  3450. .HasComment("工位名称");
  3451. b.Property<long?>("org_id")
  3452. .HasColumnType("bigint")
  3453. .HasComment("组织ID");
  3454. b.Property<string>("subids")
  3455. .HasMaxLength(2000)
  3456. .HasColumnType("nvarchar(2000)")
  3457. .HasComment("组合工位ids");
  3458. b.Property<long>("tenant_id")
  3459. .HasColumnType("bigint")
  3460. .HasComment("企业ID");
  3461. b.Property<long?>("update_by")
  3462. .HasColumnType("bigint")
  3463. .HasComment("修改人");
  3464. b.Property<string>("update_by_name")
  3465. .HasMaxLength(50)
  3466. .HasColumnType("nvarchar(50)")
  3467. .HasComment("修改人名称");
  3468. b.Property<DateTime?>("update_time")
  3469. .HasColumnType("datetime2")
  3470. .HasComment("修改时间");
  3471. b.Property<long?>("work_calendar_id")
  3472. .HasColumnType("bigint")
  3473. .HasComment("工作日历id");
  3474. b.Property<string>("zone")
  3475. .HasMaxLength(100)
  3476. .HasColumnType("nvarchar(100)")
  3477. .HasComment("区域");
  3478. b.HasKey("Id");
  3479. b.ToTable("mes_workshop", (string)null);
  3480. b.HasComment("工位表(工作中心)");
  3481. });
  3482. #pragma warning restore 612, 618
  3483. }
  3484. }
  3485. }