20230619062335_AddIndex.Designer.cs 176 KB

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