| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370 |
- namespace ContractService.Migrations
- {
- using System;
- using System.Collections.Generic;
- using System.Data.Entity.Infrastructure.Annotations;
- using System.Data.Entity.Migrations;
-
- public partial class InitCreate : DbMigration
- {
- public override void Up()
- {
- CreateTable(
- "dbo.Cs_ClientCompanies",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- DisplayName = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_ClientCompanyInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Users",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- NormalizedUserName = c.String(nullable: false, maxLength: 256),
- NormalizedEmailAddress = c.String(nullable: false, maxLength: 256),
- ConcurrencyStamp = c.String(maxLength: 128),
- AuthenticationSource = c.String(maxLength: 64),
- UserName = c.String(nullable: false, maxLength: 256),
- UserType = c.Int(nullable: false),
- AccountType = c.Int(),
- AccountNo = c.String(maxLength: 100),
- ImagePath = c.String(maxLength: 1000),
- TenantId = c.Int(),
- EmailAddress = c.String(nullable: false, maxLength: 256),
- Name = c.String(nullable: false, maxLength: 64),
- Surname = c.String(maxLength: 64),
- AvatarImagePath = c.String(maxLength: 500),
- Password = c.String(nullable: false, maxLength: 128),
- EmailConfirmationCode = c.String(maxLength: 328),
- PasswordResetCode = c.String(maxLength: 328),
- LockoutEndDateUtc = c.DateTime(),
- AccessFailedCount = c.Int(nullable: false),
- IsLockoutEnabled = c.Boolean(nullable: false),
- PhoneNumber = c.String(maxLength: 32),
- IsPhoneNumberConfirmed = c.Boolean(nullable: false),
- SecurityStamp = c.String(maxLength: 128),
- IsTwoFactorEnabled = c.Boolean(nullable: false),
- IsEmailConfirmed = c.Boolean(nullable: false),
- IsActive = c.Boolean(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_User_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_User_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.UserName)
- .Index(t => t.UserType)
- .Index(t => t.AccountType)
- .Index(t => t.TenantId)
- .Index(t => t.EmailAddress)
- .Index(t => t.PhoneNumber)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_UserClaims",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- ClaimType = c.String(maxLength: 256),
- ClaimValue = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_UserLogins",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- LoginProvider = c.String(nullable: false, maxLength: 128),
- ProviderKey = c.String(nullable: false, maxLength: 256),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLogin_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_UserRoles",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- RoleId = c.Int(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserRole_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_Settings",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(),
- Name = c.String(nullable: false, maxLength: 256),
- Value = c.String(),
- DisplayName = c.String(maxLength: 50),
- Type = c.Int(),
- Description = c.String(maxLength: 500),
- Remark = c.String(maxLength: 500),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.UserId)
- .Index(t => new { t.TenantId, t.Name, t.UserId }, unique: true);
-
- CreateTable(
- "dbo.Cs_ClientOrganizations",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ParentNo = c.String(maxLength: 128),
- Name = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- Path = c.String(maxLength: 1000),
- Sort = c.Int(nullable: false),
- CompanyNo = c.String(maxLength: 128),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Cs_ClientCompanies", t => t.CompanyNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Cs_ClientOrganizations", t => t.ParentNo)
- .Index(t => t.ParentNo)
- .Index(t => t.CompanyNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Cs_ClientStaffs",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Code = c.String(maxLength: 50),
- Name = c.String(maxLength: 50),
- Profile = c.String(maxLength: 500),
- Birthday = c.DateTime(),
- IdCard = c.String(maxLength: 20),
- PhoneNumber = c.String(maxLength: 20),
- PhoneNumber2 = c.String(maxLength: 20),
- UserName = c.String(maxLength: 20),
- CompanyNo = c.String(maxLength: 128),
- OrganizationNo = c.String(maxLength: 128),
- Email = c.String(maxLength: 50),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_ClientStaffInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Cs_ClientCompanies", t => t.CompanyNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .ForeignKey("dbo.Cs_ClientOrganizations", t => t.OrganizationNo)
- .Index(t => t.CompanyNo)
- .Index(t => t.OrganizationNo)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Permissions",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- Name = c.String(nullable: false, maxLength: 500),
- Master = c.Int(),
- MasterValue = c.String(maxLength: 100),
- Access = c.Int(),
- AccessValue = c.String(maxLength: 500),
- IsGranted = c.Boolean(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- UserId = c.Long(),
- Discriminator = c.String(nullable: false, maxLength: 128),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_DataPermission_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_PermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_RolePermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_UserPermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId);
-
- CreateTable(
- "dbo.Ls_LawFirms",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Name = c.String(maxLength: 50),
- DisplayName = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LawFirmInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_Lawyers",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Code = c.String(maxLength: 50),
- Name = c.String(maxLength: 50),
- Profile = c.String(maxLength: 500),
- Email = c.String(maxLength: 50),
- Birthday = c.DateTime(),
- IdCard = c.String(maxLength: 20),
- PhoneNumber = c.String(maxLength: 20),
- PhoneNumber2 = c.String(maxLength: 20),
- UserName = c.String(maxLength: 20),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LawyerInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LawyerRelatedInfos",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- LawyerNo = c.String(nullable: false, maxLength: 128),
- RelatedType = c.Int(nullable: false),
- MasterType = c.Int(nullable: false),
- LawFirmNo = c.String(maxLength: 128),
- CaseNo = c.String(maxLength: 128),
- ContractNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 1000),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalCases", t => t.CaseNo)
- .ForeignKey("dbo.Ls_LegalContracts", t => t.ContractNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Ls_LawFirms", t => t.LawFirmNo)
- .ForeignKey("dbo.Ls_Lawyers", t => t.LawyerNo)
- .Index(t => t.LawyerNo)
- .Index(t => t.RelatedType)
- .Index(t => t.MasterType)
- .Index(t => t.LawFirmNo)
- .Index(t => t.CaseNo)
- .Index(t => t.ContractNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LegalCases",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Code = c.String(maxLength: 50),
- Name = c.String(maxLength: 50),
- Tags = c.String(maxLength: 200),
- Description = c.String(maxLength: 500),
- ServiceLevel = c.Int(nullable: false),
- CaseState = c.Int(nullable: false),
- ServiceType = c.String(maxLength: 128),
- StartDateTime = c.DateTime(),
- EndDateTime = c.DateTime(),
- StateLastChangeTime = c.DateTime(),
- StateLastChangeCause = c.String(maxLength: 500),
- Remark = c.String(maxLength: 1000),
- CompanyNo = c.String(maxLength: 128),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LegalCaseInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Cs_ClientCompanies", t => t.CompanyNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .ForeignKey("dbo.Base_LegalServiceTypes", t => t.ServiceType)
- .Index(t => t.ServiceType)
- .Index(t => t.CompanyNo)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Base_LegalServiceTypes",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ParentNo = c.String(maxLength: 128),
- Name = c.String(maxLength: 50),
- Description = c.String(maxLength: 500),
- ServiceTypePath = c.String(maxLength: 500),
- IsActive = c.Boolean(nullable: false),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id);
-
- CreateTable(
- "dbo.Ls_LegalContracts",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Code = c.String(maxLength: 50),
- Name = c.String(maxLength: 50),
- Tags = c.String(maxLength: 200),
- ContractState = c.Int(nullable: false),
- StartDateTime = c.DateTime(),
- EndDateTime = c.DateTime(),
- StateLastChangeTime = c.DateTime(),
- StateLastChangeCause = c.String(maxLength: 500),
- CaseNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LegalContractInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalCases", t => t.CaseNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.CaseNo)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LegalContractContents",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- No = c.String(maxLength: 128),
- ContentInfo = c.String(),
- Remark = c.String(maxLength: 1000),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LegalContractKeyPoints",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- ParentNo = c.String(maxLength: 128),
- Name = c.String(maxLength: 50),
- Tags = c.String(maxLength: 200),
- Description = c.String(maxLength: 500),
- KeyPointLevel = c.Int(nullable: false),
- KeyPointState = c.Int(nullable: false),
- ExpireDate = c.DateTime(),
- AlarmDate = c.DateTime(),
- ExecuteDate = c.DateTime(),
- ExpireDay = c.Int(nullable: false),
- AlarmDay = c.Int(nullable: false),
- KeyPointPath = c.String(maxLength: 500),
- ContractNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 1000),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalContracts", t => t.ContractNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .ForeignKey("dbo.Ls_LegalContractKeyPoints", t => t.ParentNo)
- .Index(t => t.ParentNo)
- .Index(t => t.ContractNo)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LegalContractNotes",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- ContractNo = c.String(maxLength: 128),
- KeyPointNo = c.String(maxLength: 128),
- IsLawyer = c.Boolean(nullable: false),
- NoteContent = c.String(maxLength: 1000),
- Remark = c.String(maxLength: 1000),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalContracts", t => t.ContractNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Ls_LegalContractKeyPoints", t => t.KeyPointNo)
- .Index(t => t.ContractNo)
- .Index(t => t.KeyPointNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LegalContractSupplements",
- c => new
- {
- Id = c.String(nullable: false, maxLength: 128),
- Code = c.String(maxLength: 50),
- Name = c.String(maxLength: 50),
- ContractNo = c.String(maxLength: 128),
- Remark = c.String(maxLength: 1000),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalContracts", t => t.ContractNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.ContractNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Ls_LegalCaseNotes",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- CaseNo = c.String(maxLength: 128),
- NoteContent = c.String(maxLength: 1000),
- Remark = c.String(maxLength: 1000),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalCases", t => t.CaseNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.CaseNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Notifications",
- c => new
- {
- Id = c.Guid(nullable: false),
- NotificationName = c.String(nullable: false, maxLength: 96),
- Data = c.String(),
- DataTypeName = c.String(maxLength: 512),
- EntityTypeName = c.String(maxLength: 250),
- EntityTypeAssemblyQualifiedName = c.String(maxLength: 512),
- EntityId = c.String(maxLength: 96),
- Severity = c.Byte(nullable: false),
- UserIds = c.String(),
- ExcludedUserIds = c.String(),
- TenantIds = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id);
-
- CreateTable(
- "dbo.Sys_NotificationSubscriptions",
- c => new
- {
- Id = c.Guid(nullable: false),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- NotificationName = c.String(maxLength: 96),
- EntityTypeName = c.String(maxLength: 250),
- EntityTypeAssemblyQualifiedName = c.String(maxLength: 512),
- EntityId = c.String(maxLength: 96),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_NotificationSubscriptionInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => new { t.NotificationName, t.EntityTypeName, t.EntityId, t.UserId });
-
- CreateTable(
- "dbo.Sys_Roles",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Description = c.String(),
- NormalizedName = c.String(nullable: false, maxLength: 32),
- ConcurrencyStamp = c.String(maxLength: 128),
- TenantId = c.Int(),
- Name = c.String(nullable: false, maxLength: 32),
- RoleType = c.Int(nullable: false),
- AccountType = c.Int(),
- DisplayName = c.String(nullable: false, maxLength: 64),
- IsStatic = c.Boolean(nullable: false),
- IsDefault = c.Boolean(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Role_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_Role_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.TenantId)
- .Index(t => t.Name)
- .Index(t => t.RoleType)
- .Index(t => t.AccountType)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_RoleClaims",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- RoleId = c.Int(nullable: false),
- ClaimType = c.String(maxLength: 256),
- ClaimValue = c.String(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_RoleClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Roles", t => t.RoleId)
- .Index(t => t.TenantId)
- .Index(t => t.RoleId);
-
- CreateTable(
- "dbo.Cs_StaffRelateInfos",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- StaffNo = c.String(maxLength: 128),
- CompanyNo = c.String(maxLength: 128),
- CaseNo = c.String(maxLength: 128),
- ContractNo = c.String(maxLength: 128),
- RelatedType = c.Int(nullable: false),
- MasterType = c.Int(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Ls_LegalCases", t => t.CaseNo)
- .ForeignKey("dbo.Cs_ClientCompanies", t => t.CompanyNo)
- .ForeignKey("dbo.Ls_LegalContracts", t => t.ContractNo)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Cs_ClientStaffs", t => t.StaffNo)
- .Index(t => t.StaffNo)
- .Index(t => t.CompanyNo)
- .Index(t => t.CaseNo)
- .Index(t => t.ContractNo)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_AppGuids",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Step = c.Short(nullable: false),
- LastId = c.Int(nullable: false),
- IdType = c.Short(nullable: false),
- LastUseDate = c.DateTime(),
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.IdType);
-
- CreateTable(
- "dbo.Sys_AttachFiles",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- AttachNo = c.String(maxLength: 32),
- TableName = c.String(maxLength: 50),
- ColumnName = c.String(maxLength: 50),
- SourceKey = c.String(maxLength: 50),
- FileTitle = c.String(maxLength: 50),
- FileName = c.String(maxLength: 50),
- FilePath = c.String(maxLength: 500),
- FileType = c.String(maxLength: 20),
- FileExt = c.String(maxLength: 10),
- Description = c.String(maxLength: 500),
- TenantId = c.Int(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysAttachFile_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .Index(t => t.TenantId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_Functions",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- FunctionNo = c.String(maxLength: 100),
- ParentNo = c.String(maxLength: 100),
- FunctionName = c.String(maxLength: 100),
- PermissionName = c.String(maxLength: 500),
- FunctionType = c.Int(nullable: false),
- Action = c.String(maxLength: 50),
- Controller = c.String(maxLength: 50),
- Url = c.String(),
- Icon = c.String(maxLength: 20),
- Class = c.String(maxLength: 100),
- Script = c.String(),
- NeedAuth = c.Boolean(nullable: false),
- Sort = c.Int(nullable: false),
- Depth = c.Int(nullable: false),
- IsLeaf = c.Boolean(),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.FunctionNo)
- .Index(t => t.PermissionName, unique: true)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_SysHelps",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- Classification = c.String(maxLength: 40),
- HelpTitle = c.String(nullable: false, maxLength: 50),
- HelpKeyWords = c.String(maxLength: 50),
- HelpContent = c.String(),
- FunctionNo = c.String(maxLength: 100),
- PermissionName = c.String(maxLength: 500),
- Sequence = c.Int(nullable: false),
- Description = c.String(),
- Remark = c.String(maxLength: 1000),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysHelp_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_AuditLogs",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(nullable: false),
- UserId = c.Long(),
- UserName = c.String(),
- ServiceName = c.String(maxLength: 256),
- ServiceNameLang = c.String(),
- MethodName = c.String(maxLength: 256),
- MethodNameLang = c.String(),
- Parameters = c.String(maxLength: 1024),
- ExecutionTime = c.DateTime(nullable: false),
- ExecutionDuration = c.Int(nullable: false),
- ClientIpAddress = c.String(maxLength: 64),
- ClientName = c.String(maxLength: 128),
- BrowserInfo = c.String(maxLength: 512),
- Exception = c.String(maxLength: 2000),
- ImpersonatorUserId = c.Long(),
- ImpersonatorTenantId = c.Int(),
- CustomData = c.String(maxLength: 2000),
- LogType = c.Int(nullable: false),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysLog_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => t.UserId);
-
- CreateTable(
- "dbo.Sys_QueryInfos",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- TableKey = c.String(maxLength: 30),
- ColumnKey = c.String(maxLength: 30),
- ValueKey = c.String(maxLength: 100),
- NameKey = c.String(maxLength: 100),
- UseCount = c.Int(nullable: false),
- LastUseDate = c.DateTime(nullable: false),
- ExtensionData = c.String(),
- Remark = c.String(maxLength: 500),
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TableKey)
- .Index(t => t.ColumnKey)
- .Index(t => t.ValueKey)
- .Index(t => t.NameKey);
-
- CreateTable(
- "dbo.Sys_States",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- StateNo = c.String(maxLength: 32),
- StateName = c.String(maxLength: 50),
- TableName = c.String(nullable: false, maxLength: 50),
- ColumnName = c.String(nullable: false, maxLength: 50),
- CodeValue = c.String(nullable: false, maxLength: 100),
- DisplayValue = c.String(nullable: false, maxLength: 100),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_NotificationTenants",
- c => new
- {
- Id = c.Guid(nullable: false),
- TenantId = c.Int(),
- NotificationName = c.String(nullable: false, maxLength: 96),
- Data = c.String(),
- DataTypeName = c.String(maxLength: 512),
- EntityTypeName = c.String(maxLength: 250),
- EntityTypeAssemblyQualifiedName = c.String(maxLength: 512),
- EntityId = c.String(maxLength: 96),
- Severity = c.Byte(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TenantNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId);
-
- CreateTable(
- "dbo.Sys_Tenants",
- c => new
- {
- Id = c.Int(nullable: false, identity: true),
- TenancyName = c.String(nullable: false, maxLength: 64),
- Name = c.String(nullable: false, maxLength: 128),
- ConnectionString = c.String(maxLength: 1024),
- IsActive = c.Boolean(nullable: false),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Tenant_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId)
- .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId)
- .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId)
- .Index(t => t.IsDeleted)
- .Index(t => t.DeleterUserId)
- .Index(t => t.LastModifierUserId)
- .Index(t => t.CreatorUserId);
-
- CreateTable(
- "dbo.Sys_UserAccounts",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- UserLinkId = c.Long(),
- UserName = c.String(maxLength: 256),
- EmailAddress = c.String(maxLength: 256),
- IsDeleted = c.Boolean(nullable: false),
- DeleterUserId = c.Long(),
- DeletionTime = c.DateTime(),
- LastModificationTime = c.DateTime(),
- LastModifierUserId = c.Long(),
- CreationTime = c.DateTime(nullable: false),
- CreatorUserId = c.Long(),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserAccount_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.IsDeleted);
-
- CreateTable(
- "dbo.Sys_UserLoginAttempts",
- c => new
- {
- Id = c.Long(nullable: false, identity: true),
- TenantId = c.Int(),
- TenancyName = c.String(maxLength: 64),
- UserId = c.Long(),
- UserNameOrEmailAddress = c.String(maxLength: 255),
- ClientIpAddress = c.String(maxLength: 64),
- ClientName = c.String(maxLength: 128),
- BrowserInfo = c.String(maxLength: 512),
- Result = c.Byte(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLoginAttempt_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => new { t.UserId, t.TenantId })
- .Index(t => new { t.TenancyName, t.UserNameOrEmailAddress, t.Result });
-
- CreateTable(
- "dbo.Sys_NotificationUsers",
- c => new
- {
- Id = c.Guid(nullable: false),
- TenantId = c.Int(),
- UserId = c.Long(nullable: false),
- TenantNotificationId = c.Guid(nullable: false),
- State = c.Int(nullable: false),
- CreationTime = c.DateTime(nullable: false),
- },
- annotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- })
- .PrimaryKey(t => t.Id)
- .Index(t => t.TenantId)
- .Index(t => new { t.UserId, t.State, t.CreationTime });
-
- }
-
- public override void Down()
- {
- DropForeignKey("dbo.Sys_Tenants", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Tenants", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Tenants", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_States", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_States", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_States", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_SysHelps", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_SysHelps", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_SysHelps", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Functions", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Functions", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Functions", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_AttachFiles", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_StaffRelateInfos", "StaffNo", "dbo.Cs_ClientStaffs");
- DropForeignKey("dbo.Cs_StaffRelateInfos", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_StaffRelateInfos", "ContractNo", "dbo.Ls_LegalContracts");
- DropForeignKey("dbo.Cs_StaffRelateInfos", "CompanyNo", "dbo.Cs_ClientCompanies");
- DropForeignKey("dbo.Cs_StaffRelateInfos", "CaseNo", "dbo.Ls_LegalCases");
- DropForeignKey("dbo.Sys_Roles", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Roles", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Roles", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_RoleClaims", "RoleId", "dbo.Sys_Roles");
- DropForeignKey("dbo.Ls_LegalCaseNotes", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalCaseNotes", "CaseNo", "dbo.Ls_LegalCases");
- DropForeignKey("dbo.Ls_LegalContractSupplements", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContractSupplements", "ContractNo", "dbo.Ls_LegalContracts");
- DropForeignKey("dbo.Ls_LegalContractNotes", "KeyPointNo", "dbo.Ls_LegalContractKeyPoints");
- DropForeignKey("dbo.Ls_LegalContractNotes", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContractNotes", "ContractNo", "dbo.Ls_LegalContracts");
- DropForeignKey("dbo.Ls_LegalContractKeyPoints", "ParentNo", "dbo.Ls_LegalContractKeyPoints");
- DropForeignKey("dbo.Ls_LegalContractKeyPoints", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContractKeyPoints", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContractKeyPoints", "ContractNo", "dbo.Ls_LegalContracts");
- DropForeignKey("dbo.Ls_LegalContractContents", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LawyerRelatedInfos", "LawyerNo", "dbo.Ls_Lawyers");
- DropForeignKey("dbo.Ls_LawyerRelatedInfos", "LawFirmNo", "dbo.Ls_LawFirms");
- DropForeignKey("dbo.Ls_LawyerRelatedInfos", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LawyerRelatedInfos", "ContractNo", "dbo.Ls_LegalContracts");
- DropForeignKey("dbo.Ls_LegalContracts", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContracts", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContracts", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalContracts", "CaseNo", "dbo.Ls_LegalCases");
- DropForeignKey("dbo.Ls_LawyerRelatedInfos", "CaseNo", "dbo.Ls_LegalCases");
- DropForeignKey("dbo.Ls_LegalCases", "ServiceType", "dbo.Base_LegalServiceTypes");
- DropForeignKey("dbo.Ls_LegalCases", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalCases", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalCases", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LegalCases", "CompanyNo", "dbo.Cs_ClientCompanies");
- DropForeignKey("dbo.Ls_Lawyers", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_Lawyers", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_Lawyers", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LawFirms", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LawFirms", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Ls_LawFirms", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientStaffs", "OrganizationNo", "dbo.Cs_ClientOrganizations");
- DropForeignKey("dbo.Cs_ClientStaffs", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientStaffs", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientStaffs", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientStaffs", "CompanyNo", "dbo.Cs_ClientCompanies");
- DropForeignKey("dbo.Cs_ClientOrganizations", "ParentNo", "dbo.Cs_ClientOrganizations");
- DropForeignKey("dbo.Cs_ClientOrganizations", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientOrganizations", "CompanyNo", "dbo.Cs_ClientCompanies");
- DropForeignKey("dbo.Cs_ClientCompanies", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientCompanies", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Cs_ClientCompanies", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Settings", "UserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_UserRoles", "UserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_UserLogins", "UserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Users", "LastModifierUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Users", "DeleterUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_Users", "CreatorUserId", "dbo.Sys_Users");
- DropForeignKey("dbo.Sys_UserClaims", "UserId", "dbo.Sys_Users");
- DropIndex("dbo.Sys_NotificationUsers", new[] { "UserId", "State", "CreationTime" });
- DropIndex("dbo.Sys_NotificationUsers", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserLoginAttempts", new[] { "TenancyName", "UserNameOrEmailAddress", "Result" });
- DropIndex("dbo.Sys_UserLoginAttempts", new[] { "UserId", "TenantId" });
- DropIndex("dbo.Sys_UserLoginAttempts", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserAccounts", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Tenants", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Tenants", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Tenants", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Tenants", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_NotificationTenants", new[] { "TenantId" });
- DropIndex("dbo.Sys_States", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_States", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_States", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_States", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_QueryInfos", new[] { "NameKey" });
- DropIndex("dbo.Sys_QueryInfos", new[] { "ValueKey" });
- DropIndex("dbo.Sys_QueryInfos", new[] { "ColumnKey" });
- DropIndex("dbo.Sys_QueryInfos", new[] { "TableKey" });
- DropIndex("dbo.Sys_AuditLogs", new[] { "UserId" });
- DropIndex("dbo.Sys_AuditLogs", new[] { "TenantId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_SysHelps", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Functions", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Functions", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Functions", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Functions", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Functions", new[] { "PermissionName" });
- DropIndex("dbo.Sys_Functions", new[] { "FunctionNo" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_AttachFiles", new[] { "TenantId" });
- DropIndex("dbo.Sys_AppGuids", new[] { "IdType" });
- DropIndex("dbo.Cs_StaffRelateInfos", new[] { "CreatorUserId" });
- DropIndex("dbo.Cs_StaffRelateInfos", new[] { "ContractNo" });
- DropIndex("dbo.Cs_StaffRelateInfos", new[] { "CaseNo" });
- DropIndex("dbo.Cs_StaffRelateInfos", new[] { "CompanyNo" });
- DropIndex("dbo.Cs_StaffRelateInfos", new[] { "StaffNo" });
- DropIndex("dbo.Sys_RoleClaims", new[] { "RoleId" });
- DropIndex("dbo.Sys_RoleClaims", new[] { "TenantId" });
- DropIndex("dbo.Sys_Roles", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Roles", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Roles", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Roles", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Roles", new[] { "AccountType" });
- DropIndex("dbo.Sys_Roles", new[] { "RoleType" });
- DropIndex("dbo.Sys_Roles", new[] { "Name" });
- DropIndex("dbo.Sys_Roles", new[] { "TenantId" });
- DropIndex("dbo.Sys_NotificationSubscriptions", new[] { "NotificationName", "EntityTypeName", "EntityId", "UserId" });
- DropIndex("dbo.Sys_NotificationSubscriptions", new[] { "TenantId" });
- DropIndex("dbo.Ls_LegalCaseNotes", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalCaseNotes", new[] { "CaseNo" });
- DropIndex("dbo.Ls_LegalContractSupplements", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalContractSupplements", new[] { "ContractNo" });
- DropIndex("dbo.Ls_LegalContractNotes", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalContractNotes", new[] { "KeyPointNo" });
- DropIndex("dbo.Ls_LegalContractNotes", new[] { "ContractNo" });
- DropIndex("dbo.Ls_LegalContractKeyPoints", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalContractKeyPoints", new[] { "LastModifierUserId" });
- DropIndex("dbo.Ls_LegalContractKeyPoints", new[] { "ContractNo" });
- DropIndex("dbo.Ls_LegalContractKeyPoints", new[] { "ParentNo" });
- DropIndex("dbo.Ls_LegalContractContents", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalContracts", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalContracts", new[] { "LastModifierUserId" });
- DropIndex("dbo.Ls_LegalContracts", new[] { "DeleterUserId" });
- DropIndex("dbo.Ls_LegalContracts", new[] { "IsDeleted" });
- DropIndex("dbo.Ls_LegalContracts", new[] { "CaseNo" });
- DropIndex("dbo.Ls_LegalCases", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LegalCases", new[] { "LastModifierUserId" });
- DropIndex("dbo.Ls_LegalCases", new[] { "DeleterUserId" });
- DropIndex("dbo.Ls_LegalCases", new[] { "IsDeleted" });
- DropIndex("dbo.Ls_LegalCases", new[] { "CompanyNo" });
- DropIndex("dbo.Ls_LegalCases", new[] { "ServiceType" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "ContractNo" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "CaseNo" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "LawFirmNo" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "MasterType" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "RelatedType" });
- DropIndex("dbo.Ls_LawyerRelatedInfos", new[] { "LawyerNo" });
- DropIndex("dbo.Ls_Lawyers", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_Lawyers", new[] { "LastModifierUserId" });
- DropIndex("dbo.Ls_Lawyers", new[] { "DeleterUserId" });
- DropIndex("dbo.Ls_Lawyers", new[] { "IsDeleted" });
- DropIndex("dbo.Ls_LawFirms", new[] { "CreatorUserId" });
- DropIndex("dbo.Ls_LawFirms", new[] { "LastModifierUserId" });
- DropIndex("dbo.Ls_LawFirms", new[] { "DeleterUserId" });
- DropIndex("dbo.Ls_LawFirms", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Permissions", new[] { "TenantId" });
- DropIndex("dbo.Cs_ClientStaffs", new[] { "CreatorUserId" });
- DropIndex("dbo.Cs_ClientStaffs", new[] { "LastModifierUserId" });
- DropIndex("dbo.Cs_ClientStaffs", new[] { "DeleterUserId" });
- DropIndex("dbo.Cs_ClientStaffs", new[] { "IsDeleted" });
- DropIndex("dbo.Cs_ClientStaffs", new[] { "OrganizationNo" });
- DropIndex("dbo.Cs_ClientStaffs", new[] { "CompanyNo" });
- DropIndex("dbo.Cs_ClientOrganizations", new[] { "CreatorUserId" });
- DropIndex("dbo.Cs_ClientOrganizations", new[] { "CompanyNo" });
- DropIndex("dbo.Cs_ClientOrganizations", new[] { "ParentNo" });
- DropIndex("dbo.Sys_Settings", new[] { "TenantId", "Name", "UserId" });
- DropIndex("dbo.Sys_UserRoles", new[] { "UserId" });
- DropIndex("dbo.Sys_UserRoles", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserLogins", new[] { "UserId" });
- DropIndex("dbo.Sys_UserLogins", new[] { "TenantId" });
- DropIndex("dbo.Sys_UserClaims", new[] { "UserId" });
- DropIndex("dbo.Sys_UserClaims", new[] { "TenantId" });
- DropIndex("dbo.Sys_Users", new[] { "CreatorUserId" });
- DropIndex("dbo.Sys_Users", new[] { "LastModifierUserId" });
- DropIndex("dbo.Sys_Users", new[] { "DeleterUserId" });
- DropIndex("dbo.Sys_Users", new[] { "IsDeleted" });
- DropIndex("dbo.Sys_Users", new[] { "PhoneNumber" });
- DropIndex("dbo.Sys_Users", new[] { "EmailAddress" });
- DropIndex("dbo.Sys_Users", new[] { "TenantId" });
- DropIndex("dbo.Sys_Users", new[] { "AccountType" });
- DropIndex("dbo.Sys_Users", new[] { "UserType" });
- DropIndex("dbo.Sys_Users", new[] { "UserName" });
- DropIndex("dbo.Cs_ClientCompanies", new[] { "CreatorUserId" });
- DropIndex("dbo.Cs_ClientCompanies", new[] { "LastModifierUserId" });
- DropIndex("dbo.Cs_ClientCompanies", new[] { "DeleterUserId" });
- DropIndex("dbo.Cs_ClientCompanies", new[] { "IsDeleted" });
- DropTable("dbo.Sys_NotificationUsers",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserLoginAttempts",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLoginAttempt_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserAccounts",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserAccount_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Tenants",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Tenant_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_NotificationTenants",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_TenantNotificationInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_States",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_QueryInfos");
- DropTable("dbo.Sys_AuditLogs",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysLog_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_SysHelps",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysHelp_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Functions",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_AttachFiles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysAttachFile_MustHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_AppGuids");
- DropTable("dbo.Cs_StaffRelateInfos");
- DropTable("dbo.Sys_RoleClaims",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_RoleClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Roles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_Role_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_Role_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_NotificationSubscriptions",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_NotificationSubscriptionInfo_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Notifications");
- DropTable("dbo.Ls_LegalCaseNotes");
- DropTable("dbo.Ls_LegalContractSupplements");
- DropTable("dbo.Ls_LegalContractNotes");
- DropTable("dbo.Ls_LegalContractKeyPoints");
- DropTable("dbo.Ls_LegalContractContents");
- DropTable("dbo.Ls_LegalContracts",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LegalContractInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Base_LegalServiceTypes");
- DropTable("dbo.Ls_LegalCases",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LegalCaseInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Ls_LawyerRelatedInfos");
- DropTable("dbo.Ls_Lawyers",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LawyerInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Ls_LawFirms",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_LawFirmInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Permissions",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_DataPermission_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_PermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_RolePermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_UserPermissionSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Cs_ClientStaffs",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_ClientStaffInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Cs_ClientOrganizations");
- DropTable("dbo.Sys_Settings",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_SysSetting_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserRoles",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserRole_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserLogins",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserLogin_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_UserClaims",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_UserClaim_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Sys_Users",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_User_MayHaveTenant", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- { "DynamicFilter_User_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- DropTable("dbo.Cs_ClientCompanies",
- removedAnnotations: new Dictionary<string, object>
- {
- { "DynamicFilter_ClientCompanyInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
- });
- }
- }
- }
|