USE WB19013
GO

/*==============================================================*/
/* Table: StockClearLog			                   */
/* Description: 软件过期表			    */
/* Author:shaocx												*/
/* CreateTime:2021-02-23							    */
/*==============================================================*/
IF NOT EXISTS( SELECT 1 FROM SYSOBJECTS  WHERE ID = OBJECT_ID('SoftDue') AND TYPE = 'U')
create table SoftDue(
   ID            int       IDENTITY(1,1) NOT NULL, -- 主键

   DuePass    NVARCHAR(128)   NOT NULL , -- 密码
   DueDay    NVARCHAR(128)   NOT NULL , -- 过期天数
   
   IsCompleted  char(1)    NULL , -- 是否完成（ 0 未完成 1 已完成）
   
   Remark    NVARCHAR(128)    NULL , -- 备注（清理缘由）
   Creator		varchar(128)	null,-- 创建人
   CreateTime		datetime	null, -- 创建时间
   LastModifier		varchar(128)	null,-- 修改人
   LastModifyTime   datetime	null -- 修改时间
   
   constraint PK_SoftDue primary key (ID) 
)
GO



/*==============================================================*/
/* Table: StockClearLog			                   */
/* Description: 库存清理日志表			    */
/* Author:shaocx												*/
/* CreateTime:2021-02-23							    */
/*==============================================================*/
IF NOT EXISTS( SELECT 1 FROM SYSOBJECTS  WHERE ID = OBJECT_ID('StockClearLog') AND TYPE = 'U')
create table StockClearLog(
   ID            int       IDENTITY(1,1) NOT NULL, -- 主键

   PlaceNo    NVARCHAR(128)   NOT NULL , -- 库位号
   StoreNo    INT   NOT NULL , -- 仓库号
   
   CarType   VARCHAR(50)     NULL , -- 车型
   MouldId    NVARCHAR(50)     NULL , -- 模具ID
   PartName   NVARCHAR(50)     NULL , -- 零件名称
   PartId   NVARCHAR(50)     NULL , -- 零件编号
   IsLock  char(1)    NULL , -- 是否锁定
   
   Remark    NVARCHAR(128)    NULL , -- 备注（清理缘由）
   Creator		varchar(128)	null,-- 创建人
   CreateTime		datetime	null, -- 创建时间
   LastModifier		varchar(128)	null,-- 修改人
   LastModifyTime   datetime	null -- 修改时间
   
   constraint PK_StockClearLog primary key (ID) 
)
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'库位号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'PlaceNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'仓库号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'StoreNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'车型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'CarType'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模具ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'MouldId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'PartName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'零件编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'PartId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'IsLock'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'Creator'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'CreateTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'LastModifier'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'LastModifyTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'StockClearLog', @level2type=N'COLUMN',@level2name=N'Remark'
GO



