| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839 |
- using System;
- using Microsoft.EntityFrameworkCore.Metadata;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Business.Migrations
- {
- public partial class init : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.AlterDatabase()
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_flow",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- FormId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- Title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Code = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- UseDate = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Level = table.Column<int>(type: "int", nullable: false),
- Remark = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Status = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- CreationTime = table.Column<DateTime>(type: "datetime", nullable: false),
- CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- LastModificationTime = table.Column<DateTime>(type: "datetime", nullable: true),
- LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_flow", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_flow_line",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- BaseFlowId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- Label = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- From = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- To = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Remark = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_flow_line", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_flow_line_form",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- BaseFlowId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- FlowLineId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- FieldId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- FieldName = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- FieldType = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Condition = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- IntContent = table.Column<int>(type: "int", nullable: false),
- Content = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Remark = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_flow_line_form", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_flow_node",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- BaseFlowId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- NodeId = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Left = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Top = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Ico = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- State = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Executor = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Users = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Roles = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Remark = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_flow_node", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_form",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- Api = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- FormName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- DisplayName = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Description = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Disabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- Namespace = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- EntityName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- TableName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Remark = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- CreationTime = table.Column<DateTime>(type: "datetime", nullable: false),
- CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- LastModificationTime = table.Column<DateTime>(type: "datetime", nullable: true),
- LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_form", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_form_datas",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- FormId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- Data = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- CreationTime = table.Column<DateTime>(type: "datetime", nullable: false),
- CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- LastModificationTime = table.Column<DateTime>(type: "datetime", nullable: true),
- LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_form_datas", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_form_fields",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- FormId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- FieldType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- DataType = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- FieldName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Label = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Placeholder = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- DefaultValue = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- FieldOrder = table.Column<int>(type: "int", nullable: false),
- Icon = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Maxlength = table.Column<int>(type: "int", nullable: true),
- IsReadonly = table.Column<bool>(type: "tinyint(1)", nullable: false),
- IsRequired = table.Column<bool>(type: "tinyint(1)", nullable: false),
- IsIndex = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- IsSort = table.Column<bool>(type: "tinyint(1)", nullable: false),
- Disabled = table.Column<bool>(type: "tinyint(1)", nullable: false),
- Regx = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Span = table.Column<int>(type: "int", nullable: false, defaultValue: 24),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_form_fields", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_form_fields_opts",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- FormId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- FormFieldId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- Label = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- Value = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_form_fields_opts", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "base_form_workflow",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
- FormId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- BaseFlowId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- EntityId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
- Status = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
- NodeId = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
- .Annotation("MySql:CharSet", "utf8mb4"),
- CreationTime = table.Column<DateTime>(type: "datetime", nullable: false),
- CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
- LastModificationTime = table.Column<DateTime>(type: "datetime", nullable: true),
- LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_base_form_workflow", x => x.Id);
- })
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "crm_customer",
- columns: table => new
- {
- customer_id = table.Column<long>(type: "bigint", nullable: false, comment: "客户主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- customer_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "客户编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- customer_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- customer_level = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户级别")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mobile = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "手机号码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- telephone = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "电话号码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- email = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "邮件地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- contact = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "联系人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- post_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "邮政编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- country = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "国别地区")
- .Annotation("MySql:CharSet", "utf8mb4"),
- province = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "省份")
- .Annotation("MySql:CharSet", "utf8mb4"),
- city = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "城市")
- .Annotation("MySql:CharSet", "utf8mb4"),
- region = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "区")
- .Annotation("MySql:CharSet", "utf8mb4"),
- address = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sale_mode = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "销售模式")
- .Annotation("MySql:CharSet", "utf8mb4"),
- short_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户简称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- short_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户简码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- state = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- value_add_rate = table.Column<decimal>(type: "decimal(18,10)", precision: 18, scale: 10, nullable: true, comment: "增值税率"),
- carrying_aos = table.Column<int>(type: "int", nullable: false, comment: "默认运输提前期_天"),
- corperate = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "法人代表")
- .Annotation("MySql:CharSet", "utf8mb4"),
- currency = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "结算币种")
- .Annotation("MySql:CharSet", "utf8mb4"),
- employee_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "专营业务员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- employee_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "专营业务员_工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- op_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
- cust_type_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户类别编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- cust_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户类别")
- .Annotation("MySql:CharSet", "utf8mb4"),
- cust_group_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户分组编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- cust_group_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户分组名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_crm_customer", x => x.customer_id);
- },
- comment: "客户表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "crm_seorder",
- columns: table => new
- {
- seorder_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- bill_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "订单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_type = table.Column<int>(type: "int", nullable: true, comment: "订单类别(销售、计划)"),
- trade_type = table.Column<int>(type: "int", nullable: true, comment: "贸易类型"),
- sale_style = table.Column<int>(type: "int", nullable: true, comment: "销售订单类型"),
- sale_style_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售订单类型编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- custom_id = table.Column<int>(type: "int", nullable: true, comment: "客户id"),
- custom_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "客户名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- custom_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "客户编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- custom_level = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "客户级别")
- .Annotation("MySql:CharSet", "utf8mb4"),
- date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "签订日期"),
- rdate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "采购下单日期"),
- urgent = table.Column<int>(type: "int", nullable: true, comment: "加急级别"),
- currency = table.Column<int>(type: "int", maxLength: 50, nullable: true, comment: "币种"),
- exchange_rate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "汇率"),
- biller = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "制单人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- emp_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "业务员工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- emp_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "业务员名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- auditor = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "审核人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- audit_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "审核日期"),
- status = table.Column<int>(type: "int", nullable: true, comment: "订单状态"),
- closed = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否关闭1关闭0未关闭"),
- op_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
- bill_from = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "订单来源")
- .Annotation("MySql:CharSet", "utf8mb4"),
- project_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "项目名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- project_code = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "项目编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- out_stock_type = table.Column<int>(type: "int", nullable: true, comment: "销售出库类型"),
- sale_dept_id = table.Column<long>(type: "bigint", nullable: true, comment: "销售部门id"),
- sale_dept_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售部门名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sale_dept_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售部门编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_dept = table.Column<long>(type: "bigint", nullable: true, comment: "创建部门id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_crm_seorder", x => x.seorder_id);
- },
- comment: "销售订单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "crm_seorderentry",
- columns: table => new
- {
- seorderentry_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单明细表id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- seorder_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单id"),
- bill_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "销售订单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- entry_seq = table.Column<int>(type: "int", nullable: true, comment: "行号"),
- map_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "对应代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- map_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "代码名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- item_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "产品代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fms_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "FMS旧料号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- item_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "产品名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- specification = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- urgent = table.Column<int>(type: "int", nullable: true, comment: "加急级别"),
- bom_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "BOM编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "订单数量"),
- price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "单价"),
- tax_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "含税单价"),
- amount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "金额"),
- tax_rate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "税率"),
- discount_rate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "折扣率"),
- discount_amount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "折扣额"),
- aux_price_discount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "实际含税单价"),
- tax_amtount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "销项税额"),
- total_amount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "价税合计"),
- plan_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "客户要求交期"),
- date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最终交货日期"),
- planner_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "计划员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "计划员_工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- soure_bill_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "源单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- custom_order_bill_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "客户订单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- custom_order_entryid = table.Column<int>(type: "int", nullable: true, comment: "客户订单行号"),
- sys_capacity_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "系统建议交期(产能)"),
- adjust_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "调整建议交期"),
- mrp_closed = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "mrp关闭"),
- op_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
- custom_order_itemno = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "客户料号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- state = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "数据状态标识 0停用 1启用"),
- rstate = table.Column<int>(type: "int", nullable: true, comment: "评审状态"),
- rnumber = table.Column<int>(type: "int", nullable: true, comment: "评审次数"),
- progress = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "订单进度")
- .Annotation("MySql:CharSet", "utf8mb4"),
- deliver_notice_count = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "发货通知单数量"),
- deliver_count = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "发货数量(已出库数量)"),
- se_reject_reason = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "业务员工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- out_stock_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "出库类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_checked = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "是否完成检测,0未完成,1完成"),
- sys_material_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "系统建议交期(物料)"),
- contract_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "合同编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_dept = table.Column<long>(type: "bigint", nullable: true, comment: "创建部门id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_crm_seorderentry", x => x.seorderentry_id);
- },
- comment: "销售订单明细表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "crm_seorderprog",
- columns: table => new
- {
- seorderprog_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单进度表")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- seorder_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单id"),
- bill_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售订单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- entry_seq = table.Column<int>(type: "int", nullable: true, comment: "销售订单行号"),
- seprog_type = table.Column<int>(type: "int", nullable: true, comment: "进度类型"),
- seprog_stage = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "进度阶段")
- .Annotation("MySql:CharSet", "utf8mb4"),
- seprog_stage_id = table.Column<long>(type: "bigint", nullable: true, comment: "进度阶段id"),
- seprog_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- seprog_etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "完成时间"),
- seprog_by_id = table.Column<long>(type: "bigint", nullable: true, comment: "提交人id"),
- seprog_by_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "提交人姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_dept = table.Column<long>(type: "bigint", nullable: true, comment: "创建部门id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_crm_seorderprog", x => x.seorderprog_id);
- },
- comment: "销售订单进度表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "crm_seorderreview",
- columns: table => new
- {
- review_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单评审id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- seorder_id = table.Column<long>(type: "bigint", nullable: false, comment: "销售订单id"),
- review_type = table.Column<string>(type: "longtext", nullable: false, comment: "业务类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bill_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售订单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- entry_seq = table.Column<int>(type: "int", nullable: true, comment: "销售订单行号"),
- review_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "提交时间"),
- review_by_id = table.Column<long>(type: "bigint", nullable: true, comment: "提交人id"),
- review_by_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "提交人姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- review_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "评审时间"),
- reviewer_id = table.Column<long>(type: "bigint", nullable: true, comment: "评审人id"),
- reviewer_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "评审人姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- review_result = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "评审结果")
- .Annotation("MySql:CharSet", "utf8mb4"),
- reject_reason = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "拒绝原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- review_reject_level = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "拒绝等级")
- .Annotation("MySql:CharSet", "utf8mb4"),
- review_reject_remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "拒绝备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- review_adjust_time = table.Column<DateTime>(type: "datetime", maxLength: 255, nullable: true, comment: "可接受交期"),
- review_title = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "标题")
- .Annotation("MySql:CharSet", "utf8mb4"),
- audit_procedure_id = table.Column<long>(type: "bigint", nullable: true, comment: "当前审批步骤id"),
- audit_procedure_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "当前审批步骤名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_crm_seorderreview", x => x.review_id);
- },
- comment: "销售订单评审表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_bom",
- columns: table => new
- {
- bom_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- bom_number = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- item_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- item_name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bom_num = table.Column<int>(type: "int", nullable: false, comment: "序号"),
- fse_status = table.Column<int>(type: "int", nullable: false, comment: "使用状态"),
- begin_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生效日期"),
- end_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "失效日期"),
- tech_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺主键"),
- tech_name = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "工艺名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_principal = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "生产负责人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_designer = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "产品设计员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- version = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "版本")
- .Annotation("MySql:CharSet", "utf8mb4"),
- chartnumber = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "图表编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- biller = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "图片")
- .Annotation("MySql:CharSet", "utf8mb4"),
- checker = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "检验人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- check_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "检验时间"),
- user = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom创建人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- use_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "bom创建时间"),
- unit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_bom", x => x.bom_id);
- },
- comment: "物料BOM")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_bom_child",
- columns: table => new
- {
- bom_child_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- bom_id = table.Column<long>(type: "bigint", nullable: false, comment: "bom主键"),
- bom_number = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_bom = table.Column<int>(type: "int", nullable: false, comment: "是否是BOM"),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- item_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- item_name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "用量"),
- scrap = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "损耗率"),
- backflush = table.Column<int>(type: "int", nullable: false, comment: "是否倒冲"),
- iskeyitem = table.Column<int>(type: "int", nullable: false, comment: "是否关键件"),
- haveicsubs = table.Column<int>(type: "int", nullable: false, comment: "存在替代关系"),
- substitute_code = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "群组代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_replace = table.Column<int>(type: "int", nullable: false, comment: "是否群组替代"),
- icitem_ids = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "组合模式")
- .Annotation("MySql:CharSet", "utf8mb4"),
- note = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- entryid = table.Column<int>(type: "int", nullable: false, comment: "顺序号"),
- type = table.Column<int>(type: "int", nullable: false, comment: "物料类型"),
- erp_cls = table.Column<int>(type: "int", nullable: false, comment: "物料属性"),
- use_status = table.Column<int>(type: "int", nullable: false, comment: "使用状态"),
- begin_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生效日期"),
- end_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "失效日期"),
- op_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
- child_num = table.Column<int>(type: "int", nullable: false, comment: "序号"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_bom_child", x => x.bom_child_id);
- },
- comment: "物料BOM明细")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_factory_details",
- columns: table => new
- {
- icitem_dtl_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- factory_fode = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工厂编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- note = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "特殊备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_line = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "产品线")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pick_type = table.Column<long>(type: "bigint", nullable: false, comment: "领料类型"),
- batch_manager = table.Column<int>(type: "int", nullable: false, comment: "是否采用业务批次管理"),
- stock_time = table.Column<int>(type: "int", nullable: false, comment: "是否需要库龄管理"),
- check_cycunit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "盘点周期单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- check_cycle = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "盘点周期"),
- days_per = table.Column<int>(type: "int", nullable: false, comment: "每周_月第天"),
- last_checkdate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "上次盘点日期"),
- default_chkloc = table.Column<long>(type: "bigint", nullable: false, comment: "默认待检仓库"),
- default_chksp = table.Column<long>(type: "bigint", nullable: false, comment: "默认待检仓位"),
- default_loc = table.Column<long>(type: "bigint", nullable: false, comment: "默认仓库"),
- default_sp = table.Column<long>(type: "bigint", nullable: false, comment: "默认仓位"),
- item_shelve = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "货架信息")
- .Annotation("MySql:CharSet", "utf8mb4"),
- default_manager = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "默认仓管员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- low_limit = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "最低存量"),
- high_limit = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "最高存量"),
- qty_max = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "最大订货量"),
- daily_consume = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "日消耗量"),
- mcv_acct = table.Column<long>(type: "bigint", nullable: false, comment: "材料成本差异科目代码"),
- pcv_acct = table.Column<long>(type: "bigint", nullable: false, comment: "加工费差异科目代码"),
- sl_acct = table.Column<long>(type: "bigint", nullable: false, comment: "废品损失科目代码"),
- cav_acct = table.Column<long>(type: "bigint", nullable: false, comment: "标准成本调整差异科目代码"),
- warehouse_note = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "库存备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ordissu_days = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "工单发料时间/天"),
- raw_matreceiv_days = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "原材料收货处理时间/天"),
- prdenter_days = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "成品入库时间/天"),
- mat_enter_days = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "原材料入库时间/天"),
- prd_out_days = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "成品发货时间/天"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_factory_details", x => x.icitem_dtl_id);
- },
- comment: "工厂物料明细表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_item",
- columns: table => new
- {
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- model = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- full_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "全名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fms_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "fms旧料号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- erp_oldnumber = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "erp旧料号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- chart_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "图号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fversion = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "版本号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- box_model = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "盒贴规格")
- .Annotation("MySql:CharSet", "utf8mb4"),
- erp_cls = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料属性")
- .Annotation("MySql:CharSet", "utf8mb4"),
- item_level = table.Column<long>(type: "bigint", nullable: false, comment: "物料等级"),
- hb_level = table.Column<long>(type: "bigint", nullable: false, comment: "环保等级"),
- standard_manhour = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "单位标准工时_小时"),
- unititem_amount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "单位材料定额_元"),
- source = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "来源")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_equipment = table.Column<int>(type: "int", nullable: false, comment: "是否为设备"),
- unit_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "单位包装数量"),
- check_bybarcode = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "严格进行二维码数量校验")
- .Annotation("MySql:CharSet", "utf8mb4"),
- iskeyitem = table.Column<int>(type: "int", nullable: false, comment: "是否关键件"),
- gross_weight = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "毛重"),
- net_weight = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "净重"),
- maund = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "重量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- length = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "长度"),
- cubic_measure = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "长度单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- width = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "宽度"),
- height = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "高度"),
- size = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "体积"),
- matatt = table.Column<long>(type: "bigint", nullable: false, comment: "物料类别"),
- allowpur = table.Column<int>(type: "int", nullable: false, comment: "允许采购"),
- allowsale = table.Column<int>(type: "int", nullable: false, comment: "允许销售"),
- allowmanu = table.Column<int>(type: "int", nullable: false, comment: "允许生产"),
- allowout = table.Column<int>(type: "int", nullable: false, comment: "允许委外"),
- allowbatch = table.Column<int>(type: "int", nullable: false, comment: "批号管理"),
- allowserial = table.Column<int>(type: "int", nullable: false, comment: "序列号管理"),
- photo = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "图片")
- .Annotation("MySql:CharSet", "utf8mb4"),
- picktype = table.Column<long>(type: "bigint", nullable: false, comment: "领料类型"),
- output_type_id = table.Column<long>(type: "bigint", nullable: false, comment: "出库类型"),
- enable_warning = table.Column<int>(type: "int", nullable: false, comment: "启用预警"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_item", x => x.icitem_id);
- },
- comment: "物料详情")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_item_ie",
- columns: table => new
- {
- ic_item_ie_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- isbackflush = table.Column<int>(type: "int", nullable: false, comment: "是否倒冲"),
- product_principal = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "生产负责人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- back_flush_stock = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "倒冲仓库")
- .Annotation("MySql:CharSet", "utf8mb4"),
- back_flush_sp = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "倒冲仓位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- put_integer = table.Column<int>(type: "int", nullable: false, comment: "投料自动取整"),
- ir_note = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "ie备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_item_ie", x => x.ic_item_ie_id);
- },
- comment: "物料ie信息表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_item_inventory",
- columns: table => new
- {
- icitem_inventory_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_stock_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料库存主键"),
- stock_id = table.Column<long>(type: "bigint", nullable: false, comment: "仓库id"),
- stock_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "仓库名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- stock_place_id = table.Column<long>(type: "bigint", nullable: false, comment: "库位id"),
- stock_place_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "库位编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- batch_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "批次号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "数量"),
- bal = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "金额"),
- kf_period = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "保质期时长"),
- kf_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "保质期时间"),
- qty_lock = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "锁定库存"),
- sec_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "安全库存"),
- unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- rq = table.Column<DateTime>(type: "datetime", nullable: true, comment: "日期"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_item_inventory", x => x.icitem_inventory_id);
- },
- comment: "物料库存信息表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_item_pur",
- columns: table => new
- {
- icitem_pur_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ic_plan_id = table.Column<long>(type: "bigint", nullable: false, comment: "采购计划id"),
- supplier_id = table.Column<long>(type: "bigint", nullable: false, comment: "供应商id"),
- supplier_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supplier_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- purchgroup = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购组")
- .Annotation("MySql:CharSet", "utf8mb4"),
- purcher = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- purchase_unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- netpurchase_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购净价(不含税)"),
- taxrate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "税率"),
- currency_type = table.Column<long>(type: "bigint", nullable: false, comment: "币种"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_item_pur", x => x.icitem_pur_id);
- },
- comment: "物料采购报价单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_item_stock",
- columns: table => new
- {
- icitem_stock_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "物料库存量"),
- quantity_in_transit = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "调拨在途数量"),
- factory_fode = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工厂编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_item_stock", x => x.icitem_stock_id);
- },
- comment: "物料库存表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_metering_unit",
- columns: table => new
- {
- ic_metering_unit_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit_group = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计量单位组")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "基本计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sale_unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "生产计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- store_unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "库存计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty_decimal = table.Column<int>(type: "int", nullable: false, comment: "数量精度"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_metering_unit", x => x.ic_metering_unit_id);
- },
- comment: "物料计量表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_plan",
- columns: table => new
- {
- ic_plan_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计划员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计划员_工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- factory_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工厂编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fix_leadtime = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "固定提前期(天)"),
- plan_trategy = table.Column<int>(type: "int", nullable: false, comment: "计划策略"),
- order_trategy = table.Column<int>(type: "int", nullable: false, comment: "订货策略"),
- order_inter_val = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "订货间隔期_天"),
- lead_time = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "变动提前期"),
- bat_change_economy = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "变动提前期批量"),
- total_tqq = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "累计提前期"),
- order_point = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "再订货点")
- .Annotation("MySql:CharSet", "utf8mb4"),
- isfixedreorder = table.Column<int>(type: "int", nullable: false, comment: "设置为固定再订货点"),
- secinv = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "安全库存数量"),
- secinv_ratio = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "安全库存触发采购比例"),
- book_plan = table.Column<int>(type: "int", nullable: false, comment: "是否需要进行订补货计划的运算"),
- aux_prop_plan = table.Column<int>(type: "int", nullable: false, comment: "辅助属性参与计划运算"),
- plannote = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "计划备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_plan", x => x.ic_plan_id);
- },
- comment: "物料采购计划表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_substitute",
- columns: table => new
- {
- substitute_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- substitute_code = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "群组代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- substitute_type = table.Column<int>(type: "int", nullable: false, comment: "替代类型"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_substitute", x => x.substitute_id);
- },
- comment: "替代群组")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_substitute_all",
- columns: table => new
- {
- substitute_allid = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- substitute_id = table.Column<long>(type: "bigint", nullable: false, comment: "群组主键"),
- substitute_code = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "群组代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- replace_relation = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "替代关系")
- .Annotation("MySql:CharSet", "utf8mb4"),
- replace_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "替代名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- replace_way = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "替代方式")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_line = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "产品线")
- .Annotation("MySql:CharSet", "utf8mb4"),
- use_model = table.Column<string>(type: "varchar(5000)", maxLength: 5000, nullable: true, comment: "使用机型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_num = table.Column<int>(type: "int", nullable: false, comment: "排序"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_substitute_all", x => x.substitute_allid);
- },
- comment: "物料替代多群组")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "ic_substitute_all_dtl",
- columns: table => new
- {
- substitute_dtlid = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- substitute_allid = table.Column<long>(type: "bigint", nullable: false, comment: "替代多群组主键"),
- substitute_code = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "群组代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料主键"),
- ismain = table.Column<int>(type: "int", nullable: false, comment: "主/替"),
- use_amount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "使用数量"),
- replace_amount = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "替代数量"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ic_substitute_all_dtl", x => x.substitute_dtlid);
- },
- comment: "物料替代多群组明细")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_loss_time_record",
- columns: table => new
- {
- loss_time_record_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键ID")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- morder_id = table.Column<long>(type: "bigint", nullable: false, comment: "工单id"),
- morder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "工单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "损失开始时间"),
- end_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "损失结束时间"),
- product_org = table.Column<long>(type: "bigint", nullable: false, comment: "生产车间"),
- product_line = table.Column<long>(type: "bigint", nullable: false, comment: "生产产线"),
- record_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "记录时间"),
- record_id = table.Column<long>(type: "bigint", nullable: false, comment: "记录人id"),
- record_no = table.Column<string>(type: "longtext", nullable: false, comment: "记录人工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- isstop = table.Column<int>(type: "int", nullable: false, comment: "是否停线"),
- cause = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- desc = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "问题描述")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_loss_time_record", x => x.loss_time_record_id);
- },
- comment: "损失时间记录表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_meaction",
- columns: table => new
- {
- meaction_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产动作Id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- morder_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单id"),
- morder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- oprtime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
- oprtype = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "操作类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- oprby = table.Column<long>(type: "bigint", nullable: true, comment: "操作人id"),
- oprbyname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "操作人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- oprbyno = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "操作人工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_meaction", x => x.meaction_id);
- },
- comment: "生产动作表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_mebycard",
- columns: table => new
- {
- mebycard_id = table.Column<long>(type: "bigint", nullable: false, comment: "刷卡id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- mebycard_moid = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单号id"),
- mebycard_mono = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mebycard_pid = table.Column<long>(type: "bigint", nullable: false, comment: "工序id"),
- mebycard_pno = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "工序编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mebycard_pname = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "工序名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mebycard_byno = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "刷卡人员卡号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mebycard_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "刷卡时间"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_mebycard", x => x.mebycard_id);
- },
- comment: "产线刷卡记录")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_merecheck",
- columns: table => new
- {
- merecheck_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产报检记录Id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- morder_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单id"),
- morder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: false, comment: "报检数量"),
- oprtime = table.Column<DateTime>(type: "datetime", nullable: false, comment: "报检时间"),
- oprby = table.Column<long>(type: "bigint", nullable: false, comment: "报检人id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_merecheck", x => x.merecheck_id);
- },
- comment: "生产报检记录")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_mereport",
- columns: table => new
- {
- mereport_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产报工记录Id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- morder_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单id"),
- morder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: false, comment: "报工数量"),
- report_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "报工时间"),
- report_by = table.Column<long>(type: "bigint", nullable: false, comment: "报工人id"),
- report_byno = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "报工人工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- instock_qty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: false, comment: "报工数量"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_mereport", x => x.mereport_id);
- },
- comment: "生产报工记录")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_moentry",
- columns: table => new
- {
- moentry_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单子表id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- moentry_moid = table.Column<long>(type: "bigint", nullable: false, comment: "工单主表id"),
- moentry_mono = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "工单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- soentry_id = table.Column<long>(type: "bigint", nullable: false, comment: "订单行id"),
- fentry_id = table.Column<long>(type: "bigint", nullable: false, comment: "订单行号"),
- fbill_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "订单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_production_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "工单生产数量(计划数量)"),
- need_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "需求数量"),
- remaining_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "剩余可用数量"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_moentry", x => x.moentry_id);
- },
- comment: "生成工单子表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_mooccupy",
- columns: table => new
- {
- moo_id = table.Column<long>(type: "bigint", nullable: false, comment: "工单占用ID")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- moo_id_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "类型--原始,分配")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moo_id_billid = table.Column<long>(type: "bigint", nullable: false, comment: "订单id"),
- fbill_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "订单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fentry_id = table.Column<long>(type: "bigint", nullable: false, comment: "行号"),
- fitem_number = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_name = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fmodel = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moo_moid = table.Column<long>(type: "bigint", nullable: false, comment: "工单id"),
- moo_mo = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moo_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "占用量"),
- moo_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- moo_etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
- moo_state = table.Column<int>(type: "int", nullable: false, comment: "占用状态-1占用 默认0"),
- moo_cbr = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "变更人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moo_ctime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "变更时间"),
- moo_creason = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "变更原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_mooccupy", x => x.moo_id);
- },
- comment: "在制工单占用记录表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_morder",
- columns: table => new
- {
- morder_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- parent_id = table.Column<long>(type: "bigint", nullable: true, comment: "上级工单id"),
- relation_moid = table.Column<long>(type: "bigint", nullable: true, comment: "关联工单id"),
- relation_mono = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "关联编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "生产工单类型(类型:计划工单、销售工单、委外工单、预测工单)")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_icitem_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "工单所属物料类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- work_order_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "工单类型(类型:发货工单、试产工单、备库工单、常规工单、返工工单)")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生产工单日期"),
- morder_state = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "生产工单状态(订单状态:初始,下达,暂停、完成)")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moentry_prd = table.Column<long>(type: "bigint", nullable: true, comment: "生产组织id"),
- moentry_prdname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "生产组织名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moentry_wrkc = table.Column<long>(type: "bigint", nullable: true, comment: "工作中心id"),
- moentry_wrkcname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "工作中心名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计划员工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计划员名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- moentry_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生产工单开始日期"),
- moentry_etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生产工单结束日期"),
- moentry_sys_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "系统建议开工时间"),
- moentry_sys_etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "系统建议完工时间"),
- reality_start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "实际开始时间"),
- reality_end_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "实际结束时间"),
- planner_start_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划员设定开始时间"),
- planner_end_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划员设定结束时间"),
- mat_start_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "基于物料开始时间"),
- mat_end_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "基于物料结束时间"),
- product_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "产品代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_name = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "产品名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fms_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "fms旧料号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fmodel = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bom_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "bom编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_progress = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "工单进度")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_need_time = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "工单所需工时"),
- work_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "报工数量"),
- inspection_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "报检数量"),
- qualified_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "合格数量"),
- inventory_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "入库数量"),
- notice_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "已开入库通知单数量"),
- moentry_startup_status = table.Column<int>(type: "int", nullable: true, comment: "启动状态"),
- start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- pause_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最近暂停时间"),
- restart_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最近重启时间"),
- project_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "项目名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- overdue_Remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "逾期原因备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- picking_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "已领料数量"),
- morder_fstate = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "前状态--计划、下达、完成、关闭")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_batchno = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "工单批号--(批号管理的物料出入库要使用)")
- .Annotation("MySql:CharSet", "utf8mb4"),
- convey_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "下达日期"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_morder", x => x.morder_id);
- },
- comment: "工单主表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_morder_loss_time",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "工单损失时间主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- morder_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单id"),
- morder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_no_row = table.Column<int>(type: "int", nullable: false, comment: "生产工单编号"),
- start_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "损失开始时间"),
- end_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "损失结束时间"),
- recorder_id = table.Column<long>(type: "bigint", nullable: false, comment: "记录人id"),
- recorder_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, comment: "记录人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- staff_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: false, comment: "人员数量"),
- loss_work_hours = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: false, comment: "损失时间(用户输入)"),
- sys_loss_time = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: false, comment: "系统计算损失时间"),
- workc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工作中心id"),
- workc_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "工作中心名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- dept_id = table.Column<long>(type: "bigint", nullable: false, comment: "责任单位id"),
- dept_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "责任单位名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- reason = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, comment: "损失时间原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- description = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "描述")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_stop_production = table.Column<int>(type: "int", nullable: false, comment: "是否停产(0未停产,1停产)"),
- card_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "用工卡号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_morder_loss_time", x => x.id);
- },
- comment: "工单损失时间表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_oorder",
- columns: table => new
- {
- oorder_id = table.Column<long>(type: "bigint", nullable: false, comment: "委外订单id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- oorder_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "生产工单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- oorder_type = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "生产工单类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- oorder_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "委外订单日期"),
- oorder_state = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "订单状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ooentry_prd = table.Column<long>(type: "bigint", nullable: true, comment: "生产组织"),
- ooentry_prdname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "生产组织名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ooentry_wrkc = table.Column<long>(type: "bigint", nullable: true, comment: "工作中心id"),
- ooentry_wrkcname = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "工作中心名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计划员工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- planner_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计划员名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ooentry_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划开工日期"),
- ooentry_etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划完工日期"),
- product_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "产品代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ffms_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "fms旧料号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_name = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "产品名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- specification_model = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bom_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "bom编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_progress = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "工单进度")
- .Annotation("MySql:CharSet", "utf8mb4"),
- morder_production_number = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "工单生产数量(计划数量)"),
- need_number = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "需求数量"),
- remaining_number = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "剩余可用数量"),
- work_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "报工数量"),
- inspection_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "报检数量"),
- qualified_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "合格数量"),
- inventory_number = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "入库数量"),
- notice_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "已开通知单数量"),
- moentry_on = table.Column<int>(type: "int", nullable: true, comment: "启动状态"),
- start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- pause_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最近暂停时间"),
- restart_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "最近重启时间"),
- project_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "项目名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sent_status = table.Column<int>(type: "int", nullable: true, comment: "发料状态 1-待发料 2-已发料"),
- production_unit = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "加工单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- production_unit_code = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "加工单位编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- need_icitem_status = table.Column<int>(type: "int", nullable: true, comment: "加工单位编码"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_oorder", x => x.oorder_id);
- },
- comment: "委外订单表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_prd_sendmat",
- columns: table => new
- {
- prdsm_id = table.Column<long>(type: "bigint", nullable: false, comment: "发料单id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- prdsm_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "单据类型 (发料、叫料、补料、退料)")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "单据编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_date = table.Column<DateTime>(type: "datetime", nullable: false, comment: "单据日期"),
- prdsm_prdid = table.Column<long>(type: "bigint", nullable: false, comment: "生产组织id"),
- prdsm_workcid = table.Column<long>(type: "bigint", nullable: false, comment: "工作中心id"),
- prdsm_moid = table.Column<long>(type: "bigint", nullable: false, comment: "生产工单id"),
- prdsm_mono = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "生产工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_by = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "制单人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_note = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_state = table.Column<int>(type: "int", nullable: true, comment: "状态"),
- prdsm_reason = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "补料理由")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_qty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: false, comment: "叫料数量"),
- prdsm_ddate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "配送日期"),
- prdsm_po_no = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "关联委外po单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_po_row = table.Column<int>(type: "int", nullable: true, comment: "关联委外po行号"),
- srcbill_type = table.Column<int>(type: "int", nullable: false, comment: "原单类型"),
- srcbill_state = table.Column<int>(type: "int", nullable: false, comment: "源单状态")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_prd_sendmat", x => x.prdsm_id);
- },
- comment: "发料单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_prd_sendmat_list",
- columns: table => new
- {
- prdsml_id = table.Column<long>(type: "bigint", nullable: false, comment: "发料单详情id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- prdsm_id = table.Column<long>(type: "bigint", nullable: false, comment: "发料单id"),
- prdsml_procno = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "工序编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsml_procname = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工序名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_number = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fmodel = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsml_qtyper = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "单位数量"),
- prdsml_cqtyper = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "确认单位数量"),
- prdsml_unit = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsml_qtyto = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "应发数量"),
- prdsml_qtyplan = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "计划数量"),
- prdsml_qtyissued = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: false, comment: "已发数量"),
- prdsml_whid = table.Column<long>(type: "bigint", nullable: false, comment: "发料仓库id"),
- prdsml_whno = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "发料仓库编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsml_whname = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "发料仓库名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdsm_breason = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "退料原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fbackflush = table.Column<int>(type: "int", nullable: true, comment: "是否倒冲"),
- prsml_row = table.Column<int>(type: "int", nullable: true, comment: "行号"),
- fmateriel_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "子项属性")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fisKey_item = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "子项属性")
- .Annotation("MySql:CharSet", "utf8mb4"),
- send_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划发料日期"),
- station = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, comment: "工位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fdiscard_aux_qty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "报废数量"),
- fqty_supply = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "补料数量"),
- fqty_send_back = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "退料数量"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_prd_sendmat_list", x => x.prdsml_id);
- },
- comment: "发料单详情")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_prdlog",
- columns: table => new
- {
- prdlog_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产操作日志id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- prdlog_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "业务类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdlog_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "业务类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdlog_entryid = table.Column<int>(type: "int", nullable: false, comment: "行号"),
- prdlog_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "执行时间"),
- prdlog_by_id = table.Column<long>(type: "bigint", nullable: true, comment: "执行人id"),
- prdlog_by_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "执行人姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdlog_note = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "内容")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_prdlog", x => x.prdlog_id);
- },
- comment: "生产操作日志")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_process",
- columns: table => new
- {
- proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工序主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- proc_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "工序名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- short_desc = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true, comment: "简述")
- .Annotation("MySql:CharSet", "utf8mb4"),
- long_desc = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "详细描述")
- .Annotation("MySql:CharSet", "utf8mb4"),
- subids = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "组合工序id")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_process", x => x.proc_id);
- },
- comment: "工序表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_product_work_time",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "生产时间记录id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- work_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生产时间记录id"),
- start = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- stop = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
- card_no = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "卡号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_line = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "产线")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_product_work_time", x => x.id);
- },
- comment: "mo的生产时间记录")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_schedule_occupy",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "排程时间占用记录id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- end_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
- working_minute = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "工作时长(h)"),
- status = table.Column<int>(type: "int", nullable: false, comment: "状态 0-待使用,1-已使用"),
- is_Locked = table.Column<int>(type: "int", nullable: false, comment: "是否锁定 0-正常,1-锁定"),
- prd_org_id = table.Column<long>(type: "bigint", nullable: false, comment: "生产组织id"),
- work_center_id = table.Column<long>(type: "bigint", nullable: false, comment: "工作中心id"),
- work_calendar_id = table.Column<long>(type: "bigint", nullable: false, comment: "工作日历id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_schedule_occupy", x => x.id);
- },
- comment: "排程时间占用记录表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_stock_enter",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "入库单id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- fitem_number = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ffull_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "全名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fmodel = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- edate = table.Column<DateTime>(type: "datetime", nullable: false, comment: "入库日期"),
- eqty = table.Column<int>(type: "int", nullable: false, comment: "入库数量"),
- eby = table.Column<long>(type: "bigint", nullable: false, comment: "入库人id"),
- ebyname = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "入库人姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_stock_enter", x => x.id);
- },
- comment: "入库单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_stock_out",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "出库单Id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- out_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "出库单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- stock_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "仓库名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- stock_no = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "仓库编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ffull_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "全名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fmodel = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "销售订单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_number = table.Column<int>(type: "int", nullable: true, comment: "订单行号"),
- shipn_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "发运通知单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- edate = table.Column<DateTime>(type: "datetime", nullable: false, comment: "出库日期"),
- eqty = table.Column<int>(type: "int", nullable: false, comment: "出库数量"),
- unit = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "计量单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- eby = table.Column<long>(type: "bigint", nullable: false, comment: "出库人id"),
- eby_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "出库人姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_stock_out", x => x.id);
- },
- comment: "出库单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_stockoccupy",
- columns: table => new
- {
- soccupy_id = table.Column<long>(type: "bigint", nullable: false, comment: "成品库存占用id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- soccupy_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- soentry_id = table.Column<long>(type: "bigint", nullable: true, comment: "订单行id"),
- fentry_id = table.Column<long>(type: "bigint", nullable: true, comment: "订单行号"),
- fbill_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "订单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_number = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fitem_name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fmodel = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "规格型号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- warehouse_id = table.Column<long>(type: "bigint", nullable: false, comment: "仓库id"),
- warehouse_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "仓库名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- warehouse_type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "仓库类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- occupyqty = table.Column<decimal>(type: "decimal(20,2)", precision: 20, scale: 2, nullable: true, comment: "占用量"),
- soccupy_stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- soccupy_etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
- soccupy_state = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "占用状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- soccupy_cby = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "变更人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- soccupy_ctime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "变更时间"),
- soccupy_creason = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "变更原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_stockoccupy", x => x.soccupy_id);
- },
- comment: "成品库存占用表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_swipe_card",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "mes打卡记录id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- product_org = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, comment: "生产车间")
- .Annotation("MySql:CharSet", "utf8mb4"),
- product_line = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: false, comment: "生产产线")
- .Annotation("MySql:CharSet", "utf8mb4"),
- card_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "卡号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "工单编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- up_line_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "上线时间"),
- off_line_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "下线时间"),
- type = table.Column<int>(type: "int", nullable: false, comment: "刷卡类型"),
- swipe_date = table.Column<DateTime>(type: "datetime", nullable: false, comment: "刷卡日期")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_swipe_card", x => x.id);
- },
- comment: "mes打卡记录表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_proc_accessory",
- columns: table => new
- {
- tech_proc_acc_id = table.Column<long>(type: "bigint", nullable: false, comment: "治具主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序主键"),
- equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "工装id"),
- equip_no = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "工装编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<int>(type: "int", nullable: false, comment: "数量"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_proc_accessory", x => x.tech_proc_acc_id);
- },
- comment: "治具表(工装表)")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_proc_document",
- columns: table => new
- {
- tech_proc_doc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工序作业指导书主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序主键"),
- upload_id = table.Column<long>(type: "bigint", nullable: false, comment: "作业指导书主键"),
- name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "作业指导书名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_proc_document", x => x.tech_proc_doc_id);
- },
- comment: "工序作业指导书表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_proc_workshop",
- columns: table => new
- {
- tech_proc_workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工位表主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序id"),
- workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工位id"),
- serialno = table.Column<int>(type: "int", nullable: true, comment: "序列号"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_proc_workshop", x => x.tech_proc_workshop_id);
- },
- comment: "工艺路径关联工位表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_proc_workshop_equipment",
- columns: table => new
- {
- tech_proc_equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "设备id"),
- equip_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "设备名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序id"),
- work_calendar_id = table.Column<long>(type: "bigint", nullable: true, comment: "工作日历id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_proc_workshop_equipment", x => x.tech_proc_equip_id);
- },
- comment: "工艺路径关联设备表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_proc_workshop_icitem",
- columns: table => new
- {
- tech_proc_icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序id"),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- qty = table.Column<int>(type: "int", nullable: false, comment: "数量"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_proc_workshop_icitem", x => x.tech_proc_icitem_id);
- },
- comment: "发料到工位表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_proc_workshop_staff",
- columns: table => new
- {
- tech_proc_workshop_equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_proc_workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工位id"),
- staff_id = table.Column<long>(type: "bigint", nullable: false, comment: "员工id"),
- staff_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "员工姓名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_proc_workshop_staff", x => x.tech_proc_workshop_equip_id);
- },
- comment: "工序工位员工信息表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_tech_process",
- columns: table => new
- {
- tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺主键"),
- proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工序主键"),
- level = table.Column<int>(type: "int", nullable: false, comment: "组合层级"),
- is_schedule = table.Column<int>(type: "int", nullable: false, comment: "是否需要排产:1-是;0-否"),
- readytime = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "前置准备时间"),
- type = table.Column<int>(type: "int", nullable: false, comment: "效率计算类型 1-节拍时间;2-UPH"),
- uph = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "UPH"),
- ct = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "节拍时间"),
- effect_ratio = table.Column<decimal>(type: "decimal(10,4)", precision: 10, scale: 4, nullable: true, comment: "效率系数"),
- mototrack = table.Column<int>(type: "int", nullable: true, comment: "是否需要跟踪工序"),
- nextprocid = table.Column<long>(type: "bigint", nullable: true, comment: "下一工序id"),
- parentprocid = table.Column<long>(type: "bigint", nullable: true, comment: "父级工序id"),
- needqc = table.Column<int>(type: "int", nullable: true, comment: "是否需要质检"),
- maxworkshop = table.Column<int>(type: "int", nullable: true, comment: "最大并行工位数"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_tech_process", x => x.tech_proc_id);
- },
- comment: "工艺关联工序表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_technique",
- columns: table => new
- {
- tech_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺路径主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- tech_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false, comment: "工艺路径名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- level = table.Column<int>(type: "int", nullable: false, comment: "效率计算层级"),
- bom = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "产品")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bomver = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "产品版本")
- .Annotation("MySql:CharSet", "utf8mb4"),
- desc = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "描述")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_technique", x => x.tech_id);
- },
- comment: "工艺路径表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_workshop",
- columns: table => new
- {
- workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工位表主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "工位名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- subids = table.Column<string>(type: "varchar(2000)", maxLength: 2000, nullable: true, comment: "组合工位ids")
- .Annotation("MySql:CharSet", "utf8mb4"),
- geoinfo = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "坐标")
- .Annotation("MySql:CharSet", "utf8mb4"),
- building = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "楼栋")
- .Annotation("MySql:CharSet", "utf8mb4"),
- floor = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "楼层")
- .Annotation("MySql:CharSet", "utf8mb4"),
- zone = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "区域")
- .Annotation("MySql:CharSet", "utf8mb4"),
- work_calendar_id = table.Column<long>(type: "bigint", nullable: true, comment: "工作日历id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_workshop", x => x.workshop_id);
- },
- comment: "工位表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "mes_workshop_shelf",
- columns: table => new
- {
- workshop_shelf_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工位id"),
- serialno = table.Column<int>(type: "int", nullable: true, comment: "线边仓序列号"),
- sheifno = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "仓库编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- geoinfo = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "坐标")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_mes_workshop_shelf", x => x.workshop_shelf_id);
- },
- comment: "工位关联线边仓表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sim_base",
- columns: table => new
- {
- sim_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- sim_grade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "sim等级")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sim_level = table.Column<int>(type: "int", nullable: true, comment: "sim层级顺序"),
- rise_cycle = table.Column<decimal>(type: "decimal(10,0)", precision: 10, scale: 0, nullable: true, comment: "上升周期"),
- interval_days = table.Column<decimal>(type: "decimal(10,0)", precision: 10, scale: 0, nullable: true, comment: "间隔天数"),
- rise_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "上升时间"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sim_base", x => x.sim_id);
- },
- comment: "sim基本表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sim_issue_type",
- columns: table => new
- {
- issue_type_id = table.Column<long>(type: "bigint", nullable: false, comment: "上升时间")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- type_code = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "类别代码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- type_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "类别名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- app_scenario = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "应用场景")
- .Annotation("MySql:CharSet", "utf8mb4"),
- issue_grade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "问题等级")
- .Annotation("MySql:CharSet", "utf8mb4"),
- duty_person = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "责任人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- duty_dept = table.Column<long>(type: "bigint", nullable: true, comment: "责任部门id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sim_issue_type", x => x.issue_type_id);
- },
- comment: "sim事项类别表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sim_plant",
- columns: table => new
- {
- plant_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- plant_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "事项名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sim_plant", x => x.plant_id);
- },
- comment: "sim事项表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sim_user_relation",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- sim_id = table.Column<long>(type: "bigint", nullable: false, comment: "base_sim表ID"),
- user_id = table.Column<long>(type: "bigint", nullable: false, comment: "用户id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sim_user_relation", x => x.id);
- },
- comment: "sim用户关联表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "srm_po_list",
- columns: table => new
- {
- polist_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- po_id = table.Column<long>(type: "bigint", nullable: false, comment: "po单id"),
- po_billno = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "po单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- polist_row = table.Column<int>(type: "int", nullable: false, comment: "行号"),
- pr_id = table.Column<long>(type: "bigint", nullable: false, comment: "pr申请单id"),
- pr_billno = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "pr申请单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- po_mono = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "关联工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_purchase_id = table.Column<long>(type: "bigint", nullable: false, comment: "供应商id"),
- pr_purchase_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- stock_id = table.Column<long>(type: "bigint", nullable: false, comment: "收货仓库id"),
- stock_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "收货仓库名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "订单数量"),
- netprice = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "净价"),
- rate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "税率"),
- price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "含税单价"),
- total_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "总价"),
- plan_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "计划数量"),
- unit = table.Column<long>(type: "bigint", nullable: false, comment: "单位"),
- state = table.Column<int>(type: "int", nullable: false, comment: "数据状态标识"),
- rarrdate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "需求到货日期"),
- rstate = table.Column<int>(type: "int", nullable: false, comment: "评审状态"),
- rnumber = table.Column<int>(type: "int", nullable: false, comment: "评审次数"),
- rqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "已收货数量"),
- esqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "已入库数量"),
- procurement_rarr_date = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购到货日期"),
- rparrive_date = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "再计划到货日期"),
- purchase_date = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "供应商交期"),
- pur_affirmdate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购确认到货日期"),
- currencytype = table.Column<long>(type: "bigint", nullable: false, comment: "币别"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_srm_po_list", x => x.polist_id);
- },
- comment: "采购订单明细详情")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "srm_po_main",
- columns: table => new
- {
- po_Id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- po_billno = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "PO单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- po_purchaser = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- po_purchaser_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购员工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- po_purchase_id = table.Column<long>(type: "bigint", nullable: false, comment: "供应商id"),
- po_purchase_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- po_ssend_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "下单日期"),
- po_total = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "订单总价"),
- po_delivery = table.Column<long>(type: "bigint", nullable: false, comment: "交货方式"),
- po_tax_rate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "税率"),
- po_express = table.Column<int>(type: "int", nullable: false, comment: "是否加急"),
- state = table.Column<int>(type: "int", nullable: false, comment: "数据状态"),
- po_note = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- rstate = table.Column<int>(type: "int", nullable: false, comment: "评审状态"),
- rnumber = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "评审次数"),
- review_rtime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "评审通过时间"),
- po_order_type = table.Column<int>(type: "int", nullable: false, comment: "单据类型"),
- currency = table.Column<long>(type: "bigint", nullable: false, comment: "币别"),
- bill_type = table.Column<int>(type: "int", nullable: false, comment: "金蝶单据类型值"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_srm_po_main", x => x.po_Id);
- },
- comment: "采购订单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "srm_po_occupy",
- columns: table => new
- {
- pooccupy_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- polist_id = table.Column<long>(type: "bigint", nullable: false, comment: "采购订单id"),
- polist_row = table.Column<int>(type: "int", nullable: false, comment: "采购订单行号"),
- eid = table.Column<long>(type: "bigint", nullable: false, comment: "客户订单行id"),
- bill_no = table.Column<long>(type: "bigint", nullable: false, comment: "客户订单id"),
- type = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- entry_id = table.Column<int>(type: "int", nullable: false, comment: "行号"),
- qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "占用量"),
- stime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- etime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
- state = table.Column<int>(type: "int", nullable: false, comment: "占用状态"),
- cby = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "变更人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- creason = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "变更原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ctime = table.Column<DateTime>(type: "datetime", nullable: true, comment: "变更时间"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_srm_po_occupy", x => x.pooccupy_id);
- },
- comment: "采购订单占用详情")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "srm_pr_main",
- columns: table => new
- {
- pr_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- pr_billno = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "pr单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_mono = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "关联工单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- entity_id = table.Column<int>(type: "int", nullable: false, comment: "工单行号"),
- pr_purchaseid = table.Column<long>(type: "bigint", nullable: false, comment: "供应商id"),
- pr_purchasenumber = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_purchasename = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_purchaser = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_purchaser_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购员工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_rqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "需求数量"),
- pr_aqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "申请数量"),
- pr_sqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "建议数量"),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_order_type = table.Column<int>(type: "int", nullable: false, comment: "单据类型"),
- pr_ssend_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "系统建议下单日期"),
- pr_sarrive_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "系统建议到达日期"),
- pr_bsarrive_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "采购员建议到货日期"),
- pr_oarrive_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "订单到货日期"),
- pr_psend_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划下单日期"),
- pr_parrive_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "计划到达日期"),
- pr_rarrive_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "需求到货日期"),
- pr_rparrive_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "再计划到货日期"),
- pr_pur_affirm_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "采购确认到货日期"),
- pr_sysprice = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "系统价格(含税)"),
- pr_orderprice = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "订单价格(含税)"),
- pr_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购净价(不含税)"),
- pr_rate = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "税率"),
- pr_unit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "单位")
- .Annotation("MySql:CharSet", "utf8mb4"),
- state = table.Column<int>(type: "int", nullable: false, comment: "状态"),
- old_apply_aqty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "已申请数量"),
- pr_type = table.Column<int>(type: "int", nullable: false, comment: "申请类型"),
- currencytype = table.Column<long>(type: "bigint", nullable: false, comment: "币种"),
- secInv_ratio = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "安全库存触发采购比例"),
- remark = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pr_rreason = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: true, comment: "拒绝原因")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_srm_pr_main", x => x.pr_id);
- },
- comment: "采购申请单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "srm_purchase",
- columns: table => new
- {
- ic_purchase_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- ic_plan_id = table.Column<long>(type: "bigint", nullable: false, comment: "计划id"),
- order_rector_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购负责人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_rector_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购负责人_工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- factory_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工厂编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_dept = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购部门")
- .Annotation("MySql:CharSet", "utf8mb4"),
- order_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购单价"),
- sale_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "销售单价"),
- qty_min = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "最小订货量"),
- batch_append_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "批量增量"),
- pov_acct = table.Column<long>(type: "bigint", nullable: false, comment: "采购订单差异科目代码"),
- piv_acct = table.Column<long>(type: "bigint", nullable: false, comment: "采购发票差异科目代码"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_srm_purchase", x => x.ic_purchase_id);
- },
- comment: "物料采购信息表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "srm_supplier",
- columns: table => new
- {
- supplier_id = table.Column<long>(type: "bigint", nullable: false, comment: "供应商主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- supplier_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supplier_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "供应商名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supplier_full_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "供应商全称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supplier_help_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商助记码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supplier_short_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "供应商简称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supplier_address = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "供应商地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- state = table.Column<string>(type: "longtext", nullable: true, comment: "状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- region = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "区域")
- .Annotation("MySql:CharSet", "utf8mb4"),
- trade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "行业")
- .Annotation("MySql:CharSet", "utf8mb4"),
- contact = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "联系人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- telephone = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "联系电话")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mobile = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "移动电话")
- .Annotation("MySql:CharSet", "utf8mb4"),
- fax = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "传真号码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- post_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "邮政编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- email = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "邮件地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- taxid = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "税务登记号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bank = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "开户银行")
- .Annotation("MySql:CharSet", "utf8mb4"),
- bank_account = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "银行账号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- value_add_rate = table.Column<decimal>(type: "decimal(18,10)", precision: 18, scale: 10, nullable: true, comment: "增值税率"),
- type = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商分类")
- .Annotation("MySql:CharSet", "utf8mb4"),
- po_mode = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购模式")
- .Annotation("MySql:CharSet", "utf8mb4"),
- vmi_stock = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "VMI仓")
- .Annotation("MySql:CharSet", "utf8mb4"),
- stockid_assignee = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "受托代销虚仓")
- .Annotation("MySql:CharSet", "utf8mb4"),
- branch_info = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "分支机构信息")
- .Annotation("MySql:CharSet", "utf8mb4"),
- regmark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "注册商标")
- .Annotation("MySql:CharSet", "utf8mb4"),
- licence = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "营业执照")
- .Annotation("MySql:CharSet", "utf8mb4"),
- regster_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "注册日期"),
- approve_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "批准日期"),
- begin_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生效日期"),
- end_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "失效日期"),
- supply_grade = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应商等级")
- .Annotation("MySql:CharSet", "utf8mb4"),
- supply_type = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "供应类别")
- .Annotation("MySql:CharSet", "utf8mb4"),
- company_type = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "公司类别")
- .Annotation("MySql:CharSet", "utf8mb4"),
- auto_create_mr = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "交货自动生成收货单据"),
- auto_validate_order = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "自动确认订单"),
- isuse_supplier_portal = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "启用供应商门户"),
- department = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "分管部门")
- .Annotation("MySql:CharSet", "utf8mb4"),
- employee_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "专营业务员")
- .Annotation("MySql:CharSet", "utf8mb4"),
- employee_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "专营业务员_工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- currency = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "结算币种")
- .Annotation("MySql:CharSet", "utf8mb4"),
- settlement = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "结算方式")
- .Annotation("MySql:CharSet", "utf8mb4"),
- name_en = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "英文名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- addr_en = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "英文地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- country = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "国别地区")
- .Annotation("MySql:CharSet", "utf8mb4"),
- checker = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "审核人")
- .Annotation("MySql:CharSet", "utf8mb4"),
- op_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_srm_supplier", x => x.supplier_id);
- },
- comment: "供应商表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_code",
- columns: table => new
- {
- sys_code_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- code_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "编码生成名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- code_rule = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "编码生成规则")
- .Annotation("MySql:CharSet", "utf8mb4"),
- code_date = table.Column<DateTime>(type: "datetime", nullable: false, comment: "编码生成时间"),
- code_value = table.Column<long>(type: "bigint", nullable: false, comment: "编码生成当前值"),
- chinese_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "中文注释")
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_code", x => x.sys_code_id);
- },
- comment: "系统编码表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_code_pre",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- code_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "编码生成名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- pre_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "编码生成前置名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- code_date = table.Column<DateTime>(type: "datetime", nullable: false, comment: "编码生成时间"),
- code_value = table.Column<long>(type: "bigint", nullable: false, comment: "编码生成当前值")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_code_pre", x => x.id);
- },
- comment: "系统编码前置表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_config",
- columns: table => new
- {
- config_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- type = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false, comment: "配置类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- financeis_close = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "账务状态(0-关帐,1-开帐)"),
- next_open_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "下一个开帐日期"),
- is_show = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否显示(0不显示、1显示)")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_config", x => x.config_id);
- },
- comment: "系统配置表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_measure_unit",
- columns: table => new
- {
- unit_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- unit_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- unit_code = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_standard = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否是标准单位0-否,1是"),
- status = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "状态:0-无效,1-有效")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_measure_unit", x => x.unit_id);
- },
- comment: "计量单位表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_post",
- columns: table => new
- {
- post_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- post_code = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "岗位编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- post_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "岗位名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- post_remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "岗位备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- post_level = table.Column<int>(type: "int", nullable: true, comment: "岗位级别"),
- post_path = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "岗位路径")
- .Annotation("MySql:CharSet", "utf8mb4"),
- post_sort = table.Column<int>(type: "int", nullable: true, comment: "岗位排序"),
- parent_id = table.Column<long>(type: "bigint", nullable: true, comment: "上级岗位"),
- dept_id = table.Column<long>(type: "bigint", nullable: true, comment: "部门id"),
- state = table.Column<bool>(type: "tinyint(255)", maxLength: 255, nullable: false, comment: "数据状态标识 1启用 -1停用"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_post", x => x.post_id);
- },
- comment: "岗位表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_post_staff",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- staff_id = table.Column<long>(type: "bigint", nullable: false, comment: "员工id"),
- post_id = table.Column<long>(type: "bigint", nullable: false, comment: "岗位id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_post_staff", x => x.id);
- },
- comment: "员工岗位关联表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_schedule",
- columns: table => new
- {
- schedule_id = table.Column<long>(type: "bigint", nullable: false, comment: "班次主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- schedule_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "班次编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- schedule_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "班次名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- schedule_start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "起始工作时间"),
- schedule_end_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束工作时间"),
- is_across = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "是否跨天 1是 0否"),
- remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- validate_hours = table.Column<int>(type: "int", nullable: true, comment: "有效时长"),
- work_hours = table.Column<int>(type: "int", nullable: true, comment: "工作时长"),
- state = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "数据状态标识 1启用 0停用"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_schedule", x => x.schedule_id);
- },
- comment: "班次表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_shift",
- columns: table => new
- {
- shift_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- shift_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "班制编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shift_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "班制名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- is_across = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "岗位id"),
- remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- validate_hours = table.Column<int>(type: "int", nullable: true, comment: "有效时长"),
- state = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "数据状态标识 1启用 0停用"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_shift", x => x.shift_id);
- },
- comment: "班制表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_shift_invalid_time",
- columns: table => new
- {
- invalid_time_id = table.Column<long>(type: "bigint", nullable: false, comment: "数据状态标识 1启用 0停用")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- schedule_id = table.Column<long>(type: "bigint", nullable: false, comment: "班次id"),
- start_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "开始时间"),
- end_time = table.Column<DateTime>(type: "datetime", nullable: false, comment: "结束时间"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_shift_invalid_time", x => x.invalid_time_id);
- },
- comment: "班次无效时间表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_shift_schedule",
- columns: table => new
- {
- id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- shift_id = table.Column<long>(type: "bigint", maxLength: 50, nullable: false, comment: "班制id"),
- schedule_id = table.Column<long>(type: "bigint", maxLength: 255, nullable: false, comment: "班次id"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_shift_schedule", x => x.id);
- },
- comment: "班制班次关联表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_staff",
- columns: table => new
- {
- staff_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- staff_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "员工编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- user_id = table.Column<long>(type: "bigint", nullable: true, comment: "用户id"),
- user_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "用户名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- chinese_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "中文名")
- .Annotation("MySql:CharSet", "utf8mb4"),
- phone = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "电话")
- .Annotation("MySql:CharSet", "utf8mb4"),
- photo = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "照片")
- .Annotation("MySql:CharSet", "utf8mb4"),
- org_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "组织名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- birthday = table.Column<DateOnly>(type: "date", nullable: true, comment: "生日"),
- email = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "邮箱")
- .Annotation("MySql:CharSet", "utf8mb4"),
- sex = table.Column<string>(type: "varchar(1)", maxLength: 1, nullable: true, comment: "性别 1 男 2 女")
- .Annotation("MySql:CharSet", "utf8mb4"),
- card_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "卡号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- emp_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "工号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- id_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "身份证号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- mobile = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "移动电话")
- .Annotation("MySql:CharSet", "utf8mb4"),
- politics = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "政治面貌")
- .Annotation("MySql:CharSet", "utf8mb4"),
- staff_remark = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "备注")
- .Annotation("MySql:CharSet", "utf8mb4"),
- dept_id = table.Column<long>(type: "bigint", nullable: true, comment: "部门id"),
- dept_no = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "部门编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- dept_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "部门名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- state = table.Column<bool>(type: "tinyint(255)", maxLength: 255, nullable: false, comment: "数据状态标识 1启用 0停用"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_staff", x => x.staff_id);
- },
- comment: "员工表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "sys_upload",
- columns: table => new
- {
- upload_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- file_url = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "文件存储路径")
- .Annotation("MySql:CharSet", "utf8mb4"),
- data_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "文件数据类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- file_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "文件后缀")
- .Annotation("MySql:CharSet", "utf8mb4"),
- original_file_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "源文件名称")
- .Annotation("MySql:CharSet", "utf8mb4")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_sys_upload", x => x.upload_id);
- },
- comment: "文件上传表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "wms_prdprogress",
- columns: table => new
- {
- progress_id = table.Column<long>(type: "bigint", nullable: false, comment: "进度字典主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- prdprog_type = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "进度类型")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdprog_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "进度名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- prdprog_seq = table.Column<int>(type: "int", nullable: false, comment: "进度顺序"),
- state = table.Column<bool>(type: "tinyint(1)", nullable: false, comment: "进度状态1启用0停用"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_wms_prdprogress", x => x.progress_id);
- },
- comment: "进度字典")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "wms_shipnotice",
- columns: table => new
- {
- shipnotice_id = table.Column<long>(type: "bigint", nullable: false, comment: "发运通知单主键id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- shipnotice_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "发运通知单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shipplan_id = table.Column<long>(type: "bigint", nullable: false, comment: "发货计划id"),
- shipplan_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "发货计划号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shipnotice_date = table.Column<DateTime>(type: "datetime", nullable: false, comment: "发运时间"),
- state = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- address = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "发运地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_wms_shipnotice", x => x.shipnotice_id);
- },
- comment: "发货通知单")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "wms_shipnoticelist",
- columns: table => new
- {
- shipnoticelist_id = table.Column<long>(type: "bigint", nullable: false, comment: "发运通知单详情id")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- shipnotice_id = table.Column<long>(type: "bigint", maxLength: 80, nullable: false, comment: "发货计划号"),
- shipplanlist_id = table.Column<long>(type: "bigint", nullable: true, comment: "发货详情id"),
- shipplanl_soid = table.Column<long>(type: "bigint", nullable: true, comment: "销售单id"),
- shipplanl_sono = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "销售单号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shipplanl_soeid = table.Column<int>(type: "int", nullable: true, comment: "销售单行号"),
- shipnotice_custid = table.Column<long>(type: "bigint", nullable: true, comment: "客户id"),
- shipnotice_custno = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "客户编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shipnotice_custname = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "客户名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shipplanl_iqty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "计划发货数量"),
- shipplanl_fqty = table.Column<decimal>(type: "decimal(20,10)", precision: 20, scale: 10, nullable: true, comment: "实际发货数量"),
- state = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: false, comment: "状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- address = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "发运地址")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_wms_shipnoticelist", x => x.shipnoticelist_id);
- },
- comment: "发货通知单明细表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "wms_shipplan",
- columns: table => new
- {
- shipplan_id = table.Column<long>(type: "bigint", nullable: false, comment: "发货计划表主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- shipplan_no = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "发货计划编号")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shipplan_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "发货计划时间"),
- state = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "状态")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_wms_shipplan", x => x.shipplan_id);
- },
- comment: "发货计划表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "work_calendar",
- columns: table => new
- {
- work_calendar_id = table.Column<long>(type: "bigint", nullable: false, comment: "工作日历主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- work_calendar_no = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "工作日历编码")
- .Annotation("MySql:CharSet", "utf8mb4"),
- work_calendar_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "工作日历名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- shift_id = table.Column<long>(type: "bigint", nullable: true, comment: "班制id"),
- start_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "开始时间"),
- end_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "结束时间"),
- standard_period = table.Column<int>(type: "int", nullable: true, comment: "标准周期"),
- work_period = table.Column<int>(type: "int", nullable: true, comment: "工作周期"),
- rest_period = table.Column<int>(type: "int", nullable: true, comment: "休息周期"),
- calendar1 = table.Column<int>(type: "int", nullable: true, comment: "周1"),
- calendar2 = table.Column<int>(type: "int", nullable: true, comment: "周2"),
- calendar3 = table.Column<int>(type: "int", nullable: true, comment: "周3"),
- calendar4 = table.Column<int>(type: "int", nullable: true, comment: "周4"),
- calendar5 = table.Column<int>(type: "int", nullable: true, comment: "周5"),
- calendar6 = table.Column<int>(type: "int", nullable: true, comment: "周6"),
- calendar7 = table.Column<int>(type: "int", nullable: true, comment: "周7"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_work_calendar", x => x.work_calendar_id);
- },
- comment: "工作日历表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateTable(
- name: "work_calendar_list",
- columns: table => new
- {
- work_cal_list_id = table.Column<long>(type: "bigint", nullable: false, comment: "工作日历明细主键")
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- work_calendar_id = table.Column<long>(type: "bigint", nullable: false, comment: "工作日历id"),
- work_cal_list_date = table.Column<DateTime>(type: "datetime", nullable: true, comment: "日期"),
- work_cal_list_type = table.Column<int>(type: "int", nullable: true, comment: "类型:1-工作日;0-休息日"),
- work_cal_list_times = table.Column<int>(type: "int", nullable: true, comment: "工作时长(分钟)"),
- work_cal_list_num = table.Column<int>(type: "int", nullable: true, comment: "班次数"),
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
- .Annotation("MySql:CharSet", "utf8mb4"),
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_work_calendar_list", x => x.work_cal_list_id);
- },
- comment: "工作日历明细表")
- .Annotation("MySql:CharSet", "utf8mb4");
- migrationBuilder.CreateIndex(
- name: "IX_base_flow_FormId",
- table: "base_flow",
- column: "FormId");
- migrationBuilder.CreateIndex(
- name: "IX_base_form_workflow_EntityId",
- table: "base_form_workflow",
- column: "EntityId");
- migrationBuilder.CreateIndex(
- name: "IX_base_form_workflow_NodeId",
- table: "base_form_workflow",
- column: "NodeId");
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "base_flow");
- migrationBuilder.DropTable(
- name: "base_flow_line");
- migrationBuilder.DropTable(
- name: "base_flow_line_form");
- migrationBuilder.DropTable(
- name: "base_flow_node");
- migrationBuilder.DropTable(
- name: "base_form");
- migrationBuilder.DropTable(
- name: "base_form_datas");
- migrationBuilder.DropTable(
- name: "base_form_fields");
- migrationBuilder.DropTable(
- name: "base_form_fields_opts");
- migrationBuilder.DropTable(
- name: "base_form_workflow");
- migrationBuilder.DropTable(
- name: "crm_customer");
- migrationBuilder.DropTable(
- name: "crm_seorder");
- migrationBuilder.DropTable(
- name: "crm_seorderentry");
- migrationBuilder.DropTable(
- name: "crm_seorderprog");
- migrationBuilder.DropTable(
- name: "crm_seorderreview");
- migrationBuilder.DropTable(
- name: "ic_bom");
- migrationBuilder.DropTable(
- name: "ic_bom_child");
- migrationBuilder.DropTable(
- name: "ic_factory_details");
- migrationBuilder.DropTable(
- name: "ic_item");
- migrationBuilder.DropTable(
- name: "ic_item_ie");
- migrationBuilder.DropTable(
- name: "ic_item_inventory");
- migrationBuilder.DropTable(
- name: "ic_item_pur");
- migrationBuilder.DropTable(
- name: "ic_item_stock");
- migrationBuilder.DropTable(
- name: "ic_metering_unit");
- migrationBuilder.DropTable(
- name: "ic_plan");
- migrationBuilder.DropTable(
- name: "ic_substitute");
- migrationBuilder.DropTable(
- name: "ic_substitute_all");
- migrationBuilder.DropTable(
- name: "ic_substitute_all_dtl");
- migrationBuilder.DropTable(
- name: "mes_loss_time_record");
- migrationBuilder.DropTable(
- name: "mes_meaction");
- migrationBuilder.DropTable(
- name: "mes_mebycard");
- migrationBuilder.DropTable(
- name: "mes_merecheck");
- migrationBuilder.DropTable(
- name: "mes_mereport");
- migrationBuilder.DropTable(
- name: "mes_moentry");
- migrationBuilder.DropTable(
- name: "mes_mooccupy");
- migrationBuilder.DropTable(
- name: "mes_morder");
- migrationBuilder.DropTable(
- name: "mes_morder_loss_time");
- migrationBuilder.DropTable(
- name: "mes_oorder");
- migrationBuilder.DropTable(
- name: "mes_prd_sendmat");
- migrationBuilder.DropTable(
- name: "mes_prd_sendmat_list");
- migrationBuilder.DropTable(
- name: "mes_prdlog");
- migrationBuilder.DropTable(
- name: "mes_process");
- migrationBuilder.DropTable(
- name: "mes_product_work_time");
- migrationBuilder.DropTable(
- name: "mes_schedule_occupy");
- migrationBuilder.DropTable(
- name: "mes_stock_enter");
- migrationBuilder.DropTable(
- name: "mes_stock_out");
- migrationBuilder.DropTable(
- name: "mes_stockoccupy");
- migrationBuilder.DropTable(
- name: "mes_swipe_card");
- migrationBuilder.DropTable(
- name: "mes_tech_proc_accessory");
- migrationBuilder.DropTable(
- name: "mes_tech_proc_document");
- migrationBuilder.DropTable(
- name: "mes_tech_proc_workshop");
- migrationBuilder.DropTable(
- name: "mes_tech_proc_workshop_equipment");
- migrationBuilder.DropTable(
- name: "mes_tech_proc_workshop_icitem");
- migrationBuilder.DropTable(
- name: "mes_tech_proc_workshop_staff");
- migrationBuilder.DropTable(
- name: "mes_tech_process");
- migrationBuilder.DropTable(
- name: "mes_technique");
- migrationBuilder.DropTable(
- name: "mes_workshop");
- migrationBuilder.DropTable(
- name: "mes_workshop_shelf");
- migrationBuilder.DropTable(
- name: "sim_base");
- migrationBuilder.DropTable(
- name: "sim_issue_type");
- migrationBuilder.DropTable(
- name: "sim_plant");
- migrationBuilder.DropTable(
- name: "sim_user_relation");
- migrationBuilder.DropTable(
- name: "srm_po_list");
- migrationBuilder.DropTable(
- name: "srm_po_main");
- migrationBuilder.DropTable(
- name: "srm_po_occupy");
- migrationBuilder.DropTable(
- name: "srm_pr_main");
- migrationBuilder.DropTable(
- name: "srm_purchase");
- migrationBuilder.DropTable(
- name: "srm_supplier");
- migrationBuilder.DropTable(
- name: "sys_code");
- migrationBuilder.DropTable(
- name: "sys_code_pre");
- migrationBuilder.DropTable(
- name: "sys_config");
- migrationBuilder.DropTable(
- name: "sys_measure_unit");
- migrationBuilder.DropTable(
- name: "sys_post");
- migrationBuilder.DropTable(
- name: "sys_post_staff");
- migrationBuilder.DropTable(
- name: "sys_schedule");
- migrationBuilder.DropTable(
- name: "sys_shift");
- migrationBuilder.DropTable(
- name: "sys_shift_invalid_time");
- migrationBuilder.DropTable(
- name: "sys_shift_schedule");
- migrationBuilder.DropTable(
- name: "sys_staff");
- migrationBuilder.DropTable(
- name: "sys_upload");
- migrationBuilder.DropTable(
- name: "wms_prdprogress");
- migrationBuilder.DropTable(
- name: "wms_shipnotice");
- migrationBuilder.DropTable(
- name: "wms_shipnoticelist");
- migrationBuilder.DropTable(
- name: "wms_shipplan");
- migrationBuilder.DropTable(
- name: "work_calendar");
- migrationBuilder.DropTable(
- name: "work_calendar_list");
- }
- }
- }
|