20230620015923_addtable20230620.Designer.cs 178 KB

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