123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314 |
- SELECT count(*)
- FROM sys.sysobjects
- WHERE (type = 'u')
- GO
- --创建数据库的SQL语句:
- create database LYFZERPDB
- on --primary -- 默认就属于primary文件组,可省略
- (
- /*--数据文件的具体描述--*/
- name='LYFZERPDB_data', -- 主数据文件的逻辑名称
- filename='D:\LYFZ_File\DB\LYFZERPDB_data.mdf', -- 主数据文件的物理名称
- size=5mb, --主数据文件的初始大小
- --maxsize=100mb, -- 主数据文件增长的最大值
- filegrowth=15%--主数据文件的增长率
- )
- log on
- (
- /*--日志文件的具体描述,各参数含义同上--*/
- name='LYFZERPDB_log',
- filename='D:\LYFZ_File\DB\LYFZERPDB_log.ldf',
- size=2mb,
- filegrowth=1mb
- )
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpUser]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpUser]
- GO
- CREATE TABLE [dbo].[tb_ErpUser] (
- [ID] int identity NOT NULL
- , [User_Account] nvarchar(20) NOT NULL
- , [User_Name] nvarchar(20) NOT NULL
- , [User_Password] nvarchar(100) NOT NULL
- , [User_EmployeeID] nvarchar(20) NOT NULL
- , [User_Department] nvarchar(20) NOT NULL
- , [User_Positions] nvarchar(20) NOT NULL
- , [User_Competence] nvarchar(200) NOT NULL
- , [User_OnlineTime] datetime NOT NULL
- , [User_Sex] nvarchar(2) NOT NULL
- , [User_Status] nvarchar(10) NOT NULL
- , [User_IsDisable] bit NOT NULL
- , [User_Ethnic] nvarchar(50) NOT NULL
- , [User_Hometown] nvarchar(50) NOT NULL
- , [User_NowAddress] nvarchar(200) NOT NULL
- , [User_IdentityCardID] nvarchar(50) NOT NULL
- , [User_HometownAddress] nvarchar(200) NOT NULL
- , [User_IsMarried] bit NOT NULL
- , [User_FirstFingerprintID] nvarchar(20) NOT NULL
- , [User_SecondaryFingerprintID] nvarchar(20) NOT NULL
- , [User_ICQAccount] nvarchar(50) NOT NULL
- , [User_Email] nvarchar(100) NOT NULL
- , [User_MicroSignal] nvarchar(100) NOT NULL
- , [User_Attachment] nvarchar(800) NOT NULL
- , [User_Remark] nvarchar(800) NOT NULL
- , [User_CreateDatetime] datetime NOT NULL
- , [User_UpdateDatetime] datetime NOT NULL
- , [User_SubordinateList] nvarchar(2000) NOT NULL
- , [User_Telephone] nvarchar(20) NOT NULL
- , [User_CustomerID] int NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpUser] ADD CONSTRAINT [tb_ErpUser_PK] PRIMARY KEY CLUSTERED (
- [User_Account]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpTheScenery]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpTheScenery]
- GO
- CREATE TABLE [dbo].[tb_ErpTheScenery] (
- [ID] int identity NOT NULL
- , [Tsc_Name] nvarchar(200) NOT NULL
- , [Tsc_Introduction] nvarchar(800) NOT NULL
- , [Tsc_DetailsOf] text NULL
- , [Tsc_Address] nvarchar(100) NULL
- , [Tsc_CostPrice] decimal(10,2) NOT NULL
- , [Tsc_SalesPrice] decimal(10,2) NULL
- , [Tsc_Remark] nvarchar(800) NULL
- , [Tsc_Thumbnail] nvarchar(800) NULL
- , [Tsc_PhotoAlbum] nvarchar(800) NULL
- , [Tsc_IsDisable] bit NOT NULL
- , [Tsc_CreateDatetime] datetime NOT NULL
- , [Tsc_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpTheScenery] ADD CONSTRAINT [tb_ErpTheScenery_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpOrderProductList]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpOrderProductList]
- GO
- CREATE TABLE [dbo].[tb_ErpOrderProductList] (
- [ID] int identity NOT NULL
- , [OPlist_OrderNumber] nvarchar(20) NOT NULL
- , [OPlist_ProdClassCode] nvarchar(10) NOT NULL
- , [OPlist_ProdClassName] nvarchar(100) NULL
- , [OPlist_MainPhoto] nvarchar(200) NULL
- , [OPlist_ProdNumber] nvarchar(100) NOT NULL
- , [OPlist_ProdName] nvarchar(100) NOT NULL
- , [OPlist_ProdCostPrice] decimal(10,2) NOT NULL
- , [OPlist_ProdSoldPrice] decimal(10,2) NOT NULL
- , [OPlist_ProdQuantity] int NOT NULL
- , [OPlist_ProdThumbnail] nvarchar(800) NULL
- , [OPlist_Remark] nvarchar(800) NULL
- , [OPlist_CreateDatetime] datetime NULL
- , [OPlist_Type] nvarchar(20) NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpOrderProductList] ADD CONSTRAINT [tb_ErpOrderProductList_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpInformation]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpInformation]
- GO
- CREATE TABLE [dbo].[tb_ErpInformation] (
- [ID] int identity NOT NULL
- , [Info_Type] nvarchar(20) NOT NULL
- , [Info_Category] nvarchar(100) NOT NULL
- , [Info_ParentID] int NULL
- , [Info_Title] nvarchar(200) NOT NULL
- , [Info_ChlidTitle] nvarchar(200) NULL
- , [Info_Introduction] nvarchar(800) NULL
- , [Info_Content] text NOT NULL
- , [Info_Plotting] nvarchar(200) NULL
- , [Info_Attachment] nvarchar(800) NULL
- , [Info_Source] nvarchar(200) NULL
- , [Info_Editing] nvarchar(20) NULL
- , [Info_Publisher] nvarchar(20) NULL
- , [Info_ClickRate] int NULL
- , [Info_IsEnabled] bit NULL
- , [Info_IsExamine] bit NULL
- , [Info_Remark] nvarchar(800) NULL
- , [Info_Order] int NOT NULL
- , [Info_ExamineName] nvarchar(20) NULL
- , [Info_URL] nvarchar(500) NULL
- , [Info_IsEnabledURL] bit NULL
- , [Info_IsDelete] bit NULL
- , [Info_CreateDatetime] datetime NOT NULL
- , [Info_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpInformation] ADD CONSTRAINT [tb_ErpInformation_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpProduct]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpProduct]
- GO
- CREATE TABLE [dbo].[tb_ErpProduct] (
- [ID] int identity NOT NULL
- , [Prod_Number] nvarchar(20) NOT NULL
- , [Prod_Name] nvarchar(100) NOT NULL
- , [Prod_Class] nvarchar(100) NOT NULL
- , [Prod_Unit] nvarchar(10) NOT NULL
- , [Prod_CostPrice] decimal(10,2) NOT NULL
- , [Prod_SalesPrice ] decimal(10,2) NOT NULL
- , [Prod_SpecialPrice] decimal(10,2) NULL
- , [Prod_PurchasePrice] decimal(10,2) NOT NULL
- , [Prod_IsRetail] bit NOT NULL
- , [Prod_IsEnabled] bit NOT NULL
- , [Prod_Introduction] nvarchar(800) NULL
- , [Prod_Detail] text NULL
- , [Prod_Remark] nvarchar(800) NULL
- , [Prod_Quantity] int NOT NULL
- , [Prod_Thumbnail] nvarchar(800) NULL
- , [Prod_FullSizeImage] nvarchar(800) NULL
- , [Prod_CreateDatetime] datetime NOT NULL
- , [Prod_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpProduct] ADD CONSTRAINT [tb_ErpProduct_PK] PRIMARY KEY CLUSTERED (
- [Prod_Number]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpAttendanceRecord]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpAttendanceRecord]
- GO
- CREATE TABLE [dbo].[tb_ErpAttendanceRecord] (
- [ID] int identity NOT NULL
- , [Ar_FingerprintID] nvarchar(100) NOT NULL
- , [Ar_UserID] nvarchar(20) NOT NULL
- , [Ar_UserName] nvarchar(20) NULL
- , [Ar_ArriveIate] nvarchar(100) NULL
- , [Ar_LeaveEarly] nvarchar(100) NULL
- , [Ar_Absenteeism] nvarchar(100) NULL
- , [Ar_AskForleave] nvarchar(100) NULL
- , [Ar_Day1] nvarchar(50) NULL
- , [Ar_Day2] nvarchar(50) NULL
- , [Ar_Day3] nvarchar(50) NULL
- , [Ar_Day4] nvarchar(50) NULL
- , [Ar_Day5] nvarchar(50) NULL
- , [Ar_Day6] nvarchar(50) NULL
- , [Ar_Day7] nvarchar(50) NULL
- , [Ar_Day8] nvarchar(50) NULL
- , [Ar_Day9] nvarchar(50) NULL
- , [Ar_Day10] nvarchar(50) NULL
- , [Ar_Day11] nvarchar(50) NULL
- , [Ar_Day12] nvarchar(50) NULL
- , [Ar_Day13] nvarchar(50) NULL
- , [Ar_Day14] nvarchar(50) NULL
- , [Ar_Day15] nvarchar(50) NULL
- , [Ar_Day16] nvarchar(50) NULL
- , [Ar_Day17] nvarchar(50) NULL
- , [Ar_Day18] nvarchar(50) NULL
- , [Ar_Day19] nvarchar(50) NULL
- , [Ar_Day20] nvarchar(50) NULL
- , [Ar_Day21] nvarchar(50) NULL
- , [Ar_Day22] nvarchar(50) NULL
- , [Ar_Day23] nvarchar(50) NULL
- , [Ar_Day24] nvarchar(50) NULL
- , [Ar_Day25] nvarchar(50) NULL
- , [Ar_Day26] nvarchar(50) NULL
- , [Ar_Day27] nvarchar(50) NULL
- , [Ar_Day28] nvarchar(50) NULL
- , [Ar_Day29] nvarchar(50) NULL
- , [Ar_Day30] nvarchar(50) NULL
- , [Ar_Day31] nvarchar(50) NULL
- , [Ar_Type] nvarchar(20) NULL
- , [Ar_Month] int NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpAttendanceRecord] ADD CONSTRAINT [tb_ErpAttendanceRecord_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpInternalMail]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpInternalMail]
- GO
- CREATE TABLE [dbo].[tb_ErpInternalMail] (
- [ID] int identity NOT NULL
- , [Imail_Type] nvarchar(20) NULL
- , [Imail_Title] nvarchar(100) NOT NULL
- , [Imail_Content] text NOT NULL
- , [Imail_FromName] nvarchar(20) NOT NULL
- , [Imail_ToName] nvarchar(4000) NOT NULL
- , [Imail_Attachment] nvarchar(800) NULL
- , [Imail_Status] nvarchar(20) NOT NULL
- , [Imail_ReadList] nvarchar(4000) NULL
- , [Imail_OwnerList] nvarchar(4000) NULL
- , [Imail_ToSendDatetime] datetime NOT NULL
- , [Imail_DeleteList] nvarchar(4000) NOT NULL
- , [Imail_CreateDatetime] datetime NOT NULL
- , [Imail_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpInternalMail] ADD CONSTRAINT [tb_ErpInternalMail_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpPayment]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpPayment]
- GO
- CREATE TABLE [dbo].[tb_ErpPayment] (
- [ID] int identity NOT NULL
- , [Pay_OrdNumber] nvarchar(20) NOT NULL
- , [Pay_AmountOf] decimal(10,2) NOT NULL
- , [Pay_OpenSingle] nvarchar(20) NOT NULL
- , [Pay_ThePayee] nvarchar(20) NOT NULL
- , [Pay_PaymentMethod] nvarchar(50) NOT NULL
- , [Pay_OrdersLocation] nvarchar(100) NOT NULL
- , [Pay_ReceivableProject] nvarchar(500) NOT NULL
- , [Pay_Remark] nvarchar(800) NULL
- , [Pay_CreateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpPayment] ADD CONSTRAINT [tb_ErpPayment_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpMembershipCard]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpMembershipCard]
- GO
- CREATE TABLE [dbo].[tb_ErpMembershipCard] (
- [ID] int identity NOT NULL
- , [Mc_Number] nvarchar(50) NOT NULL
- , [Mc_IdentityCardID] nvarchar(30) NULL
- , [Mc_Name] nvarchar(20) NULL
- , [Mc_Sex] bit NULL
- , [Mc_Telephone] nvarchar(20) NULL
- , [Mc_QQ] nvarchar(20) NULL
- , [Mc_Address] nvarchar(100) NULL
- , [Mc_WorkUnit] nvarchar(100) NULL
- , [MC_Birthday] nvarchar(20) NULL
- , [Mc_CardType] nvarchar(20) NULL
- , [Mc_CardLevel] nvarchar(10) NULL
- , [Mc_Discount] decimal(10,2) NULL
- , [Mc_Points] int NULL
- , [Mc_IssuingDate] datetime NULL
- , [Mc_RecyclingDate] datetime NULL
- , [Mc_Remark] nvarchar(800) NULL
- , [Mc_Status] nvarchar(20) NULL
- , [Mc_ParentID] int NULL
- , [Mc_ConsumerPassword] nvarchar(100) NULL
- , [Mc_Money] decimal(10,2) NULL
- , [Mc_Profession] nvarchar(100) NULL
- , [Mc_PackagesMoney] decimal(10,2) NULL
- , [Mc_AvailableCashBack] decimal(10,2) NULL
- , [Mc_AlreadyCashBack] decimal(10,2) NULL
- , [Mc_CreateDatetime] datetime NULL
- , [Mc_UpdateDateTime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpMembershipCard] ADD CONSTRAINT [tb_ErpMembershipCard_PK] PRIMARY KEY CLUSTERED (
- [Mc_Number]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpFixedAssetManagement]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpFixedAssetManagement]
- GO
- CREATE TABLE [dbo].[tb_ErpFixedAssetManagement] (
- [ID] int NOT NULL
- , [Fam_Name] nvarchar(200) NOT NULL
- , [Fam_Specification] nvarchar(500) NOT NULL
- , [Fam_Quantity] int NOT NULL
- , [Fam_PurchasePrice] decimal(10,2) NULL
- , [Fam_BuyDatetime] datetime NULL
- , [Fam_Custodian] nvarchar(20) NULL
- , [Fam_Remark] nvarchar(800) NULL
- , [Fam_PhotoAlbum] nvarchar(2000) NULL
- , [Fam_CreateDatetime] datetime NULL
- , [Fam_UpdateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpFixedAssetManagement] ADD CONSTRAINT [tb_ErpFixedAssetManagement_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSystemLogs]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSystemLogs]
- GO
- CREATE TABLE [dbo].[tb_ErpSystemLogs] (
- [ID] int identity NOT NULL
- , [Slogs_Type] nvarchar(10) NOT NULL
- , [Slogs_Topic] nvarchar(200) NOT NULL
- , [Slogs_Content] nvarchar(500) NOT NULL
- , [Slogs_UserName] nvarchar(20) NOT NULL
- , [Slogs_IP] nvarchar(100) NOT NULL
- , [Slogs_CreateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSystemLogs] ADD CONSTRAINT [tb_ErpSystemLogs_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpInventoryRecords]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpInventoryRecords]
- GO
- CREATE TABLE [dbo].[tb_ErpInventoryRecords] (
- [ID] int identity NOT NULL
- , [Ir_Type] nvarchar(20) NOT NULL
- , [Ir_ProductID] nvarchar(20) NOT NULL
- , [Ir_Number] nvarchar(50) NOT NULL
- , [Ir_ProductCategory] nvarchar(200) NOT NULL
- , [Ir_ProductName] nvarchar(200) NOT NULL
- , [Ir_Quantity] int NOT NULL
- , [Ir_PersonHandling] nvarchar(20) NOT NULL
- , [Ir_Remark] nvarchar(800) NULL
- , [Ir_CreateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpInventoryRecords] ADD CONSTRAINT [tb_ErpInventoryRecords_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpOrder]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpOrder]
- GO
- CREATE TABLE [dbo].[tb_ErpOrder] (
- [ID] int identity NOT NULL
- , [Ord_Number] nvarchar(20) NOT NULL
- , [Ord_Name1] nvarchar(20) NOT NULL
- , [Ord_Name2] nvarchar(20) NOT NULL
- , [Ord_PhotographyCategory] nvarchar(20) NULL
- , [Ord_CustomerSource] nvarchar(20) NULL
- , [Ord_PhotographyStatus] nvarchar(20) NOT NULL
- , [Ord_EarlyRepairStatus] nvarchar(10) NOT NULL
- , [Ord_FilmSelectionStatus] nvarchar(10) NOT NULL
- , [Ord_RefinementStatus] nvarchar(10) NOT NULL
- , [Ord_DesignStatus] nvarchar(10) NOT NULL
- , [Ord_LookDesignStatus] nvarchar(10) NOT NULL
- , [Ord_TakePiecesStatus] nvarchar(10) NOT NULL
- , [Ord_AppointmentTime] datetime NOT NULL
- , [Ord_PhotographyTime] datetime NOT NULL
- , [Ord_EarlyRepairTime] datetime NOT NULL
- , [Ord_RefinementTime] datetime NOT NULL
- , [Ord_LookDesignTime] datetime NOT NULL
- , [Ord_FilmSelectionTime] datetime NOT NULL
- , [Ord_TakePiecesTime] datetime NOT NULL
- , [Ord_OrdersPerson] nvarchar(20) NOT NULL
- , [Ord_SeriesName] nvarchar(30) NOT NULL
- , [Ord_SeriesPrice] decimal(10,2) NOT NULL
- , [Ord_PhotographerNmae] nvarchar(20) NOT NULL
- , [Ord_MakeupArtistName] nvarchar(20) NOT NULL
- , [Ord_EarlyRepairName] nvarchar(20) NOT NULL
- , [Ord_FilmSelectionName] nvarchar(20) NOT NULL
- , [Ord_RefinementName] nvarchar(20) NOT NULL
- , [Ord_DesignerName] nvarchar(20) NOT NULL
- , [Ord_LookDesignName] nvarchar(20) NOT NULL
- , [Ord_EntryClerkName] nvarchar(20) NOT NULL
- , [Ord_Discount] decimal(10,2) NOT NULL
- , [Ord_Authorize] nvarchar(20) NOT NULL
- , [Ord_AfterDiscount] decimal(10,2) NOT NULL
- , [Ord_AfterAuthorize] decimal(10,2) NOT NULL
- , [Ord_GentlemenPhone] nvarchar(20) NOT NULL
- , [Ord_LadiesPhone] nvarchar(20) NOT NULL
- , [Ord_UserAccount] nvarchar(20) NOT NULL
- , [Ord_CustomerID] nvarchar(20) NOT NULL
- , [Ord_Price] decimal(10,2) NULL
- , [Ord_Remark] nvarchar(800) NULL
- , [Ord_CreateDatetime] datetime NOT NULL
- , [Ord_UpdateDatetime] datetime NOT NULL
- , [Ord_PhotoPath] nvarchar(800) NULL
- , [Ord_ClothingQuantity] int NOT NULL
- , [Ord_Styling] nvarchar(100) NOT NULL
- , [Ord_OnLocation] int NOT NULL
- , [Ord_InteriorView] int NOT NULL
- , [Ord_Mc_Number] nvarchar(50) NOT NULL
- , [Ord_DesignTime] datetime NOT NULL
- , [Ord_PhotographerAssistant] nvarchar(20) NOT NULL
- , [Ord_MakeupArtistAssistant] nvarchar(20) NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpOrder] ADD CONSTRAINT [tb_ErpOrder_PK] PRIMARY KEY CLUSTERED (
- [Ord_Number]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpDepartment]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpDepartment]
- GO
- CREATE TABLE [dbo].[tb_ErpDepartment] (
- [ID] int identity NOT NULL
- , [Dt_Name] nvarchar(200) NOT NULL
- , [Dt_ChargeMan] nvarchar(20) NULL
- , [Dt_Telephone] nvarchar(50) NULL
- , [Dt_Fax] nvarchar(50) NULL
- , [Dt_Remark] nvarchar(800) NULL
- , [Dt_CreateDatetime] datetime NULL
- , [Dt_UpdateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpDepartment] ADD CONSTRAINT [tb_ErpDepartment_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpRentalSaleRecords]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpRentalSaleRecords]
- GO
- CREATE TABLE [dbo].[tb_ErpRentalSaleRecords] (
- [ID] int identity NOT NULL
- , [Rrlist_RsoNumber] nvarchar(50) NOT NULL
- , [Rrlist_ProductName] nvarchar(100) NULL
- , [Rrlist_ProductNumber] nvarchar(50) NULL
- , [Rrlist_ProductQuantity] int NULL
- , [Rrlist_ProductThumbnail] nvarchar(800) NULL
- , [Rrlist_Status] nvarchar(20) NULL
- , [Rrlist_EstimateTakeDate] datetime NULL
- , [Rrlist_EstimateReturnDate] datetime NULL
- , [Rrlist_ActualTakeDate] datetime NULL
- , [Rrlist_ActualReturnDate] datetime NULL
- , [Rrlist_RentalSaleRemark] nvarchar(800) NULL
- , [Rrlist_Money] decimal(10,2) NULL
- , [Rrlist_Deposit] decimal(10,2) NULL
- , [Rrlist_ProductBuyPrice] decimal(10,2) NULL
- , [Rrlist_ExpiredDays] int NULL
- , [Rrlist_ExtendedPayment] decimal(10,2) NULL
- , [Rrlist_ReturnRemark] nvarchar(800) NULL
- , [Rso_HandlingPerson] nvarchar(20) NOT NULL
- , [Rrlist_Type] nvarchar(20) NOT NULL
- , [Rrlist_CreateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpRentalSaleRecords] ADD CONSTRAINT [tb_ErpRentalSaleRecords_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSmsAccountInfo]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSmsAccountInfo]
- GO
- CREATE TABLE [dbo].[tb_ErpSmsAccountInfo] (
- [ID] int NOT NULL
- , [Smsa_AccountNumber] nvarchar(20) NOT NULL
- , [Smsa_AccountName] nvarchar(20) NOT NULL
- , [Smsa_Password] nvarchar(100) NOT NULL
- , [Smsa_MoneyBalances] decimal(10,2) NOT NULL
- , [Smsa_SendTypes] nvarchar(100) NOT NULL
- , [Smsa_CrealeDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSmsAccountInfo] ADD CONSTRAINT [tb_ErpSmsAccountInfo_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpRegion]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpRegion]
- GO
- CREATE TABLE [dbo].[tb_ErpRegion] (
- [ID] int NOT NULL
- , [Region_code] nvarchar(100) NOT NULL
- , [Region_name] nvarchar(100) NOT NULL
- , [Region_ParentID] nvarchar(100) NOT NULL
- , [Region_level] int NULL
- , [Region_order] int NULL
- , [Region_name_en] nvarchar(100) NULL
- , [Region_shortname_en] nvarchar(10) NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpRegion] ADD CONSTRAINT [tb_ErpRegion_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpCallWizard]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpCallWizard]
- GO
- CREATE TABLE [dbo].[tb_ErpCallWizard] (
- [ID] int identity NOT NULL
- , [Callw_Telephone] nvarchar(20) NOT NULL
- , [Callw_DateTime] datetime NOT NULL
- , [Callw_Status] nvarchar(50) NULL
- , [Callw_Remark] nvarchar(800) NULL
- , [Callw_SoundRecording] nvarchar(1000) NULL
- , [Callw_UpdateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpCallWizard] ADD CONSTRAINT [tb_ErpCallWizard_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpCustomer]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpCustomer]
- GO
- CREATE TABLE [dbo].[tb_ErpCustomer] (
- [ID] int identity NOT NULL
- , [Cus_Type] nvarchar(20) NOT NULL
- , [Cus_Name1] nvarchar(20) NOT NULL
- , [Cus_Name2] nvarchar(20) NOT NULL
- , [Cus_Telephone1] nvarchar(20) NULL
- , [Cus_Telephone2] nvarchar(20) NULL
- , [Cus_FixedPhone] nvarchar(20) NULL
- , [Cus_QQ1] nvarchar(20) NULL
- , [Cus_QQ2] nvarchar(20) NULL
- , [Cus_Sex1] int NULL
- , [Cus_Sex2] int NULL
- , [Cus_Birthday1] nvarchar(20) NULL
- , [Cus_Birthday2] nvarchar(20) NULL
- , [Cus_Region1] nvarchar(100) NULL
- , [Cus_Region2] nvarchar(100) NULL
- , [Cus_Address1] nvarchar(100) NULL
- , [Cus_Address2] nvarchar(100) NULL
- , [Cus_WorkUnit1] nvarchar(100) NULL
- , [Cus_WorkUnit2] nvarchar(100) NULL
- , [Cus_DayForMarriage] nvarchar(20) NULL
- , [Cus_OrderDate] datetime NULL
- , [Cus_PackagesName] nvarchar(100) NULL
- , [Cus_PackagesMoney] decimal(10,2) NULL
- , [Cus_EntryClerk] nvarchar(100) NULL
- , [Cus_CustomerSource] nvarchar(100) NULL
- , [Cus_Status] nvarchar(20) NULL
- , [Cus_LossReason] nvarchar(100) NULL
- , [Cus_Remark] char(10) NULL
- , [Cus_OrderRecord ] nvarchar(500) NULL
- , [Cus_ServiceType] nvarchar(10) NOT NULL
- , [Cus_IdentityCardID1] nvarchar(30) NULL
- , [Cus_IdentityCardID2] nvarchar(30) NULL
- , [Cus_CreateDatetime] datetime NULL
- , [Cus_UpdateDatetime] datetime NULL
- , [Cus_Lunar1] bit NULL
- , [Cus_Lunar2] bit NULL
- , [Cus_LovedStyle] nvarchar(500) NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpCustomer] ADD CONSTRAINT [tb_ErpCustomer_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpCommissionConfigure]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpCommissionConfigure]
- GO
- CREATE TABLE [dbo].[tb_ErpCommissionConfigure] (
- [ID] int identity NOT NULL
- , [Cconfig_Type] nvarchar(20) NOT NULL
- , [Cconfig_OrderNumber] nvarchar(100) NOT NULL
- , [Cconfig_Photographer1] nvarchar(20) NOT NULL
- , [Cconfig_PhotographerProportion1] decimal(10,2) NOT NULL
- , [Cconfig_Photographer2] nvarchar(20) NULL
- , [Cconfig_PhotographerProportion2] decimal(10,2) NULL
- , [Cconfig_Photographer3] nvarchar(20) NULL
- , [Cconfig_PhotographerProportion3] decimal(10,2) NULL
- , [Cconfig_Photographer4] nvarchar(20) NULL
- , [Cconfig_PhotographerProportion4] decimal(10,2) NULL
- , [Cconfig_MakeupArtist1] nvarchar(20) NOT NULL
- , [Cconfig_MakeupArtistProportion1] decimal(10,2) NOT NULL
- , [Cconfig_MakeupArtist2] nvarchar(20) NULL
- , [Cconfig_MakeupArtistProportion2] decimal(10,2) NULL
- , [Cconfig_MakeupArtist3] nvarchar(20) NULL
- , [Cconfig_MakeupArtistProportion3] decimal(10,2) NULL
- , [Cconfig_MakeupArtist4] nvarchar(20) NULL
- , [Cconfig_MakeupArtistProportion4] decimal(10,2) NULL
- , [Cconfig_MainStore] nvarchar(20) NULL
- , [Cconfig_MainStoreProportion] decimal(10,2) NOT NULL
- , [Cconfig_ViceStore] nvarchar(20) NOT NULL
- , [Cconfig_ViceProportion] decimal(10,2) NULL
- , [Cconfig_CreateDatetime] datetime NOT NULL
- , [Cconfig_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpCommissionConfigure] ADD CONSTRAINT [tb_ErpCommissionConfigure_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpPackages]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpPackages]
- GO
- CREATE TABLE [dbo].[tb_ErpPackages] (
- [ID] int identity NOT NULL
- , [Pak_PackagesID] nvarchar(20) NOT NULL
- , [Pak_PackagesClass] nvarchar(10) NOT NULL
- , [Pak_Name] nvarchar(200) NOT NULL
- , [Pak_UnitPrice] decimal(10,2) NOT NULL
- , [Pak_IsDisable] bit NOT NULL
- , [Pak_Remark] nvarchar(200) NULL
- , [Pak_IntoTheArchive] int NOT NULL
- , [Pak_IntoTheBook] int NOT NULL
- , [Pak_CreateDatetime] datetime NOT NULL
- , [Pak_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpPackages] ADD CONSTRAINT [tb_ErpPackages_PK] PRIMARY KEY CLUSTERED (
- [Pak_PackagesID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpFormalDress]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpFormalDress]
- GO
- CREATE TABLE [dbo].[tb_ErpFormalDress] (
- [ID] int identity NOT NULL
- , [Fd_Number] nvarchar(20) NOT NULL
- , [Fd_Type] nvarchar(100) NOT NULL
- , [Fd_Category] nvarchar(100) NOT NULL
- , [Fd_PlacedArea] nvarchar(50) NULL
- , [Fd_Name] nvarchar(100) NULL
- , [Fd_Quantity] int NULL
- , [Fd_RentalPrice] decimal(10,2) NULL
- , [Fd_SalePrice] decimal(10,2) NULL
- , [Fd_BuyPrice] decimal(10,2) NULL
- , [Fd_BuyDatetime] datetime NULL
- , [Fd_Introduction] nvarchar(800) NULL
- , [Fd_Detail] text NULL
- , [Fd_MainPhoto ] nvarchar(200) NULL
- , [Fd_Thumbnail] nvarchar(800) NULL
- , [Fd_PhotoAlbum] nvarchar(800) NULL
- , [Fd_Remark] nvarchar(800) NULL
- , [Fd_StarRating] int NULL
- , [Fd_IsEnabled] bit NOT NULL
- , [Fd_IsShows] bit NOT NULL
- , [Fd_Status] nvarchar(100) NOT NULL
- , [Fd_AreLeasedQuantity] int NOT NULL
- , [Fd_HasSoldQuantity] int NOT NULL
- , [Fd_TheLaundryQuantity] int NOT NULL
- , [Fd_CreateDatetime] datetime NOT NULL
- , [Fd_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpFormalDress] ADD CONSTRAINT [tb_ErpFormalDress_PK] PRIMARY KEY CLUSTERED (
- [Fd_Number]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSMSTemplates]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSMSTemplates]
- GO
- CREATE TABLE [dbo].[tb_ErpSMSTemplates] (
- [ID] int identity NOT NULL
- , [Smst_Type] nvarchar(20) NULL
- , [Smst_Category] nvarchar(100) NULL
- , [Smst_Title] nvarchar(500) NULL
- , [Smst_Content] nvarchar(4000) NULL
- , [Smst_IsReadOnly] bit NULL
- , [Smst_SendCondition] nvarchar(500) NULL
- , [Smst_CreateDatetime] datetime NULL
- , [Smst_UpdateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSMSTemplates] ADD CONSTRAINT [tb_ErpSMSTemplates_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSystemCategory]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSystemCategory]
- GO
- CREATE TABLE [dbo].[tb_ErpSystemCategory] (
- [ID] int identity NOT NULL
- , [Sc_ClassCode] nvarchar(10) NOT NULL
- , [Sc_ClassName] nvarchar(100) NOT NULL
- , [Sc_ClassParentID] int NOT NULL
- , [Sc_ClassRemark] nvarchar(500) NOT NULL
- , [Sc_IsDisable] bit NOT NULL
- , [Sc_IsReadOnly] bit NOT NULL
- , [Sc_URL] nvarchar(50) NULL
- , [Sc_IsEnabledURL] bit NULL
- , [Sc_CreateDatetime] datetime NOT NULL
- , [Sc_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSystemCategory] ADD CONSTRAINT [tb_ErpSystemCategory_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSystemInfo]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSystemInfo]
- GO
- CREATE TABLE [dbo].[tb_ErpSystemInfo] (
- [ID] int identity NOT NULL
- , [SysInfo_SysName] nvarchar(100) NULL
- , [SysInfo_Version] nvarchar(50) NULL
- , [SysInfo_Description] nvarchar(800) NULL
- , [SysInfo_CompanyName] nvarchar(100) NULL
- , [SysInfo_Telephone] nvarchar(200) NULL
- , [SysInfo_Fax] nvarchar(50) NULL
- , [SysInfo_Email] nvarchar(100) NULL
- , [SysInfo_Address] nvarchar(200) NULL
- , [SysInfo_URL] nvarchar(200) NULL
- , [SysInfo_Agreement] nvarchar(800) NULL
- , [SysInfo_CopyrightNotice] nvarchar(800) NULL
- , [SysInfo_ServiceDescription] nvarchar(800) NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSystemInfo] ADD CONSTRAINT [tb_ErpSystemInfo_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSMSRecord]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSMSRecord]
- GO
- CREATE TABLE [dbo].[tb_ErpSMSRecord] (
- [ID] int identity NOT NULL
- , [Smsr_RecipientNumber] nvarchar(4000) NOT NULL
- , [Smsr_Content] nvarchar(500) NOT NULL
- , [Smsr_SendCreateDatetime] datetime NOT NULL
- , [Smsr_SendExpense] decimal(10,2) NULL
- , [Smsr_Status] nvarchar(200) NULL
- , [Smsr_SendPeople] nvarchar(20) NULL
- , [Smsr_SendSumCount] int NULL
- , [Smsr_SendSuccess] int NULL
- , [Smsr_FailureTelephone] nvarchar(4000) NULL
- , [Smsr_SendRemark] nvarchar(800) NULL
- , [Smsr_CreateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSMSRecord] ADD CONSTRAINT [tb_ErpSMSRecord_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpRewardPunishment]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpRewardPunishment]
- GO
- CREATE TABLE [dbo].[tb_ErpRewardPunishment] (
- [ID] int identity NOT NULL
- , [Rp_Type] nvarchar(20) NOT NULL
- , [Rp_RelevantPeople] nvarchar(20) NOT NULL
- , [Rp_Money] decimal(10,2) NOT NULL
- , [Rp_Status] nvarchar(20) NULL
- , [Rp_RPDatetime] datetime NULL
- , [Rp_PersonHandling] nvarchar(20) NOT NULL
- , [Rp_Reason] nvarchar(800) NOT NULL
- , [Rp_Remark] nvarchar(800) NULL
- , [Rp_CreateDatetime] datetime NOT NULL
- , [Rp_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpRewardPunishment] ADD CONSTRAINT [tb_ErpRewardPunishment_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpUserExpandInfo]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpUserExpandInfo]
- GO
- CREATE TABLE [dbo].[tb_ErpUserExpandInfo] (
- [ID] int identity NOT NULL
- , [Uei_UserAccount] nvarchar(20) NOT NULL
- , [Uei_EfFieldCode] nvarchar(10) NOT NULL
- , [Uei_ExpandValue] nvarchar(1000) NOT NULL
- , [Uei_CreateDatetime] datetime NOT NULL
- , [Uei_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpUserExpandInfo] ADD CONSTRAINT [tb_ErpUserExpandInfo_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpUseRecord]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpUseRecord]
- GO
- CREATE TABLE [dbo].[tb_ErpUseRecord] (
- [ID] int identity NOT NULL
- , [Ur_McNumber] nvarchar(50) NOT NULL
- , [Ur_ParentNumber] nvarchar(50) NOT NULL
- , [Ur_Type] nvarchar(20) NOT NULL
- , [Ur_OrderNumber] nvarchar(50) NULL
- , [Ur_Points] int NOT NULL
- , [Ur_Money] decimal(10,2) NULL
- , [Ur_Title] nvarchar(100) NOT NULL
- , [Ur_Remark] nvarchar(800) NULL
- , [Ur_CreateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpUseRecord] ADD CONSTRAINT [tb_ErpUseRecord_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpOtherIncomeAndExpenses]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpOtherIncomeAndExpenses]
- GO
- CREATE TABLE [dbo].[tb_ErpOtherIncomeAndExpenses] (
- [ID] int identity NOT NULL
- , [Oiae_Type] nvarchar(20) NULL
- , [Oiae_ProjectName] nvarchar(200) NOT NULL
- , [Oiae_Money] decimal(10,2) NOT NULL
- , [Oiae_IEDatetime] datetime NOT NULL
- , [Oiae_PersonHandling] nvarchar(20) NOT NULL
- , [Oiae_ThePayer] nvarchar(20) NOT NULL
- , [Oiae_Invoice] nvarchar(500) NULL
- , [Oiae_Remark] nvarchar(800) NULL
- , [Oiae_CreateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpOtherIncomeAndExpenses] ADD CONSTRAINT [tb_ErpOtherIncomeAndExpenses_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpCompanyInfo]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpCompanyInfo]
- GO
- CREATE TABLE [dbo].[tb_ErpCompanyInfo] (
- [ID] int identity NOT NULL
- , [Company_Name] nvarchar(100) NOT NULL
- , [Company_Manager] nvarchar(20) NULL
- , [Company_Telephone ] nvarchar(100) NULL
- , [Company_Fax] nvarchar(20) NULL
- , [Company_URL] nvarchar(100) NULL
- , [Company_Address] nvarchar(100) NULL
- , [Company_SingleTitle] nvarchar(200) NULL
- , [Company_SingleExplanation] nvarchar(200) NULL
- , [Company_ReservationExplanation] nvarchar(800) NULL
- , [Company_ProductionNotes] nvarchar(800) NULL
- , [Company_DressDescription] nvarchar(800) NULL
- , [Company_DimensionalCode] nvarchar(200) NULL
- , [Company_About] nvarchar(800) NULL
- , [Company_PhotoThumbnail] nvarchar(800) NULL
- , [Company_PhotoAlbum] nvarchar(800) NULL
- , [Company_Detail] text NULL
- , [Company_CreateDatetime] datetime NOT NULL
- , [Company_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpCompanyInfo] ADD CONSTRAINT [tb_ErpCompanyInfo_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpContactRecord]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpContactRecord]
- GO
- CREATE TABLE [dbo].[tb_ErpContactRecord] (
- [ID] int identity NOT NULL
- , [Cr_CustomerID] nvarchar(20) NOT NULL
- , [Cr_ContactName] nvarchar(20) NOT NULL
- , [Cr_Topic] nvarchar(100) NOT NULL
- , [Cr_Content] nvarchar(800) NOT NULL
- , [Cr_CustomerResponse] nvarchar(800) NULL
- , [Cr_Remark] nvarchar(800) NULL
- , [Cr_ReturnVisitTime] datetime NULL
- , [Cr_IsRemind] bit NULL
- , [Cr_ContactDatetime] datetime NULL
- , [Cr_CreateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpContactRecord] ADD CONSTRAINT [tb_ErpContactRecord_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpClientSatisfaction]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpClientSatisfaction]
- GO
- CREATE TABLE [dbo].[tb_ErpClientSatisfaction] (
- [ID] int identity NOT NULL
- , [Csf_OrdersNumber] nvarchar(20) NOT NULL
- , [Csf_Reception] int NULL
- , [Csf_Makeup] int NULL
- , [Csf_Photography] int NULL
- , [Csf_Digital] int NULL
- , [Csf_FilmSelection] int NULL
- , [Csf_Progress] int NULL
- , [Csf_Product] int NULL
- , [Csf_Remark] nvarchar(800) NULL
- , [Csf_CreateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpClientSatisfaction] ADD CONSTRAINT [tb_ErpClientSatisfaction_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpPermissionTemplate]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpPermissionTemplate]
- GO
- CREATE TABLE [dbo].[tb_ErpPermissionTemplate] (
- [ID] int identity NOT NULL
- , [Pte_TemplateName] nvarchar(20) NOT NULL
- , [Pte_PermissionValue] nvarchar(200) NOT NULL
- , [Pte_CreateDatetime] datetime NOT NULL
- , [Pte_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpPermissionTemplate] ADD CONSTRAINT [tb_ErpPermissionTemplate_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpExpandField]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpExpandField]
- GO
- CREATE TABLE [dbo].[tb_ErpExpandField] (
- [ID] int identity NOT NULL
- , [Ef_FieldCode] nvarchar(10) NOT NULL
- , [Ef_FieldName] nvarchar(20) NOT NULL
- , [Ef_FieldValueList] nvarchar(1000) NOT NULL
- , [Ef_DefaultValue] nvarchar(200) NOT NULL
- , [Ef_FieldType] nvarchar(10) NOT NULL
- , [Ef_CreateDatetime] datetime NOT NULL
- , [Ef_UpdateDatetime] datetime NOT NULL
- , [Ef_FieldRemark] nvarchar(100) NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpExpandField] ADD CONSTRAINT [tb_ErpExpandField_PK] PRIMARY KEY CLUSTERED (
- [Ef_FieldCode]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpTwoSalesOrder]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpTwoSalesOrder]
- GO
- CREATE TABLE [dbo].[tb_ErpTwoSalesOrder] (
- [ID] int identity NOT NULL
- , [Tsorder_Number] nvarchar(50) NOT NULL
- , [Tsorder_Name] nvarchar(200) NOT NULL
- , [Tsorder_CustomerName] nvarchar(200) NOT NULL
- , [Tsorder_Telephone] nvarchar(20) NOT NULL
- , [Tsorder_Money] decimal(10,2) NOT NULL
- , [Tsorder_Quantity] int NOT NULL
- , [Tsorder_Category] nvarchar(200) NOT NULL
- , [Tsorder_OpenSingle] nvarchar(20) NOT NULL
- , [Tsorder_PersonHandling] nvarchar(20) NOT NULL
- , [Tsorder_Remark] nvarchar(800) NULL
- , [Tsorder_CreateDatetime] datetime NOT NULL
- , [Tsorder_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpTwoSalesOrder] ADD CONSTRAINT [tb_ErpTwoSalesOrder_PK] PRIMARY KEY CLUSTERED (
- [Tsorder_Number]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpSystemConfigure]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpSystemConfigure]
- GO
- CREATE TABLE [dbo].[tb_ErpSystemConfigure] (
- [ID] int identity NOT NULL
- , [Sconfig_Code] nvarchar(10) NOT NULL
- , [Sconfig_Name] nvarchar(100) NOT NULL
- , [Sconfig_Value] nvarchar(500) NOT NULL
- , [Sconfig_IsEnabled] bit NULL
- , [Sconfig_Remark] nvarchar(800) NULL
- , [Sconfig_Type] nvarchar(10) NOT NULL
- , [Sconfig_Order] int NULL
- , [Sconfig_CreateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpSystemConfigure] ADD CONSTRAINT [tb_ErpSystemConfigure_PK] PRIMARY KEY CLUSTERED (
- [Sconfig_Code]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpConfigureInfo]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpConfigureInfo]
- GO
- CREATE TABLE [dbo].[tb_ErpConfigureInfo] (
- [ID] int identity NOT NULL
- , [Cfinfo_Code] nvarchar(10) NOT NULL
- , [Cfinfo_Type] nvarchar(10) NOT NULL
- , [Cfinfo_Title] nvarchar(200) NOT NULL
- , [Cfinfo_Text] text NOT NULL
- , [Cfinfo_IsEnabled] bit NOT NULL
- , [Cfinfo_Order] int NULL
- , [Cfinfo_CreateDatetime] datetime NULL
- , [Cfinfo_UpdateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpConfigureInfo] ADD CONSTRAINT [tb_ErpConfigureInfo_PK] PRIMARY KEY CLUSTERED (
- [Cfinfo_Code]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpRosteringSettings]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpRosteringSettings]
- GO
- CREATE TABLE [dbo].[tb_ErpRosteringSettings] (
- [ID] int identity NOT NULL
- , [Rs_Name] nvarchar(20) NOT NULL
- , [Rs_WorkTime] nvarchar(100) NOT NULL
- , [Rs_OffWorkTime] nvarchar(100) NOT NULL
- , [Rs_CreateDatetime] datetime NOT NULL
- , [Rs_UpdateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpRosteringSettings] ADD CONSTRAINT [tb_ErpRosteringSettings_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpVendor]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpVendor]
- GO
- CREATE TABLE [dbo].[tb_ErpVendor] (
- [ID] int identity NOT NULL
- , [Vd_Number] nvarchar(20) NOT NULL
- , [Vd_Name] nvarchar(100) NOT NULL
- , [Vd_Address] nvarchar(200) NULL
- , [Vd_ContactPerson] nvarchar(20) NULL
- , [Vd_Telephone] nvarchar(100) NULL
- , [Vd_Fax] nvarchar(50) NULL
- , [Vd_URL] nvarchar(200) NULL
- , [Vd_Remark] nvarchar(800) NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpVendor] ADD CONSTRAINT [tb_ErpVendor_PK] PRIMARY KEY CLUSTERED (
- [Vd_Number]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpStyle]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpStyle]
- GO
- CREATE TABLE [dbo].[tb_ErpStyle] (
- [ID] int identity NOT NULL
- , [Style_Name] nvarchar(20) NOT NULL
- , [Style_Description] nvarchar(800) NULL
- , [Style_PhotoThumbnail] nvarchar(800) NULL
- , [Style_PhotoAlbum] nvarchar(800) NULL
- , [Style_Detail] text NULL
- , [Style_StarRating] int NULL
- , [Style_CreateDatetime] datetime NULL
- , [Style_UpdateDatetime] datetime NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpStyle] ADD CONSTRAINT [tb_ErpStyle_PK] PRIMARY KEY CLUSTERED (
- [ID]
- )
- GO
- GO
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_ErpRentalSaleOrder]') AND type in (N'U'))
- DROP TABLE [dbo].[tb_ErpRentalSaleOrder]
- GO
- CREATE TABLE [dbo].[tb_ErpRentalSaleOrder] (
- [ID] int identity NOT NULL
- , [Rso_Number] nvarchar(50) NOT NULL
- , [Rso_Type] nvarchar(50) NOT NULL
- , [Rso_RentMoney] decimal(10,2) NOT NULL
- , [Rso_Deposit] decimal(10,2) NOT NULL
- , [Rso_HandlingPerson] nvarchar(20) NOT NULL
- , [Rso_RentalSaleDatetime] datetime NOT NULL
- , [Rso_RentalSaleRemark] nvarchar(800) NULL
- , [Rso_ReturnRemark] nvarchar(800) NULL
- , [Rso_CustomerName] nvarchar(20) NOT NULL
- , [Rso_Telephone] nvarchar(20) NOT NULL
- , [Rso_QQ] nvarchar(20) NULL
- , [Rso_Address] nvarchar(100) NULL
- , [Rso_CompanyName] nvarchar(100) NULL
- , [Rso_WeddingDay] datetime NULL
- , [Rso_Birthday] nvarchar(20) NULL
- , [Rso_EstimateTakeDate] datetime NOT NULL
- , [Rso_EstimateReturnDate] datetime NOT NULL
- , [Rso_ActualTakeDate] datetime NOT NULL
- , [Rso_ActualReturnDate] datetime NOT NULL
- , [Rso_ProductName] nvarchar(100) NOT NULL
- , [Rso_ProductNumber] nvarchar(20) NOT NULL
- , [Rso_ProductQuantity] int NOT NULL
- , [Rso_Status] nvarchar(20) NOT NULL
- , [Rso_CreateDatetime] datetime NOT NULL
- )
- GO
- ALTER TABLE [dbo].[tb_ErpRentalSaleOrder] ADD CONSTRAINT [tb_ErpRentalSaleOrder_PK] PRIMARY KEY CLUSTERED (
- [Rso_Number]
- )
- GO
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[tb_ErpPackagesGiftMerchandise](
- [ID] [int] IDENTITY(1,1) NOT NULL,
- [Pgm_GiveType] [int] NULL,
- [Pgm_ProductNumber] [nvarchar](20) NULL,
- [Pgm_Quantity] [int] NULL,
- [Pgm_PackagesNumber] [nvarchar](20) NULL
- CONSTRAINT [PK_tb_ErpPackagesGiftMerchandise] PRIMARY KEY CLUSTERED
- (
- [ID] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
- --GO
|