

/*==============================================================*/
/* Table: Reagt_Bad                                             */
/*==============================================================*/
create table Reagt_Bad (
   BadId                bigint               identity(1, 1),
   VerifyTime           datetime2            null,
   Number               int                  null,
   code                 varchar(20)          collate Chinese_PRC_CI_AS null,
   VerifyPeople         varchar(50)          collate Chinese_PRC_CI_AS null,
   Remark               varchar(500)         collate Chinese_PRC_CI_AS null,
   constraint PK_BAD primary key (BadId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Certification                                   */
/*==============================================================*/
create table Reagt_Certification (
   CertificationId      int                  identity(1, 1),
   Code                 varchar(9)           collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   constraint PK_CERTIFICATION primary key (CertificationId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Entry                                           */
/*==============================================================*/
create table Reagt_Entry (
   EntryId              int                  identity(1, 1),
   Position             varchar(100)         COLLATE Chinese_PRC_CI_AS NULL,
   Specification        varchar(50)          COLLATE Chinese_PRC_CI_AS NULL,
   Unit                 varchar(20)          COLLATE Chinese_PRC_CI_AS NULL,
   Maker                varchar(100)         COLLATE Chinese_PRC_CI_AS NULL,
   CertificationCode    varchar(9)           COLLATE Chinese_PRC_CI_AS NULL,
   SupplierName         varchar(100)         COLLATE Chinese_PRC_CI_AS NULL,
   TypeName             varchar(50)          COLLATE Chinese_PRC_CI_AS NULL,
   Name                 varchar(100)         collate Chinese_PRC_CI_AS null,
   Number               int                  null,
   MaxValue             int                  null,
   MinValue             int                  null,
   UnitPrice            decimal(2)           null,
   SellingPrice         decimal(2)           null,
   PinYinCode           varchar(50)          collate Chinese_PRC_CI_AS null,
   ProductionBatch      varchar(50)          collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   constraint PK_ENTRY primary key (EntryId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Invalid                                         */
/*==============================================================*/
create table Reagt_Invalid (
   InvaId               bigint               identity(1, 1),
   Code                 varchar(20)          collate Chinese_PRC_CI_AS null,
   ProductionBatch      varchar(50)          collate Chinese_PRC_CI_AS null,
   Remark               varchar(1000)        collate Chinese_PRC_CI_AS null,
   Executor             varchar(20)          collate Chinese_PRC_CI_AS null,
   constraint PK_INVALID primary key (InvaId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Log                                             */
/*==============================================================*/
create table Reagt_Log (
   LogId                bigint               identity,
   OperatingPeople      varchar(50)          null,
   OperatingTime        datetime2            null,
   OperatingType        varchar(20)          null,
   Remark               varchar(500)         null,
   Code                 varchar(20)          null,
   ReagentName          varchar(200)         null,
   PinYinCode           varchar(50)          null,
   ReagentNumber        int                  null,
   ReagentSpecification varchar(200)         null,
   ReagentPosition      varchar(100)         null,
   constraint PK_REAGT_LOG primary key (LogId)
)
go

/*==============================================================*/
/* Table: Reagt_Maker                                           */
/*==============================================================*/
create table Reagt_Maker (
   MakerId              int                  identity(1, 1),
   Name                 varchar(100)         collate Chinese_PRC_CI_AS null,
   MakerCode            varchar(50)          collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   constraint PK_MAKER primary key (MakerId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Operating_Type                                  */
/*==============================================================*/
create table Reagt_Operating_Type (
   OperatingTypeId      int                  identity,
   OperatingCode        varchar(20)          null,
   OperatingName        varchar(20)          null,
   constraint PK_REAGT_OPERATING_TYPE primary key (OperatingTypeId)
)
go

/*==============================================================*/
/* Table: Reagt_Out_Stock                                        */
/*==============================================================*/
create table Reagt_OutStock (
   OutId                bigint               identity(1, 1),
   OutTime              datetime2            null,
   OutNumber            int                  null,
   UsingPeople          varchar(20)          collate Chinese_PRC_CI_AS null,
   VerifyPeople         varchar(20)          collate Chinese_PRC_CI_AS null,
   Code                 varchar(20)          collate Chinese_PRC_CI_AS null,
   constraint PK_OUTSTOCK primary key (OutId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Position                                        */
/*==============================================================*/
create table Reagt_Position (
   PositionId           int                  identity(1, 1),
   Position             varchar(100)         collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   PositionCode         varchar(30)          null,
   constraint PK_POSITION primary key (PositionId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Reagent                                         */
/*==============================================================*/
create table Reagt_Reagent (
   ReagentId            int                  identity(1, 1),
   Name                 varchar(200)         collate Chinese_PRC_CI_AS null,
   Specification        varchar(200)         collate Chinese_PRC_CI_AS null,
   Maker                varchar(200)         collate Chinese_PRC_CI_AS null,
   CertificationCode    varchar(9)           collate Chinese_PRC_CI_AS null,
   Unit                 varchar(20)          collate Chinese_PRC_CI_AS null,
   UnitPrice            decimal(2)           null,
   SellingPrice         decimal(2)           null,
   MaxValue             int                  null,
   MinValue             int                  null,
   TypeName             varchar(50)          null,
   constraint PK_REAGENT primary key (ReagentId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Receipt                                         */
/*==============================================================*/
create table Reagt_Receipt (
   ReceiptCode          varchar(20)          not null,
   Remark               varchar(1000)        null,
   ReceiptTime          datetime2            null,
   VerifyPeople        nvarchar(20)         null,
   Status               int                  null,
   constraint PK_REAGT_RECEIPT primary key (ReceiptCode)
)
go

/*==============================================================*/
/* Table: Reagt_Receipt_Status                                   */
/*==============================================================*/
create table Reagt_Receipt_Status (
   ReceiptId            int                  identity,
   ReceiptName          varchar(20)          null,
   ReceiptCode          varchar(20)          null,
   constraint PK_REAGT_RECEIPTSTATUS primary key (ReceiptId)
)
go

/*==============================================================*/
/* Table: Reagt_Specification                                   */
/*==============================================================*/
create table Reagt_Specification (
   SpecificationId      int                  identity(1, 1),
   Specification        varchar(50)          collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   constraint PK_SPECIFICATION primary key (SpecificationId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Stock                                           */
/*==============================================================*/
create table Reagt_Stock (
   StockId              bigint               identity(1, 1),
   ReagentId            int                  null,
   Code                 varchar(20)          collate Chinese_PRC_CI_AS null,
   ProductionBatch      varchar(50)          collate Chinese_PRC_CI_AS null,
   PinYinCode           varchar(50)          collate Chinese_PRC_CI_AS null,
   Position             varchar(100)         collate Chinese_PRC_CI_AS null,
   Number               int                  null,
   LastNumber           int                  null,
   InTime               datetime2            null,
   Expiration           datetime             null,
   VerifyPeople         varchar(20)          collate Chinese_PRC_CI_AS null,
   SupplierName         varchar(100)         collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   constraint PK_STOCK primary key (StockId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_Supplier                                        */
/*==============================================================*/
create table Reagt_Supplier (
   SupplierId           int                  identity(1, 1),
   SupplierName         varchar(100)         collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   SupplierCode         varchar(30)          null,
   constraint PK_SUPPLIER primary key (SupplierId)
         on "PRIMARY"
)
on "PRIMARY"
go

/*==============================================================*/
/* Table: Reagt_TypeTable                                       */
/*==============================================================*/
create table Reagt_TypeTable (
   TypeId               int                  not null,
   TypeCode             varchar(20)          null,
   TypeName             varchar(50)          null,
   constraint PK_REAGT_TYPETABLE primary key (TypeId)
)
go

/*==============================================================*/
/* Table: Reagt_Unit                                            */
/*==============================================================*/
create table Reagt_Unit (
   UnitId               int                  identity(1, 1),
   UnitName             varchar(20)          collate Chinese_PRC_CI_AS null,
   Using                bit                  null,
   constraint PK_UNIT primary key (UnitId)
         on "PRIMARY"
)
on "PRIMARY"
go

