USE [cmod]
GO
/****** Object:  Table [dbo].[CM_TUBES]    Script Date: 19/11/2024 16:26:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CM_TUBES](
	[TUBEID] [int] IDENTITY(1,1) NOT NULL,
	[ACCESSNUMBER] [varchar](10) NULL,
	[SAMPLETYPE] [varchar](10) NULL,
	[COLLECTIONDATE] [datetime] NULL,
	[COLL_USERID] [varchar](25) NULL,
	[COLLSTATUS] [varchar](1) NULL,
	[CREATEDATE] [datetime] NULL,
	[TUBECOMMENT] [varchar](150) NULL,
 CONSTRAINT [PK_TUBES] PRIMARY KEY CLUSTERED 
(
	[TUBEID] 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
/****** Object:  Table [dbo].[CM_USERROLES]    Script Date: 19/11/2024 16:26:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CM_USERROLES](
	[USERROLEID] [int] IDENTITY(1,1) NOT NULL,
	[USERROLECODE] [varchar](5) NOT NULL,
	[USERROLENAME] [varchar](50) NULL,
	[CREATEDATE] [datetime] NULL,
 CONSTRAINT [PK_CM_USERROLES] PRIMARY KEY CLUSTERED 
(
	[USERROLEID] 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
/****** Object:  Table [dbo].[CM_USERS]    Script Date: 19/11/2024 16:26:14 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CM_USERS](
	[USERID] [varchar](25) NOT NULL,
	[PASSWORD] [varchar](100) NULL,
	[USERROLEID] [int] NULL,
	[CREATEDATE] [datetime] NULL,
 CONSTRAINT [PK_USERS] PRIMARY KEY CLUSTERED 
(
	[USERID] 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
ALTER TABLE [dbo].[CM_TUBES] ADD  CONSTRAINT [DF_TUBES_STATUS]  DEFAULT ((0)) FOR [COLLSTATUS]
GO
