123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307 |
- using System;
- using Microsoft.EntityFrameworkCore.Metadata;
- using Microsoft.EntityFrameworkCore.Migrations;
- namespace Ropin.Inspection.Model.Migrations
- {
- public partial class Init03 : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Report",
- columns: table => new
- {
- G_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_StoreCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Type = table.Column<int>(type: "int", nullable: false),
- C_GroupName = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- D_CreateTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- D_Start = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- D_End = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Data = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Report", x => x.G_ID);
- });
- migrationBuilder.CreateTable(
- name: "TasksQz",
- columns: table => new
- {
- Id = table.Column<Guid>(type: "char(36)", nullable: false),
- C_LicenseCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- Name = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: true),
- JobGroup = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: true),
- Cron = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: true),
- AssemblyName = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: true),
- ClassName = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: true),
- Remark = table.Column<string>(type: "varchar(1000) CHARACTER SET utf8mb4", maxLength: 1000, nullable: true),
- RunTimes = table.Column<int>(type: "int", nullable: false),
- BeginTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- EndTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- TriggerType = table.Column<int>(type: "int", nullable: false),
- IntervalSecond = table.Column<int>(type: "int", nullable: false),
- CycleRunTimes = table.Column<int>(type: "int", nullable: false),
- IsStart = table.Column<bool>(type: "tinyint(1)", nullable: false),
- JobParams = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: true),
- CreateTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- CreateBy = table.Column<Guid>(type: "char(36)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TasksQz", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "TBDM_Prov",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TBDM_Prov", x => x.C_Code);
- });
- migrationBuilder.CreateTable(
- name: "TDEV_DevAlert",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_DeviceCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_ConfigCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Value = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TDEV_DevAlert", x => x.C_ID);
- });
- migrationBuilder.CreateTable(
- name: "TDEV_DevData",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_DeviceCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_ConfigCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Value = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TDEV_DevData", x => x.C_ID);
- });
- migrationBuilder.CreateTable(
- name: "TISP_RecordAlarm",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_InspectionRecordCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotContentCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_RecordAlarm", x => x.C_ID);
- });
- migrationBuilder.CreateTable(
- name: "TPNT_Type",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPNT_Type", x => x.C_Code);
- });
- migrationBuilder.CreateTable(
- name: "TSEC_RecordImage",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SecurityRecordCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_ImageURL = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSEC_RecordImage", x => x.C_ID);
- });
- //migrationBuilder.CreateTable(
- // name: "TSYS_Organize",
- // columns: table => new
- // {
- // G_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- // G_ParentCode = table.Column<Guid>(type: "char(36)", nullable: false),
- // C_Number = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- // C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- // C_ParentName = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- // C_ParentCodeList = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- // I_Layer = table.Column<int>(type: "int", nullable: false),
- // I_Sort = table.Column<int>(type: "int", nullable: false),
- // C_Address = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- // C_GPS = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- // C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- // C_ImageUrl = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- // G_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- // D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- // G_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- // D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- // C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- // },
- // constraints: table =>
- // {
- // table.PrimaryKey("PK_TSYS_Organize", x => x.G_ID);
- // });
- migrationBuilder.CreateTable(
- name: "TSYS_Post",
- columns: table => new
- {
- G_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Code = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- G_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- G_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_Post", x => x.G_ID);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_Priv",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_ParentCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_Module = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Type = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_ImageUrl = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_PageUrl = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_Remark = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_Priv", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TSYS_Priv_TSYS_Priv_C_ParentCode",
- column: x => x.C_ParentCode,
- principalTable: "TSYS_Priv",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_User",
- columns: table => new
- {
- C_UserID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_LicenseCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Post = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_UserName = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_WechatID = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_ProgramID = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_Password = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Render = table.Column<int>(type: "int", nullable: false),
- C_IDNum = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_OrgCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_ImagePath = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- D_BirthDay = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Address = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Mobile = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: true),
- C_Phone = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: true),
- C_Email = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_User", x => x.C_UserID);
- table.ForeignKey(
- name: "FK_TSYS_User_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_User_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_UserPost",
- columns: table => new
- {
- G_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- G_UserCode = table.Column<Guid>(type: "char(36)", nullable: false),
- G_PostCode = table.Column<Guid>(type: "char(36)", nullable: false),
- G_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_UserPost", x => x.G_ID);
- });
- migrationBuilder.CreateTable(
- name: "TaskInfoDto",
- columns: table => new
- {
- jobId = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", nullable: false),
- jobName = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- jobGroup = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- triggerId = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- triggerName = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- triggerGroup = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- triggerStatus = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- TasksQzId = table.Column<Guid>(type: "char(36)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TaskInfoDto", x => x.jobId);
- table.ForeignKey(
- name: "FK_TaskInfoDto_TasksQz_TasksQzId",
- column: x => x.TasksQzId,
- principalTable: "TasksQz",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TBDM_City",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false),
- C_ProvCode = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TBDM_City", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TBDM_City_TBDM_Prov_C_ProvCode",
- column: x => x.C_ProvCode,
- principalTable: "TBDM_Prov",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TBDM_CodeDetail",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_MainCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Value = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false),
- C_IsSys = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false),
- C_Default = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TBDM_CodeDetail", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TBDM_CodeDetail_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TBDM_CodeDetail_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TBDM_CodeMain",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TBDM_CodeMain", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TBDM_CodeMain_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TBDM_CodeMain_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TDEV_DevAlertConfig",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TDEV_DevAlertConfig", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TDEV_DevAlertConfig_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TDEV_DevAlertConfig_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TDEV_DevDataConfig",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Interval = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TDEV_DevDataConfig", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TDEV_DevDataConfig_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TDEV_DevDataConfig_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_Content",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_AlarmLevel = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_Content", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_Content_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_Content_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_ContentGroup",
- columns: table => new
- {
- G_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- G_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- G_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false),
- I_Type = table.Column<int>(type: "int", nullable: false),
- C_PatrolItem = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_ContentGroup", x => x.G_ID);
- table.ForeignKey(
- name: "FK_TISP_ContentGroup_TSYS_User_G_CreateBy",
- column: x => x.G_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_ContentGroup_TSYS_User_G_LastUpdatedBy",
- column: x => x.G_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_Region",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_ImageUrl = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_Region", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_Region_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_Region_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_Route",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_ImageUrl = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_Route", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_Route_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_Route_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_Spot",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Number = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Position = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_QRCode = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_AreaCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- F_Map_X = table.Column<decimal>(type: "decimal(12,2)", nullable: true),
- F_Map_Y = table.Column<decimal>(type: "decimal(12,2)", nullable: true),
- C_GPS = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_ImageUrl = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- I_Offset = table.Column<int>(type: "int", nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_Spot", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TISP_Spot_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_Spot_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPNT_StoreOrg",
- columns: table => new
- {
- C_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_OrgCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPNT_StoreOrg", x => new { x.C_StoreCode, x.C_OrgCode });
- table.ForeignKey(
- name: "FK_TPNT_StoreOrg_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPRD_Type",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_IfFPP = table.Column<int>(type: "int", nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPRD_Type", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TPRD_Type_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPRD_Type_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSEC_Record",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SecurityContent = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSEC_Record", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TSEC_Record_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSEC_Record_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSEC_RecordItem",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RecordItemCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SecurityContent = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSEC_RecordItem", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TSEC_RecordItem_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSEC_RecordItem_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_LicenseType",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- I_MaxMemberQty = table.Column<int>(type: "int", nullable: false),
- I_MaxSpotQty = table.Column<int>(type: "int", nullable: false),
- I_MaxFileSize = table.Column<int>(type: "int", nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_LicenseType", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TSYS_LicenseType_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_LicenseType_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_Message",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_LicenseCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Type = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Content = table.Column<string>(type: "varchar(1000) CHARACTER SET utf8mb4", maxLength: 1000, nullable: false),
- C_UserID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RelatedModule = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: true),
- C_RelatedID = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_Message", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TSYS_Message_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_Message_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_Message_TSYS_User_C_UserID",
- column: x => x.C_UserID,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_Role",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_LicenseCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Description = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_Role", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TSYS_Role_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_Role_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_Version",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_AppCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_VersionCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_UpdateContent = table.Column<string>(type: "varchar(1000) CHARACTER SET utf8mb4", maxLength: 1000, nullable: true),
- C_DownloadURL = table.Column<string>(type: "varchar(1000) CHARACTER SET utf8mb4", maxLength: 1000, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_Version", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TSYS_Version_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_Version_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TBDM_Area",
- columns: table => new
- {
- C_Code = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false),
- C_CityCode = table.Column<string>(type: "varchar(20) CHARACTER SET utf8mb4", maxLength: 20, nullable: false),
- C_Name = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TBDM_Area", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TBDM_Area_TBDM_City_C_CityCode",
- column: x => x.C_CityCode,
- principalTable: "TBDM_City",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_SpotContent",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_ContentCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_SpotContent", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_SpotContent_TISP_Content_C_ContentCode",
- column: x => x.C_ContentCode,
- principalTable: "TISP_Content",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotContent_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_ContentGroupItem",
- columns: table => new
- {
- G_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- G_ContentGroupCode = table.Column<Guid>(type: "char(36)", nullable: false),
- G_ContentCode = table.Column<Guid>(type: "char(36)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_ContentGroupItem", x => x.G_ID);
- table.ForeignKey(
- name: "FK_TISP_ContentGroupItem_TISP_Content_G_ContentCode",
- column: x => x.G_ContentCode,
- principalTable: "TISP_Content",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_ContentGroupItem_TISP_ContentGroup_G_ContentGroupCode",
- column: x => x.G_ContentGroupCode,
- principalTable: "TISP_ContentGroup",
- principalColumn: "G_ID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_Record",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_Record", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_Record_TISP_Spot_C_SpotCode",
- column: x => x.C_SpotCode,
- principalTable: "TISP_Spot",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_Record_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_Record_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_SpotRegion",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RegionCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_SpotRegion", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_SpotRegion_TISP_Region_C_RegionCode",
- column: x => x.C_RegionCode,
- principalTable: "TISP_Region",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotRegion_TISP_Spot_C_SpotCode",
- column: x => x.C_SpotCode,
- principalTable: "TISP_Spot",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotRegion_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotRegion_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_SpotRoute",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RouteCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", maxLength: 1, nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_SpotRoute", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_SpotRoute_TISP_Route_C_RouteCode",
- column: x => x.C_RouteCode,
- principalTable: "TISP_Route",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotRoute_TISP_Spot_C_SpotCode",
- column: x => x.C_SpotCode,
- principalTable: "TISP_Spot",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotRoute_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotRoute_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_SpotUser",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_UserCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_SpotUser", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_SpotUser_TISP_Spot_C_SpotCode",
- column: x => x.C_SpotCode,
- principalTable: "TISP_Spot",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotUser_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_SpotUser_TSYS_User_C_UserCode",
- column: x => x.C_UserCode,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_Org",
- columns: table => new
- {
- K_ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
- C_LicenseCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false),
- C_SName = table.Column<string>(type: "varchar(16) CHARACTER SET utf8mb4", maxLength: 16, nullable: true),
- C_Lname = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", maxLength: 2550, nullable: true),
- C_Level = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: false),
- C_ParentCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Type = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Phone = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_Linker = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_GIS = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false),
- //StoreOrgC_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", nullable: true),
- //StoreOrgC_OrgCode = table.Column<Guid>(type: "char(36)", nullable: true)
- },
- constraints: table =>
- {
- //table.PrimaryKey("PK_TSYS_Org", x => x.K_ID);
- //table.ForeignKey(
- // name: "FK_TSYS_Org_TPNT_StoreOrg_StoreOrgC_StoreCode_StoreOrgC_OrgCode",
- // columns: x => new { x.StoreOrgC_StoreCode, x.StoreOrgC_OrgCode },
- // principalTable: "TPNT_StoreOrg",
- // principalColumns: new[] { "C_StoreCode", "C_OrgCode" },
- // onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPRD_ProdSKU",
- columns: table => new
- {
- C_SKUCode = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- C_TypeCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false),
- C_Spec = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_Brand = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: true),
- C_Vender = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true),
- C_ProdArea = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_Unit = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_ImagePath = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_IconPath = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- I_MinStock = table.Column<int>(type: "int", nullable: false),
- I_ValiDays = table.Column<int>(type: "int", nullable: true),
- I_AlarmDays = table.Column<int>(type: "int", nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPRD_ProdSKU", x => x.C_SKUCode);
- table.ForeignKey(
- name: "FK_TPRD_ProdSKU_TPRD_Type_C_TypeCode",
- column: x => x.C_TypeCode,
- principalTable: "TPRD_Type",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPRD_ProdSKU_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPRD_ProdSKU_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_License",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_TypeCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- I_MemberQty = table.Column<int>(type: "int", nullable: false),
- I_SpotQty = table.Column<int>(type: "int", nullable: false),
- C_FilePath = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: false),
- D_StartDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- D_EndDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false),
- UsersCreateByC_UserID = table.Column<Guid>(type: "char(36)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_License", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TSYS_License_TSYS_LicenseType_C_TypeCode",
- column: x => x.C_TypeCode,
- principalTable: "TSYS_LicenseType",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_License_TSYS_User_UsersCreateByC_UserID",
- column: x => x.UsersCreateByC_UserID,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_LicenseTypePriv",
- columns: table => new
- {
- C_LicenseTypeCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_PrivilegeCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_LicenseTypePriv", x => new { x.C_LicenseTypeCode, x.C_PrivilegeCode });
- table.ForeignKey(
- name: "FK_TSYS_LicenseTypePriv_TSYS_LicenseType_C_LicenseTypeCode",
- column: x => x.C_LicenseTypeCode,
- principalTable: "TSYS_LicenseType",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_LicenseTypePriv_TSYS_Priv_C_PrivilegeCode",
- column: x => x.C_PrivilegeCode,
- principalTable: "TSYS_Priv",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_LicenseTypePriv_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_RolePriv",
- columns: table => new
- {
- C_RoleCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_PrivilegeCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- I_Type = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_RolePriv", x => new { x.C_RoleCode, x.C_PrivilegeCode });
- table.ForeignKey(
- name: "FK_TSYS_RolePriv_TSYS_Priv_C_PrivilegeCode",
- column: x => x.C_PrivilegeCode,
- principalTable: "TSYS_Priv",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_RolePriv_TSYS_Role_C_RoleCode",
- column: x => x.C_RoleCode,
- principalTable: "TSYS_Role",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_RolePriv_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TSYS_UserRole",
- columns: table => new
- {
- C_UserCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RoleCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TSYS_UserRole", x => new { x.C_UserCode, x.C_RoleCode });
- table.ForeignKey(
- name: "FK_TSYS_UserRole_TSYS_Role_C_RoleCode",
- column: x => x.C_RoleCode,
- principalTable: "TSYS_Role",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_UserRole_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TSYS_UserRole_TSYS_User_C_UserCode",
- column: x => x.C_UserCode,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_RecordItem",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_ContentCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RecordCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_InspectionContent = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- C_Remark = table.Column<string>(type: "longtext CHARACTER SET utf8mb4", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false),
- C_CreateBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(50)", maxLength: 50, nullable: false),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_RecordItem", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_RecordItem_TISP_Content_C_ContentCode",
- column: x => x.C_ContentCode,
- principalTable: "TISP_Content",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_RecordItem_TISP_Record_C_RecordCode",
- column: x => x.C_RecordCode,
- principalTable: "TISP_Record",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_RecordItem_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TISP_RecordItem_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPNT_Store",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_LicenseCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_AreaCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_Code = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_Name = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false),
- C_SName = table.Column<string>(type: "varchar(16) CHARACTER SET utf8mb4", maxLength: 16, nullable: true),
- C_TypeCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Address = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- C_GPS = table.Column<string>(type: "varchar(500) CHARACTER SET utf8mb4", maxLength: 500, nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: false),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false),
- LicenseC_ID = table.Column<Guid>(type: "char(36)", nullable: true),
- StoreOrgC_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", nullable: true),
- StoreOrgC_OrgCode = table.Column<Guid>(type: "char(36)", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPNT_Store", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TPNT_Store_TBDM_Area_C_AreaCode",
- column: x => x.C_AreaCode,
- principalTable: "TBDM_Area",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Store_TPNT_StoreOrg_StoreOrgC_StoreCode_StoreOrgC_OrgCo~",
- columns: x => new { x.StoreOrgC_StoreCode, x.StoreOrgC_OrgCode },
- principalTable: "TPNT_StoreOrg",
- principalColumns: new[] { "C_StoreCode", "C_OrgCode" },
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Store_TPNT_Type_C_TypeCode",
- column: x => x.C_TypeCode,
- principalTable: "TPNT_Type",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Store_TSYS_License_LicenseC_ID",
- column: x => x.LicenseC_ID,
- principalTable: "TSYS_License",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Store_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Store_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TISP_RecordImage",
- columns: table => new
- {
- C_ID = table.Column<Guid>(type: "char(36)", nullable: false),
- C_RecordItemCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_ImageURL = table.Column<string>(type: "varchar(200) CHARACTER SET utf8mb4", maxLength: 200, nullable: false),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TISP_RecordImage", x => x.C_ID);
- table.ForeignKey(
- name: "FK_TISP_RecordImage_TISP_RecordItem_C_RecordItemCode",
- column: x => x.C_RecordItemCode,
- principalTable: "TISP_RecordItem",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPNT_Area",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_StoreCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_Name = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false),
- C_SName = table.Column<string>(type: "varchar(16) CHARACTER SET utf8mb4", maxLength: 16, nullable: true),
- C_ImageUrl = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPNT_Area", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TPNT_Area_TPNT_Store_C_StoreCode",
- column: x => x.C_StoreCode,
- principalTable: "TPNT_Store",
- principalColumn: "C_ID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Area_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPNT_Area_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPRD_Product",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_QRCode = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: false),
- C_SKUCode = table.Column<string>(type: "varchar(100) CHARACTER SET utf8mb4", maxLength: 100, nullable: false),
- C_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_DeviceCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_SpotCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_AreaCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- F_Map_X = table.Column<decimal>(type: "decimal(12,2)", nullable: true),
- F_Map_Y = table.Column<decimal>(type: "decimal(12,2)", nullable: true),
- D_ProdDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- D_ValiDate = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_ImageUrl = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true),
- D_LastISP = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- I_IsAlarm = table.Column<int>(type: "int", nullable: true),
- C_AlarmMsg = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- I_Sort = table.Column<int>(type: "int", nullable: true),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- I_Status = table.Column<int>(type: "int", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPRD_Product", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TPRD_Product_TPRD_ProdSKU_C_SKUCode",
- column: x => x.C_SKUCode,
- principalTable: "TPRD_ProdSKU",
- principalColumn: "C_SKUCode",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPRD_Product_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPRD_Product_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TDEV_Device",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_ProductCode = table.Column<Guid>(type: "char(36)", nullable: false),
- C_MachineCode = table.Column<string>(type: "varchar(255) CHARACTER SET utf8mb4", maxLength: 255, nullable: true),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false),
- C_LastUpdatedBy = table.Column<Guid>(type: "char(36)", nullable: true),
- D_LastUpdatedOn = table.Column<DateTime>(type: "datetime(6)", nullable: true),
- C_Status = table.Column<string>(type: "varchar(1) CHARACTER SET utf8mb4", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TDEV_Device", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TDEV_Device_TPRD_Product_C_ProductCode",
- column: x => x.C_ProductCode,
- principalTable: "TPRD_Product",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TDEV_Device_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TDEV_Device_TSYS_User_C_LastUpdatedBy",
- column: x => x.C_LastUpdatedBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "TPRD_Log",
- columns: table => new
- {
- C_Code = table.Column<Guid>(type: "char(36)", nullable: false),
- C_ProductCode = table.Column<Guid>(type: "char(36)", nullable: false),
- I_Type = table.Column<int>(type: "int", nullable: false),
- C_StoreCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: false),
- C_DeviceCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_SpotCode = table.Column<string>(type: "varchar(50) CHARACTER SET utf8mb4", maxLength: 50, nullable: true),
- C_AlarmMsg = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_Remark = table.Column<string>(type: "varchar(1024) CHARACTER SET utf8mb4", maxLength: 1024, nullable: true),
- C_CreateBy = table.Column<Guid>(type: "char(36)", nullable: false),
- D_CreateOn = table.Column<DateTime>(type: "datetime(6)", nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_TPRD_Log", x => x.C_Code);
- table.ForeignKey(
- name: "FK_TPRD_Log_TPRD_Product_C_ProductCode",
- column: x => x.C_ProductCode,
- principalTable: "TPRD_Product",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_TPRD_Log_TSYS_User_C_CreateBy",
- column: x => x.C_CreateBy,
- principalTable: "TSYS_User",
- principalColumn: "C_UserID",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateIndex(
- name: "IX_TaskInfoDto_TasksQzId",
- table: "TaskInfoDto",
- column: "TasksQzId");
- migrationBuilder.CreateIndex(
- name: "IX_TBDM_Area_C_CityCode",
- table: "TBDM_Area",
- column: "C_CityCode");
- migrationBuilder.CreateIndex(
- name: "IX_TBDM_City_C_ProvCode",
- table: "TBDM_City",
- column: "C_ProvCode");
- migrationBuilder.CreateIndex(
- name: "IX_TBDM_CodeDetail_C_CreateBy",
- table: "TBDM_CodeDetail",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TBDM_CodeDetail_C_LastUpdatedBy",
- table: "TBDM_CodeDetail",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TBDM_CodeMain_C_CreateBy",
- table: "TBDM_CodeMain",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TBDM_CodeMain_C_LastUpdatedBy",
- table: "TBDM_CodeMain",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_DevAlertConfig_C_CreateBy",
- table: "TDEV_DevAlertConfig",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_DevAlertConfig_C_LastUpdatedBy",
- table: "TDEV_DevAlertConfig",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_DevDataConfig_C_CreateBy",
- table: "TDEV_DevDataConfig",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_DevDataConfig_C_LastUpdatedBy",
- table: "TDEV_DevDataConfig",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_Device_C_CreateBy",
- table: "TDEV_Device",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_Device_C_LastUpdatedBy",
- table: "TDEV_Device",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TDEV_Device_C_ProductCode",
- table: "TDEV_Device",
- column: "C_ProductCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Content_C_CreateBy",
- table: "TISP_Content",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Content_C_LastUpdatedBy",
- table: "TISP_Content",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_ContentGroup_G_CreateBy",
- table: "TISP_ContentGroup",
- column: "G_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_ContentGroup_G_LastUpdatedBy",
- table: "TISP_ContentGroup",
- column: "G_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_ContentGroupItem_G_ContentCode",
- table: "TISP_ContentGroupItem",
- column: "G_ContentCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_ContentGroupItem_G_ContentGroupCode",
- table: "TISP_ContentGroupItem",
- column: "G_ContentGroupCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Record_C_CreateBy",
- table: "TISP_Record",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Record_C_LastUpdatedBy",
- table: "TISP_Record",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Record_C_SpotCode",
- table: "TISP_Record",
- column: "C_SpotCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_RecordImage_C_RecordItemCode",
- table: "TISP_RecordImage",
- column: "C_RecordItemCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_RecordItem_C_ContentCode",
- table: "TISP_RecordItem",
- column: "C_ContentCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_RecordItem_C_CreateBy",
- table: "TISP_RecordItem",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_RecordItem_C_LastUpdatedBy",
- table: "TISP_RecordItem",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_RecordItem_C_RecordCode",
- table: "TISP_RecordItem",
- column: "C_RecordCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Region_C_CreateBy",
- table: "TISP_Region",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Region_C_LastUpdatedBy",
- table: "TISP_Region",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Route_C_CreateBy",
- table: "TISP_Route",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Route_C_LastUpdatedBy",
- table: "TISP_Route",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Spot_C_CreateBy",
- table: "TISP_Spot",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_Spot_C_LastUpdatedBy",
- table: "TISP_Spot",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotContent_C_ContentCode_C_SpotCode",
- table: "TISP_SpotContent",
- columns: new[] { "C_ContentCode", "C_SpotCode" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotContent_C_CreateBy",
- table: "TISP_SpotContent",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRegion_C_CreateBy",
- table: "TISP_SpotRegion",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRegion_C_LastUpdatedBy",
- table: "TISP_SpotRegion",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRegion_C_RegionCode",
- table: "TISP_SpotRegion",
- column: "C_RegionCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRegion_C_SpotCode",
- table: "TISP_SpotRegion",
- column: "C_SpotCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRoute_C_CreateBy",
- table: "TISP_SpotRoute",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRoute_C_LastUpdatedBy",
- table: "TISP_SpotRoute",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRoute_C_RouteCode",
- table: "TISP_SpotRoute",
- column: "C_RouteCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotRoute_C_SpotCode",
- table: "TISP_SpotRoute",
- column: "C_SpotCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotUser_C_CreateBy",
- table: "TISP_SpotUser",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotUser_C_SpotCode",
- table: "TISP_SpotUser",
- column: "C_SpotCode");
- migrationBuilder.CreateIndex(
- name: "IX_TISP_SpotUser_C_UserCode_C_SpotCode",
- table: "TISP_SpotUser",
- columns: new[] { "C_UserCode", "C_SpotCode" },
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Area_C_CreateBy",
- table: "TPNT_Area",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Area_C_LastUpdatedBy",
- table: "TPNT_Area",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Area_C_StoreCode",
- table: "TPNT_Area",
- column: "C_StoreCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_C_AreaCode",
- table: "TPNT_Store",
- column: "C_AreaCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_C_Code",
- table: "TPNT_Store",
- column: "C_Code",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_C_CreateBy",
- table: "TPNT_Store",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_C_LastUpdatedBy",
- table: "TPNT_Store",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_C_TypeCode",
- table: "TPNT_Store",
- column: "C_TypeCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_LicenseC_ID",
- table: "TPNT_Store",
- column: "LicenseC_ID");
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_Store_StoreOrgC_StoreCode_StoreOrgC_OrgCode",
- table: "TPNT_Store",
- columns: new[] { "StoreOrgC_StoreCode", "StoreOrgC_OrgCode" });
- migrationBuilder.CreateIndex(
- name: "IX_TPNT_StoreOrg_C_CreateBy",
- table: "TPNT_StoreOrg",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Log_C_CreateBy",
- table: "TPRD_Log",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Log_C_ProductCode",
- table: "TPRD_Log",
- column: "C_ProductCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_ProdSKU_C_CreateBy",
- table: "TPRD_ProdSKU",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_ProdSKU_C_LastUpdatedBy",
- table: "TPRD_ProdSKU",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_ProdSKU_C_TypeCode",
- table: "TPRD_ProdSKU",
- column: "C_TypeCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Product_C_CreateBy",
- table: "TPRD_Product",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Product_C_DeviceCode",
- table: "TPRD_Product",
- column: "C_DeviceCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Product_C_LastUpdatedBy",
- table: "TPRD_Product",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Product_C_SKUCode",
- table: "TPRD_Product",
- column: "C_SKUCode");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Type_C_CreateBy",
- table: "TPRD_Type",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TPRD_Type_C_LastUpdatedBy",
- table: "TPRD_Type",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSEC_Record_C_CreateBy",
- table: "TSEC_Record",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSEC_Record_C_LastUpdatedBy",
- table: "TSEC_Record",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSEC_RecordItem_C_CreateBy",
- table: "TSEC_RecordItem",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSEC_RecordItem_C_LastUpdatedBy",
- table: "TSEC_RecordItem",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_License_C_Code",
- table: "TSYS_License",
- column: "C_Code",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_License_C_TypeCode",
- table: "TSYS_License",
- column: "C_TypeCode");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_License_UsersCreateByC_UserID",
- table: "TSYS_License",
- column: "UsersCreateByC_UserID");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_LicenseType_C_CreateBy",
- table: "TSYS_LicenseType",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_LicenseType_C_LastUpdatedBy",
- table: "TSYS_LicenseType",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_LicenseTypePriv_C_CreateBy",
- table: "TSYS_LicenseTypePriv",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_LicenseTypePriv_C_PrivilegeCode",
- table: "TSYS_LicenseTypePriv",
- column: "C_PrivilegeCode");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Message_C_CreateBy",
- table: "TSYS_Message",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Message_C_LastUpdatedBy",
- table: "TSYS_Message",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Message_C_UserID",
- table: "TSYS_Message",
- column: "C_UserID");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Org_StoreOrgC_StoreCode_StoreOrgC_OrgCode",
- table: "TSYS_Org",
- columns: new[] { "StoreOrgC_StoreCode", "StoreOrgC_OrgCode" });
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Priv_C_ParentCode",
- table: "TSYS_Priv",
- column: "C_ParentCode");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Role_C_CreateBy",
- table: "TSYS_Role",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Role_C_LastUpdatedBy",
- table: "TSYS_Role",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_RolePriv_C_CreateBy",
- table: "TSYS_RolePriv",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_RolePriv_C_PrivilegeCode",
- table: "TSYS_RolePriv",
- column: "C_PrivilegeCode");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_User_C_CreateBy",
- table: "TSYS_User",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_User_C_IDNum",
- table: "TSYS_User",
- column: "C_IDNum",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_User_C_LastUpdatedBy",
- table: "TSYS_User",
- column: "C_LastUpdatedBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_User_C_Mobile",
- table: "TSYS_User",
- column: "C_Mobile",
- unique: true);
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_UserRole_C_CreateBy",
- table: "TSYS_UserRole",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_UserRole_C_RoleCode",
- table: "TSYS_UserRole",
- column: "C_RoleCode");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Version_C_CreateBy",
- table: "TSYS_Version",
- column: "C_CreateBy");
- migrationBuilder.CreateIndex(
- name: "IX_TSYS_Version_C_LastUpdatedBy",
- table: "TSYS_Version",
- column: "C_LastUpdatedBy");
- migrationBuilder.AddForeignKey(
- name: "FK_TPRD_Product_TDEV_Device_C_DeviceCode",
- table: "TPRD_Product",
- column: "C_DeviceCode",
- principalTable: "TDEV_Device",
- principalColumn: "C_Code",
- onDelete: ReferentialAction.Restrict);
- }
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropForeignKey(
- name: "FK_TDEV_Device_TSYS_User_C_CreateBy",
- table: "TDEV_Device");
- migrationBuilder.DropForeignKey(
- name: "FK_TDEV_Device_TSYS_User_C_LastUpdatedBy",
- table: "TDEV_Device");
- migrationBuilder.DropForeignKey(
- name: "FK_TPRD_ProdSKU_TSYS_User_C_CreateBy",
- table: "TPRD_ProdSKU");
- migrationBuilder.DropForeignKey(
- name: "FK_TPRD_ProdSKU_TSYS_User_C_LastUpdatedBy",
- table: "TPRD_ProdSKU");
- migrationBuilder.DropForeignKey(
- name: "FK_TPRD_Product_TSYS_User_C_CreateBy",
- table: "TPRD_Product");
- migrationBuilder.DropForeignKey(
- name: "FK_TPRD_Product_TSYS_User_C_LastUpdatedBy",
- table: "TPRD_Product");
- migrationBuilder.DropForeignKey(
- name: "FK_TPRD_Type_TSYS_User_C_CreateBy",
- table: "TPRD_Type");
- migrationBuilder.DropForeignKey(
- name: "FK_TPRD_Type_TSYS_User_C_LastUpdatedBy",
- table: "TPRD_Type");
- migrationBuilder.DropForeignKey(
- name: "FK_TDEV_Device_TPRD_Product_C_ProductCode",
- table: "TDEV_Device");
- migrationBuilder.DropTable(
- name: "Report");
- migrationBuilder.DropTable(
- name: "TaskInfoDto");
- migrationBuilder.DropTable(
- name: "TBDM_CodeDetail");
- migrationBuilder.DropTable(
- name: "TBDM_CodeMain");
- migrationBuilder.DropTable(
- name: "TDEV_DevAlert");
- migrationBuilder.DropTable(
- name: "TDEV_DevAlertConfig");
- migrationBuilder.DropTable(
- name: "TDEV_DevData");
- migrationBuilder.DropTable(
- name: "TDEV_DevDataConfig");
- migrationBuilder.DropTable(
- name: "TISP_ContentGroupItem");
- migrationBuilder.DropTable(
- name: "TISP_RecordAlarm");
- migrationBuilder.DropTable(
- name: "TISP_RecordImage");
- migrationBuilder.DropTable(
- name: "TISP_SpotContent");
- migrationBuilder.DropTable(
- name: "TISP_SpotRegion");
- migrationBuilder.DropTable(
- name: "TISP_SpotRoute");
- migrationBuilder.DropTable(
- name: "TISP_SpotUser");
- migrationBuilder.DropTable(
- name: "TPNT_Area");
- migrationBuilder.DropTable(
- name: "TPRD_Log");
- migrationBuilder.DropTable(
- name: "TSEC_Record");
- migrationBuilder.DropTable(
- name: "TSEC_RecordImage");
- migrationBuilder.DropTable(
- name: "TSEC_RecordItem");
- migrationBuilder.DropTable(
- name: "TSYS_LicenseTypePriv");
- migrationBuilder.DropTable(
- name: "TSYS_Message");
- migrationBuilder.DropTable(
- name: "TSYS_Org");
- migrationBuilder.DropTable(
- name: "TSYS_Organize");
- migrationBuilder.DropTable(
- name: "TSYS_Post");
- migrationBuilder.DropTable(
- name: "TSYS_RolePriv");
- migrationBuilder.DropTable(
- name: "TSYS_UserPost");
- migrationBuilder.DropTable(
- name: "TSYS_UserRole");
- migrationBuilder.DropTable(
- name: "TSYS_Version");
- migrationBuilder.DropTable(
- name: "TasksQz");
- migrationBuilder.DropTable(
- name: "TISP_ContentGroup");
- migrationBuilder.DropTable(
- name: "TISP_RecordItem");
- migrationBuilder.DropTable(
- name: "TISP_Region");
- migrationBuilder.DropTable(
- name: "TISP_Route");
- migrationBuilder.DropTable(
- name: "TPNT_Store");
- migrationBuilder.DropTable(
- name: "TSYS_Priv");
- migrationBuilder.DropTable(
- name: "TSYS_Role");
- migrationBuilder.DropTable(
- name: "TISP_Content");
- migrationBuilder.DropTable(
- name: "TISP_Record");
- migrationBuilder.DropTable(
- name: "TBDM_Area");
- migrationBuilder.DropTable(
- name: "TPNT_StoreOrg");
- migrationBuilder.DropTable(
- name: "TPNT_Type");
- migrationBuilder.DropTable(
- name: "TSYS_License");
- migrationBuilder.DropTable(
- name: "TISP_Spot");
- migrationBuilder.DropTable(
- name: "TBDM_City");
- migrationBuilder.DropTable(
- name: "TSYS_LicenseType");
- migrationBuilder.DropTable(
- name: "TBDM_Prov");
- migrationBuilder.DropTable(
- name: "TSYS_User");
- migrationBuilder.DropTable(
- name: "TPRD_Product");
- migrationBuilder.DropTable(
- name: "TDEV_Device");
- migrationBuilder.DropTable(
- name: "TPRD_ProdSKU");
- migrationBuilder.DropTable(
- name: "TPRD_Type");
- }
- }
- }
|