BusinessMigrationDbContextModelSnapshot.cs 177 KB

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