/****** Object:  Table [dbo].[adr_ParamDetails]    Script Date: 02/01/2022 04:03:47 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adr_ParamDetails](
	[ParamvalueId] [int] IDENTITY(1,1) NOT NULL,
	[ParamId] [int] NOT NULL,
	[ControllerId] [int] NULL,
	[EquipmentId] [varchar](15) NOT NULL,
	[FleetId] [int] NULL,
	[vehicleId] [int] NULL,
	[MaxValue] [int] NULL,
	[MinValue] [int] NULL,
	[CreatedOn] [datetime] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[ModifiedOn] [datetime] NULL,
	[ModifiedBy] [int] NULL,
	[OrganizationId] [int] NULL,
	[IsDeleted] [bit] NOT NULL,
 CONSTRAINT [PK_adr_ParamDetails] PRIMARY KEY CLUSTERED 
(
	[ParamvalueId] 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].[adr_ParamMst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adr_ParamMst](
	[ParamId] [int] NOT NULL,
	[ParamName] [varchar](100) NOT NULL,
	[ParamDescription] [varchar](50) NULL,
	[VehicleTypeId] [tinyint] NOT NULL,
	[OrganizationId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[adr_rvlfTripDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adr_rvlfTripDetails](
	[BoxId] [varchar](20) NOT NULL,
	[ControllerID] [int] NULL,
	[ControllerName] [varchar](50) NULL,
	[BoxMsgInTypeId] [int] NULL,
	[AlarmName] [varchar](50) NULL,
	[StartDate] [datetime] NULL,
	[EndDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[adrControllerMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adrControllerMaster](
	[ControllerId] [bigint] IDENTITY(252,1) NOT NULL,
	[EquipmentId] [varchar](100) NOT NULL,
	[ControllerPositionId] [int] NOT NULL,
	[ControllerName] [varchar](50) NULL,
	[ControllerSrNo] [varchar](100) NULL,
	[ControllerType] [tinyint] NULL,
	[PassageId] [tinyint] NOT NULL,
	[FieldId] [tinyint] NOT NULL,
	[DCSIMId] [tinyint] NOT NULL,
	[ControllerLocation] [tinyint] NULL,
	[WarrantyStartDate] [datetime] NULL,
	[WarrantyEndDate] [datetime] NULL,
	[IsActive] [bit] NULL,
	[IsDeleted] [bit] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[LastReporteDateTime] [datetime] NULL,
	[IsAlarm] [bit] NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[Amps] [varchar](5) NULL,
	[KV] [varchar](5) NULL,
	[MA] [varchar](5) NULL,
	[SPM] [varchar](5) NULL,
	[HT_ON_OFF] [bit] NULL,
 CONSTRAINT [PK_AdrControllerMaster] PRIMARY KEY CLUSTERED 
(
	[ControllerId] 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].[adrControllerPositions]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adrControllerPositions](
	[ControllerPositionId] [tinyint] IDENTITY(34,1) NOT NULL,
	[ControllerPositionName] [varchar](50) NULL,
 CONSTRAINT [PK_adrControllerPositions] PRIMARY KEY CLUSTERED 
(
	[ControllerPositionId] 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].[adrDCSIMMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adrDCSIMMaster](
	[DCSIMId] [tinyint] NOT NULL,
	[DCSIMName] [varchar](50) NULL,
	[Description] [varchar](100) NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_adrDSCIMMaster] PRIMARY KEY CLUSTERED 
(
	[DCSIMId] 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].[adrDCSIMMaster_old]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adrDCSIMMaster_old](
	[DCSIMId] [tinyint] IDENTITY(6,1) NOT NULL,
	[DCSIMName] [varchar](50) NULL,
	[Description] [varchar](100) NULL,
	[IsDelete] [bit] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[adrFieldMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adrFieldMaster](
	[FieldId] [tinyint] NOT NULL,
	[FieldName] [varchar](50) NULL,
	[Description] [varchar](100) NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_adrFieldMaster] PRIMARY KEY CLUSTERED 
(
	[FieldId] 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].[adrPassageMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[adrPassageMaster](
	[PassageId] [tinyint] NOT NULL,
	[PassageName] [varchar](50) NULL,
	[Description] [varchar](100) NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_adrPassageMaster] PRIMARY KEY CLUSTERED 
(
	[PassageId] 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].[alarmlist]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[alarmlist](
	[AlarmID] [int] NULL,
	[Alarm Description] [nvarchar](255) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[AspNet_SqlCacheTablesForChangeNotification]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AspNet_SqlCacheTablesForChangeNotification](
	[tableName] [nvarchar](450) NOT NULL,
	[notificationCreated] [datetime] NOT NULL,
	[changeId] [int] NOT NULL,
 CONSTRAINT [PK__AspNet_S__93F7AC694AEF871F] PRIMARY KEY CLUSTERED 
(
	[tableName] 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].[Country]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Country](
	[CountryID] [smallint] NOT NULL,
	[CountryName] [varchar](100) NOT NULL,
	[CountryCode] [char](2) NOT NULL,
	[GMTTime] [varchar](20) NOT NULL,
	[HoursToBeAdded] [int] NULL,
	[MinutesToBeAdded] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[MQTT_Messages]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MQTT_Messages](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ClientID] [varchar](30) NOT NULL,
	[topic] [nvarchar](100) NOT NULL,
	[message] [nvarchar](max) NOT NULL,
	[Enable] [bit] NULL,
	[DateTime_created] [datetime] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlf_CompactorDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlf_CompactorDetails](
	[DeviceId] [varchar](10) NOT NULL,
	[CompType] [tinyint] NOT NULL,
	[CompModel] [varchar](50) NULL,
	[IsVentilator] [bit] NULL,
	[VentilatorModel] [varchar](50) NULL,
	[SeqNo] [tinyint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlf_CurrentandEnergyCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlf_CurrentandEnergyCategory](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[Category] [varchar](50) NOT NULL,
	[CR] [varchar](10) NOT NULL,
	[Isdelete] [bit] NULL,
 CONSTRAINT [PK__rvlf_Cur__CA1FE464137584D8] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlf_EnergyConsumption]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlf_EnergyConsumption](
	[EConsumptionId] [bigint] IDENTITY(1083,1) NOT NULL,
	[EquipmentId] [varchar](50) NULL,
	[EConsumptionType] [tinyint] NULL,
	[NoofShift] [varchar](100) NULL,
	[StartTime] [varchar](10) NULL,
	[EndTime] [varchar](10) NULL,
	[Shift] [varchar](50) NULL,
 CONSTRAINT [PK_rvlf_EnergyConsumption] PRIMARY KEY CLUSTERED 
(
	[EConsumptionId] 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].[rvlf_Rpt_ParamMst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlf_Rpt_ParamMst](
	[ParamId] [int] IDENTITY(1,1) NOT NULL,
	[ParamName] [varchar](100) NOT NULL,
	[ParamDescription] [varchar](50) NULL,
	[VehicleTypeId] [tinyint] NOT NULL,
	[OrganizationId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAdhocServiceDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAdhocServiceDetails](
	[AdhocServiceId] [bigint] NOT NULL,
	[ServiceId] [bigint] NOT NULL,
	[ServiceCost] [numeric](18, 2) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAdhocServices]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAdhocServices](
	[AdhocServiceId] [bigint] IDENTITY(197,1) NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[ExecutionOn] [datetime] NOT NULL,
	[TotalServiceCost] [numeric](18, 2) NOT NULL,
	[Comments] [varchar](250) NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[photo1] [nvarchar](max) NULL,
	[photo2] [nvarchar](max) NULL,
	[Servicedby] [bigint] NULL,
 CONSTRAINT [PK_rvlfAdhocServices] PRIMARY KEY CLUSTERED 
(
	[AdhocServiceId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarm]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarm](
	[AlarmId] [bigint] IDENTITY(1,1) NOT NULL,
	[DateTimeCreated] [datetime] NOT NULL,
	[BoxId] [varchar](25) NULL,
	[AlarmType] [bigint] NOT NULL,
	[AlarmLevelId] [smallint] NOT NULL,
	[DateTimeAccepted] [datetime] NULL,
	[AcceptedBy] [bigint] NULL,
	[DateTimeClosed] [datetime] NULL,
	[ClosedBy] [bigint] NULL,
	[Description] [varchar](250) NOT NULL,
	[Lat] [decimal](10, 6) NOT NULL,
	[Long] [decimal](10, 6) NOT NULL,
	[StreetAddress] [varchar](250) NULL,
	[IsClosed] [tinyint] NULL,
	[DriverId] [bigint] NULL,
	[Comments] [nvarchar](150) NULL,
	[StreetAddress_Ar] [nvarchar](250) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[CustomProp] [varchar](1000) NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[ControllerID] [varchar](25) NULL,
	[AlarmRepeatFlag] [tinyint] NULL,
	[DCSIM] [tinyint] NULL,
	[Rootcause] [nvarchar](500) NULL,
	[Correctiveaction] [nvarchar](max) NULL,
 CONSTRAINT [PK__rvlfAlar__43E5EB356AEB8C18] PRIMARY KEY CLUSTERED 
(
	[AlarmId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarm_Bkup]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarm_Bkup](
	[AlarmId] [bigint] IDENTITY(1,1) NOT NULL,
	[DateTimeCreated] [datetime] NOT NULL,
	[BoxId] [varchar](25) NULL,
	[AlarmType] [bigint] NOT NULL,
	[AlarmLevelId] [smallint] NOT NULL,
	[DateTimeAccepted] [datetime] NULL,
	[AcceptedBy] [bigint] NULL,
	[DateTimeClosed] [datetime] NULL,
	[ClosedBy] [bigint] NULL,
	[Description] [varchar](250) NOT NULL,
	[Lat] [decimal](10, 6) NOT NULL,
	[Long] [decimal](10, 6) NOT NULL,
	[StreetAddress] [varchar](250) NULL,
	[IsClosed] [tinyint] NULL,
	[DriverId] [bigint] NULL,
	[Comments] [nvarchar](150) NULL,
	[StreetAddress_Ar] [nvarchar](250) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[CustomProp] [varchar](1000) NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[ControllerID] [varchar](25) NULL,
	[AlarmRepeatFlag] [tinyint] NULL,
	[DCSIM] [tinyint] NULL,
	[Rootcause] [nvarchar](500) NULL,
	[Correctiveaction] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarmconfig]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarmconfig](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[Paramid] [int] NULL,
	[AlarmParamID] [int] NULL,
	[AlarmParamName] [varchar](100) NULL,
	[Reason] [varchar](1000) NULL,
	[CorrectiveAction] [varchar](max) NULL,
	[createdby] [bigint] NULL,
	[modifiedby] [bigint] NULL,
	[modifieddate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarmsDesc]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarmsDesc](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[EquipmentType] [tinyint] NOT NULL,
	[ParamID] [int] NOT NULL,
	[AlarmName] [varchar](1000) NOT NULL,
	[VFantype] [tinyint] NULL,
	[CompType] [tinyint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarmsSeverity]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarmsSeverity](
	[VehicleTypeId] [int] NULL,
	[AlarmParameter] [varchar](200) NULL,
	[AlarmLevelID] [smallint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarmTransaction]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarmTransaction](
	[TransactionID] [bigint] IDENTITY(1,1) NOT NULL,
	[AlarmId] [bigint] NOT NULL,
	[DateTimeCreated] [datetime] NOT NULL,
	[BoxId] [varchar](15) NULL,
	[AlarmType] [bigint] NOT NULL,
	[AlarmLevelId] [smallint] NOT NULL,
	[DateTimeAccepted] [datetime] NULL,
	[AcceptedBy] [bigint] NULL,
	[DateTimeClosed] [datetime] NULL,
	[ClosedBy] [bigint] NULL,
	[Description] [varchar](250) NOT NULL,
	[Lat] [decimal](10, 6) NULL,
	[Long] [decimal](10, 6) NULL,
	[StreetAddress] [varchar](250) NULL,
	[IsClosed] [tinyint] NOT NULL,
	[DriverId] [bigint] NULL,
	[Comments] [nvarchar](150) NULL,
	[StreetAddress_Ar] [nvarchar](250) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[CustomProp] [varchar](1000) NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[ControllerID] [varchar](25) NULL,
	[AlarmRepeatFlag] [tinyint] NULL,
	[DCSIM] [tinyint] NULL,
 CONSTRAINT [PK_rvlfAlarmTransactions] PRIMARY KEY CLUSTERED 
(
	[TransactionID] 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].[rvlfAlarmTransaction_Bkup]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarmTransaction_Bkup](
	[TransactionID] [bigint] IDENTITY(1,1) NOT NULL,
	[AlarmId] [bigint] NOT NULL,
	[DateTimeCreated] [datetime] NOT NULL,
	[BoxId] [varchar](15) NULL,
	[AlarmType] [bigint] NOT NULL,
	[AlarmLevelId] [smallint] NOT NULL,
	[DateTimeAccepted] [datetime] NULL,
	[AcceptedBy] [bigint] NULL,
	[DateTimeClosed] [datetime] NULL,
	[ClosedBy] [bigint] NULL,
	[Description] [varchar](250) NOT NULL,
	[Lat] [decimal](10, 6) NULL,
	[Long] [decimal](10, 6) NULL,
	[StreetAddress] [varchar](250) NULL,
	[IsClosed] [tinyint] NOT NULL,
	[DriverId] [bigint] NULL,
	[Comments] [nvarchar](150) NULL,
	[StreetAddress_Ar] [nvarchar](250) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[CustomProp] [varchar](1000) NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[ControllerID] [varchar](25) NULL,
	[AlarmRepeatFlag] [tinyint] NULL,
	[DCSIM] [tinyint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAlarmTransaction_old]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAlarmTransaction_old](
	[TransactionID] [bigint] IDENTITY(91824,1) NOT NULL,
	[AlarmId] [bigint] NOT NULL,
	[DateTimeCreated] [datetime] NOT NULL,
	[BoxId] [varchar](15) NULL,
	[AlarmType] [tinyint] NOT NULL,
	[AlarmLevelId] [smallint] NOT NULL,
	[DateTimeAccepted] [datetime] NULL,
	[AcceptedBy] [bigint] NULL,
	[DateTimeClosed] [datetime] NULL,
	[ClosedBy] [bigint] NULL,
	[Description] [varchar](250) NOT NULL,
	[Lat] [decimal](10, 6) NULL,
	[Long] [decimal](10, 6) NULL,
	[StreetAddress] [varchar](250) NULL,
	[IsClosed] [tinyint] NOT NULL,
	[DriverId] [bigint] NULL,
	[Comments] [nvarchar](150) NULL,
	[StreetAddress_Ar] [nvarchar](250) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[CustomProp] [varchar](1000) NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[ControllerID] [tinyint] NULL,
	[AlarmRepeatFlag] [tinyint] NULL,
	[DCSIM] [tinyint] NULL,
 CONSTRAINT [PK_rvlfAlarmTransaction] PRIMARY KEY CLUSTERED 
(
	[TransactionID] 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].[rvlfAPNSettings]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAPNSettings](
	[APNSettingId] [tinyint] NOT NULL,
	[CommModeId] [tinyint] NOT NULL,
	[APNName] [varchar](50) NOT NULL,
	[APNHex] [nvarchar](400) NOT NULL,
	[APNUser] [varchar](20) NULL,
	[APNUserHex] [nvarchar](400) NULL,
	[APNPwd] [varchar](20) NULL,
	[APNPwdHex] [nvarchar](400) NULL,
	[Totalchunk] [nvarchar](800) NULL,
 CONSTRAINT [PK_rvlfAPNSettings] PRIMARY KEY CLUSTERED 
(
	[APNSettingId] 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].[rvlfAuditField]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAuditField](
	[AuditFieldId] [bigint] IDENTITY(1900,1) NOT NULL,
	[FieldID] [decimal](18, 0) NOT NULL,
	[TableID] [decimal](18, 0) NOT NULL,
	[FieldName] [nvarchar](100) NOT NULL,
	[FieldDescription] [nvarchar](100) NOT NULL,
	[InsertBit] [bit] NOT NULL,
	[UpdateBit] [bit] NOT NULL,
	[DeleteBit] [bit] NOT NULL,
	[Status] [bit] NOT NULL,
	[Datatype] [varchar](50) NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
 CONSTRAINT [PK_rvlfAuditField_1] PRIMARY KEY CLUSTERED 
(
	[AuditFieldId] 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].[rvlfAuditOperation]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAuditOperation](
	[ID] [decimal](18, 0) IDENTITY(18008,1) NOT NULL,
	[TableID] [decimal](18, 0) NOT NULL,
	[RecordID] [decimal](18, 0) NOT NULL,
	[FieldID] [decimal](18, 0) NOT NULL,
	[Opr] [nvarchar](25) NOT NULL,
	[OldValue] [nvarchar](500) NULL,
	[NewValue] [nvarchar](500) NULL,
	[UserId] [int] NULL,
	[OprDate] [datetime] NOT NULL,
	[OrganizationId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfAuditTable]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfAuditTable](
	[AuditTableId] [bigint] IDENTITY(794,1) NOT NULL,
	[TableID] [decimal](18, 0) NOT NULL,
	[TableName] [nvarchar](100) NOT NULL,
	[TableDescription] [nvarchar](100) NOT NULL,
	[Status] [bit] NOT NULL,
	[ModuleId] [int] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
 CONSTRAINT [PK_rvlfAuditTable] PRIMARY KEY CLUSTERED 
(
	[AuditTableId] 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].[rvlfBox]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBox](
	[BoxID] [varchar](15) NULL,
	[FwchID] [bigint] NULL,
	[BoxArmed] [bit] NULL,
	[LastValidDateTime] [datetime] NULL,
	[LastLatitude] [decimal](10, 6) NULL,
	[LastLongitude] [decimal](10, 6) NULL,
	[LastSpeed] [smallint] NULL,
	[LastStreetAddress] [varchar](250) NULL,
	[LastCommunicatedDateTime] [datetime] NULL,
	[LastSensorMask] [varchar](20) NULL,
	[OrganizationId] [int] NULL,
	[LastStatusDateTime] [datetime] NULL,
	[NearestLandmark] [varchar](100) NULL,
	[Heading] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfBoxCmdOutType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxCmdOutType](
	[BoxCmdOutTypeId] [tinyint] NOT NULL,
	[BoxCmdOutTypeName] [varchar](50) NOT NULL,
	[BoxCmdOutTypeCode] [varchar](3) NULL,
	[BoxcmdTypeDesc] [varchar](250) NOT NULL,
	[OperationTypeId] [bigint] NULL,
 CONSTRAINT [PK_rvlfBoxCmdOutType] PRIMARY KEY CLUSTERED 
(
	[BoxCmdOutTypeId] 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].[rvlfBoxCommInfo]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxCommInfo](
	[BoxId] [varchar](15) NOT NULL,
	[CommAddressTypeId] [int] NOT NULL,
	[CommAddressValue] [varchar](30) NOT NULL,
 CONSTRAINT [PK_rvlfBoxCommInfo] PRIMARY KEY CLUSTERED 
(
	[BoxId] 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].[rvlfBoxHwDefaultOutputsCfg]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxHwDefaultOutputsCfg](
	[BoxHwTypeId] [bigint] NOT NULL,
	[OutputId] [tinyint] NOT NULL,
 CONSTRAINT [PK_rvlfBoxHwDefaultOutputsCfg] PRIMARY KEY CLUSTERED 
(
	[BoxHwTypeId] ASC,
	[OutputId] 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].[rvlfBoxHwDefaultSensorsCfg]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxHwDefaultSensorsCfg](
	[BoxHwTypeId] [bigint] NOT NULL,
	[SensorId] [tinyint] NOT NULL,
	[DefaultAlarmLevelOn] [smallint] NOT NULL,
	[DefaultAlarmLevelOff] [smallint] NOT NULL,
 CONSTRAINT [PK_rvlfBoxHwDefaultSensorsCfg] PRIMARY KEY CLUSTERED 
(
	[BoxHwTypeId] ASC,
	[SensorId] 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].[rvlfBoxHwSensorProfileDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxHwSensorProfileDetails](
	[ProfileId] [bigint] NOT NULL,
	[SensorId] [tinyint] NOT NULL,
	[DefaultAlarmLevelOn] [smallint] NOT NULL,
	[DefaultAlarmLevelOff] [smallint] NULL,
 CONSTRAINT [PK_rvlfBoxHwSensorProfileDetails] PRIMARY KEY CLUSTERED 
(
	[ProfileId] ASC,
	[SensorId] 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].[rvlfBoxHwSensorProfiles]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxHwSensorProfiles](
	[ProfileId] [bigint] NOT NULL,
	[BoxHwTypeId] [bigint] NOT NULL,
	[ProfileName] [varchar](20) NOT NULL,
	[ProfileDescription] [varchar](250) NOT NULL,
 CONSTRAINT [PK_rvlfBoxHwSensorProfiles] PRIMARY KEY CLUSTERED 
(
	[ProfileId] 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].[rvlfBoxHwType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxHwType](
	[BoxHwTypeId] [bigint] NOT NULL,
	[BoxHwTypeName] [varchar](30) NOT NULL,
	[MaxSensorsNum] [tinyint] NOT NULL,
	[MaxOutputsNum] [tinyint] NOT NULL,
 CONSTRAINT [PK_rvlfBoxHwType] PRIMARY KEY CLUSTERED 
(
	[BoxHwTypeId] 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].[rvlfBoxId]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxId](
	[BoxId] [varchar](15) NOT NULL,
	[FwChId] [bigint] NULL,
	[BoxArmed] [bit] NOT NULL,
	[LastValidDateTime] [datetime] NOT NULL,
	[LastLatitude] [decimal](10, 6) NOT NULL,
	[LastLongitude] [decimal](10, 6) NOT NULL,
	[LastSpeed] [tinyint] NOT NULL,
	[LastStreetAddress] [varchar](250) NULL,
	[LastCommunicatedDateTime] [datetime] NOT NULL,
	[LastSensorMask] [varchar](25) NULL,
	[OrganizationId] [bigint] NOT NULL,
	[LastStatusDateTime] [datetime] NOT NULL,
	[NearestLandmark] [varchar](300) NULL,
	[Heading] [int] NULL,
	[MessageInId] [uniqueidentifier] NULL,
	[MaxSMSLimit] [tinyint] NULL,
	[LastStreetAddress_AR] [nvarchar](250) NULL,
	[LastStreetAddress_Hin] [nvarchar](250) NULL,
	[OTASeqNoLastpdated] [varchar](5) NULL,
	[ControllerID] [tinyint] NULL,
	[WeatherInfo] [nvarchar](2000) NULL,
	[GateWayID] [bigint] NULL,
	[DeviceStatus] [tinyint] NULL,
 CONSTRAINT [PK_rvlfBoxId] PRIMARY KEY CLUSTERED 
(
	[BoxId] 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].[rvlfBoxIgnoreMsgs]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxIgnoreMsgs](
	[IgId] [bigint] IDENTITY(1,1) NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[BoxMsgInTypeId] [tinyint] NOT NULL,
	[SensorNo] [tinyint] NULL,
	[Description] [varchar](150) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfBoxMsgInType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxMsgInType](
	[BoxMsgInTypeId] [tinyint] NOT NULL,
	[BoxMsgInTypeName] [varchar](50) NOT NULL,
	[VisibleWeb] [bit] NOT NULL,
	[BoxMsgInTypeCode] [char](1) NOT NULL,
	[BoxMsgInTypeDesc] [varchar](250) NOT NULL,
	[CanSeveritySet] [bit] NULL,
	[Isviolation] [bit] NOT NULL,
	[OperationTypeID] [bigint] NULL,
	[IsDefaultAlarm] [bit] NULL,
	[BoxMsgInTypeName_Ar] [nvarchar](500) NULL,
	[BoxMsgInTypeName_Hin] [nvarchar](500) NULL,
	[BoxMsgInTypeDesc_Ar] [nvarchar](500) NULL,
	[BoxMsgInTypeDesc_Hin] [nvarchar](500) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfBoxMsgInType_bkp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxMsgInType_bkp](
	[BoxMsgInTypeId] [tinyint] NOT NULL,
	[BoxMsgInTypeName] [varchar](50) NOT NULL,
	[VisibleWeb] [bit] NOT NULL,
	[BoxMsgInTypeCode] [char](1) NOT NULL,
	[BoxMsgInTypeDesc] [varchar](250) NOT NULL,
	[CanSeveritySet] [bit] NULL,
	[Isviolation] [bit] NOT NULL,
	[OperationTypeID] [bigint] NULL,
	[IsDefaultAlarm] [bit] NULL,
	[BoxMsgInTypeName_Ar] [nvarchar](500) NULL,
	[BoxMsgInTypeName_Hin] [nvarchar](500) NULL,
	[BoxMsgInTypeDesc_Ar] [nvarchar](500) NULL,
	[BoxMsgInTypeDesc_Hin] [nvarchar](500) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfBoxMsgSeverity]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxMsgSeverity](
	[BoxId] [varchar](15) NOT NULL,
	[BoxMsgInTypeId] [tinyint] NOT NULL,
	[AlarmLevelID] [smallint] NOT NULL,
 CONSTRAINT [PK_rvlfBoxMsgSeverity] PRIMARY KEY CLUSTERED 
(
	[BoxId] ASC,
	[BoxMsgInTypeId] 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].[rvlfBoxOutputsCfg]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxOutputsCfg](
	[BoxId] [varchar](15) NOT NULL,
	[OutputId] [tinyint] NOT NULL,
	[OutputName] [varchar](20) NULL,
	[ActionOn] [varchar](15) NULL,
	[ActionOff] [varchar](15) NULL,
 CONSTRAINT [PK_rvlfBoxOutputsCfg] PRIMARY KEY CLUSTERED 
(
	[BoxId] ASC,
	[OutputId] 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].[rvlfBoxProtocolMsgInType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxProtocolMsgInType](
	[BoxMsgInTypeId] [tinyint] NOT NULL,
	[BoxProtocolTypeId] [tinyint] NOT NULL,
	[Rules] [varchar](250) NULL,
	[MsgInTypeLen] [int] NOT NULL,
	[DefaultAlarmLevel] [smallint] NOT NULL,
 CONSTRAINT [PK_rvlfBoxProtocolMsgInType] PRIMARY KEY CLUSTERED 
(
	[BoxMsgInTypeId] 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].[rvlfBoxProtocolMsgOutType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxProtocolMsgOutType](
	[BoxCmdOutTypeId] [tinyint] NOT NULL,
	[BoxProtocolTypeId] [tinyint] NOT NULL,
	[Rules] [varchar](250) NULL,
	[CommAddressTypeId] [int] NOT NULL,
	[CmdOutTypeLen] [int] NOT NULL,
	[Visible] [bit] NOT NULL,
 CONSTRAINT [PK_rvlfBoxProtocolMsgOutType] PRIMARY KEY CLUSTERED 
(
	[BoxCmdOutTypeId] 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].[rvlfBoxProtocolType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxProtocolType](
	[BoxProtocolTypeId] [tinyint] NOT NULL,
	[BoxProtocolTypeName] [varchar](25) NOT NULL,
	[AssemblyOrClass] [varchar](15) NOT NULL,
	[MaxGeozones] [int] NOT NULL,
	[SessionTimeOut] [int] NOT NULL,
	[Remarks] [varchar](150) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfBoxSensorsCfg]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxSensorsCfg](
	[BoxId] [varchar](15) NOT NULL,
	[SensorId] [tinyint] NOT NULL,
	[AlarmLevelOn] [smallint] NOT NULL,
	[AlarmLevelOff] [smallint] NOT NULL,
	[ActionOn] [varchar](15) NULL,
	[ActionOff] [varchar](15) NULL,
	[SensorName] [varchar](20) NULL,
 CONSTRAINT [PK_rvlfBoxSensorsCfg] PRIMARY KEY CLUSTERED 
(
	[BoxId] ASC,
	[SensorId] 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].[rvlfBoxSettings]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxSettings](
	[BoxId] [varchar](15) NOT NULL,
	[BoxProtocolTypeId] [int] NULL,
	[CommModeId] [tinyint] NULL,
	[FwID] [bigint] NULL,
 CONSTRAINT [PK_rvlfBoxSettings] PRIMARY KEY CLUSTERED 
(
	[BoxId] 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].[rvlfBoxTempConfig]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBoxTempConfig](
	[BoxTempConfigId] [bigint] IDENTITY(30,1) NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[OrganizationId] [bigint] NULL,
	[CanDisplayTemp] [bit] NULL,
	[Temp1] [bit] NULL,
	[Temp2] [bit] NULL,
	[Temp3] [bit] NULL,
	[Temp4] [bit] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
 CONSTRAINT [PK_rvlfBoxTempConfig] PRIMARY KEY CLUSTERED 
(
	[BoxTempConfigId] 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].[rvlfBroadcastMessage]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfBroadcastMessage](
	[GrpMsgID] [bigint] IDENTITY(294,1) NOT NULL,
	[UserGroupID] [bigint] NOT NULL,
	[UserId] [bigint] NOT NULL,
	[SentDate] [datetime] NOT NULL,
	[MsgData] [varchar](1000) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfCameraImages]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCameraImages](
	[CamMasterID] [int] IDENTITY(1,1) NOT NULL,
	[BoxId] [int] NOT NULL,
	[ReceivedDate] [datetime] NOT NULL,
	[ImageID] [int] NOT NULL,
	[ImageData] [varchar](max) NOT NULL,
	[ImageLength] [int] NOT NULL,
	[CurrentPacket] [int] NOT NULL,
	[TotalPackets] [int] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCategory](
	[CategoryId] [bigint] IDENTITY(47,1) NOT NULL,
	[CategoryName] [nvarchar](50) NOT NULL,
	[CategoryDescription] [varchar](500) NULL,
	[OrganizationId] [bigint] NOT NULL,
 CONSTRAINT [PK_rvlfCategory] PRIMARY KEY CLUSTERED 
(
	[CategoryId] 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].[rvlfChannels]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfChannels](
	[ChId] [bigint] IDENTITY(11,1) NOT NULL,
	[ChName] [varchar](75) NULL,
	[BoxProtocolTypeId] [tinyint] NULL,
	[CommModeId] [tinyint] NULL,
 CONSTRAINT [PK_rvlfChannels] PRIMARY KEY CLUSTERED 
(
	[ChId] 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].[rvlfCommAddressType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCommAddressType](
	[CommAddressTypeId] [int] NOT NULL,
	[CommAddressTypeName] [varchar](50) NOT NULL,
 CONSTRAINT [PK_rvlfCommAddressType] PRIMARY KEY CLUSTERED 
(
	[CommAddressTypeId] 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].[rvlfCommMode]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCommMode](
	[CommModeId] [tinyint] NOT NULL,
	[CommModeName] [varchar](100) NOT NULL,
	[CommModeDesc] [varchar](250) NOT NULL,
 CONSTRAINT [PK_rvlfCommMode] PRIMARY KEY CLUSTERED 
(
	[CommModeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfCommModeAddressType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCommModeAddressType](
	[CommModeId] [tinyint] NOT NULL,
	[CommAddressTypeId] [int] NOT NULL,
 CONSTRAINT [PK_rvlfCommModeAddressType] PRIMARY KEY CLUSTERED 
(
	[CommModeId] ASC,
	[CommAddressTypeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfCountry]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCountry](
	[CountryID] [smallint] NOT NULL,
	[CountryName] [varchar](100) NULL,
	[CountryCode] [char](2) NULL,
	[TimezoneID] [int] NULL,
 CONSTRAINT [PK_rvlfCountry] PRIMARY KEY CLUSTERED 
(
	[CountryID] 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].[rvlfCurrencyType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCurrencyType](
	[CurrencyTypeId] [tinyint] IDENTITY(3,1) NOT NULL,
	[CurrencyName] [varchar](4) NOT NULL,
	[CurrencyDesc] [varchar](20) NULL,
 CONSTRAINT [pk_rvlfCurrencyType] PRIMARY KEY CLUSTERED 
(
	[CurrencyTypeId] 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].[rvlfCustomerAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCustomerAssignment](
	[AssignmentId] [bigint] IDENTITY(1,1) NOT NULL,
	[AssignmentDate] [datetime] NULL,
	[FromDate] [datetime] NULL,
	[ToDate] [datetime] NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL,
	[CustomerId] [int] NULL,
	[VehicleId] [bigint] NULL,
	[DriverId] [bigint] NULL,
	[BoxId] [varchar](15) NULL,
	[Location] [varchar](100) NULL,
	[OrgId] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_rvlfCustomerAssignment] PRIMARY KEY CLUSTERED 
(
	[AssignmentId] 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].[rvlfCustomers]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfCustomers](
	[CustomerId] [bigint] IDENTITY(1,1) NOT NULL,
	[CustomerName] [varchar](50) NOT NULL,
	[CustomerDesc] [varchar](300) NULL,
	[CustomerCode] [varchar](30) NULL,
	[MobileNo] [varchar](15) NULL,
	[Email] [varchar](50) NULL,
	[CustomerLocation] [varchar](300) NULL,
	[OrgId] [bigint] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NOT NULL,
	[phno] [varchar](16) NULL,
 CONSTRAINT [pk_rvlfCustomers] PRIMARY KEY CLUSTERED 
(
	[CustomerId] 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].[rvlfDelayNotify]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDelayNotify](
	[Index] [int] IDENTITY(1,1) NOT NULL,
	[GeozoneId] [bigint] NOT NULL,
	[BoxId] [bigint] NOT NULL,
	[Trip1time] [time](7) NULL,
	[Trip1Gracetime] [tinyint] NULL,
	[Trip2time] [time](7) NULL,
	[Trip2Gracetime] [tinyint] NULL,
	[Trip3time] [time](7) NULL,
	[Trip3Gracetime] [tinyint] NULL,
	[RecurrenceDays] [varchar](15) NULL,
	[Trip1MailStatus] [datetime] NULL,
	[Trip2MailStatus] [datetime] NULL,
	[Trip3MailStatus] [datetime] NULL,
	[AssignedBy] [bigint] NULL,
	[IsUnAuthorisedGeoZone] [bit] NULL,
 CONSTRAINT [PK_rvlfDelayNotify] PRIMARY KEY CLUSTERED 
(
	[GeozoneId] ASC,
	[BoxId] 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].[rvlfDigitIP_335]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDigitIP_335](
	[InputId] [int] NOT NULL,
	[InputType] [nvarchar](10) NULL,
	[InputDescription] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfDigitIP_335] PRIMARY KEY CLUSTERED 
(
	[InputId] 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].[rvlfDigitIP_7410]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDigitIP_7410](
	[InputId] [int] NOT NULL,
	[InputType] [nvarchar](10) NULL,
	[InputDescription] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfDigitIP_7410] PRIMARY KEY CLUSTERED 
(
	[InputId] 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].[rvlfDigitOP_335]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDigitOP_335](
	[OutputId] [int] NOT NULL,
	[OutputType] [nvarchar](10) NULL,
	[OutputDescription] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfDigitOP_335] PRIMARY KEY CLUSTERED 
(
	[OutputId] 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].[rvlfDigitOP_7410]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDigitOP_7410](
	[OutputId] [int] NOT NULL,
	[OutputType] [nvarchar](10) NULL,
	[OutputDescription] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfDigitOP_7410] PRIMARY KEY CLUSTERED 
(
	[OutputId] 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].[rvlfDocuNoteMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDocuNoteMaster](
	[DocuNoteId] [bigint] IDENTITY(1,1) NOT NULL,
	[UserId] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModeType] [int] NOT NULL,
	[DocuNotes] [varchar](1000) NOT NULL,
	[DocumentPath] [varchar](1000) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfDriverActivityReport]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverActivityReport](
	[RepId] [bigint] IDENTITY(108,1) NOT NULL,
	[DriverId] [bigint] NULL,
	[DriverName] [nvarchar](50) NULL,
	[DriverMobileNo] [nvarchar](50) NULL,
	[DriverLicNo] [nvarchar](50) NULL,
	[Vin] [nvarchar](50) NULL,
	[LicensePlate] [nvarchar](50) NULL,
	[VehicleID] [bigint] NULL,
	[VehDisplayName] [nvarchar](50) NULL,
	[OriginDateTime] [datetime] NULL,
	[RouteName] [nvarchar](50) NULL,
	[LandMarkFrom] [nvarchar](50) NULL,
	[LandmarkTo] [nvarchar](50) NULL,
	[Distance] [nvarchar](50) NULL,
	[DistanceCaption] [nchar](10) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfDriverAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverAssignment](
	[AssignmentId] [bigint] IDENTITY(962,1) NOT NULL,
	[DriverId] [bigint] NOT NULL,
	[AssignmentDate] [datetime] NULL,
	[FromTime] [datetime] NULL,
	[ToTime] [datetime] NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL,
	[FromLandmarkId] [bigint] NULL,
	[ToLandmarkId] [bigint] NULL,
	[TripId] [bigint] NULL,
	[IsAmtIssued] [bit] NULL,
	[PunchIn] [datetime] NULL,
	[PunchOut] [datetime] NULL,
	[BoxId] [int] NULL,
 CONSTRAINT [PK_rvlfDriverAssignment] PRIMARY KEY CLUSTERED 
(
	[AssignmentId] 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].[rvlfDriverBattaDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverBattaDetails](
	[BattaId] [bigint] IDENTITY(88,1) NOT NULL,
	[VehicleType] [varchar](10) NULL,
	[NoOfDrivers] [tinyint] NULL,
	[Description] [varchar](50) NULL,
	[RatePerKM] [numeric](5, 2) NULL,
	[OtherAmt] [numeric](7, 2) NULL,
	[OrganizationId] [bigint] NULL,
	[FromRange] [int] NULL,
	[ToRange] [int] NULL,
	[Active] [bit] NULL,
	[FromTime] [time](7) NULL,
	[ToTime] [time](7) NULL,
	[IgnitionStatus] [bit] NULL,
	[ViolationPoints] [int] NULL,
	[PercentageOfAmt] [int] NULL,
	[IsAllowance] [bit] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfDriverGroupAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverGroupAssignment](
	[DriverId] [bigint] NULL,
	[DriverGroupId] [bigint] NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfDriverGroupMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverGroupMaster](
	[DriverGroupId] [bigint] IDENTITY(44,1) NOT NULL,
	[DriverGroupName] [varchar](20) NULL,
	[DriverGroupDesc] [varchar](250) NULL,
	[OrganizationId] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
 CONSTRAINT [PK_rvlfDriverGroupMaster] PRIMARY KEY CLUSTERED 
(
	[DriverGroupId] 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].[rvlfDriverIncentiveAmounts]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverIncentiveAmounts](
	[DriverId] [bigint] NULL,
	[VehicleId] [bigint] NULL,
	[TripStart] [datetime] NULL,
	[TripEnd] [datetime] NULL,
	[IsPartialAmt] [bit] NULL,
	[PartialAmt] [numeric](6, 2) NULL,
	[TotalAmt] [numeric](6, 2) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfDriverMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfDriverMaster](
	[DriverId] [bigint] IDENTITY(367,1) NOT NULL,
	[DriverName] [varchar](20) NULL,
	[DisplayName] [varchar](20) NULL,
	[Gender] [bit] NULL,
	[DateOfBirth] [datetime] NULL,
	[PermanentAddress] [varchar](200) NULL,
	[MailingAddress] [varchar](200) NULL,
	[PhoneNo] [varchar](20) NULL,
	[MobileNo] [varchar](15) NULL,
	[LicenseNo] [varchar](30) NULL,
	[LicenseType] [varchar](50) NULL,
	[LicenseIssuedOn] [datetime] NULL,
	[LicenseExpiresOn] [datetime] NULL,
	[Insurance] [varchar](50) NULL,
	[InsuranceExpiresOn] [datetime] NULL,
	[TotalYearsOfExperience] [tinyint] NULL,
	[NoOfAccidents] [tinyint] NULL,
	[DateOfJoin] [datetime] NULL,
	[Photo] [varchar](100) NULL,
	[NoOfHoursDrived] [int] NULL,
	[Active] [bit] NULL,
	[OrganizationID] [bigint] NULL,
	[IsDelete] [bit] NULL,
	[ModifiedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ShiftId] [bigint] NULL,
	[DisplayNameAr] [nvarchar](100) NULL,
	[InsuranceRenewedOn] [datetime] NULL,
 CONSTRAINT [PK_rvlfDriverMaster] PRIMARY KEY CLUSTERED 
(
	[DriverId] 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].[rvlfEmployee]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfEmployee](
	[EmployeeID] [bigint] IDENTITY(21,1) NOT NULL,
	[Title] [bigint] NULL,
	[FirstName] [varchar](50) NULL,
	[LastName] [varchar](50) NULL,
	[DateOfBirth] [datetime] NULL,
	[Sex] [bit] NULL,
	[EmailId] [varchar](200) NULL,
	[MobileNo] [varchar](15) NULL,
	[PhoneNo] [varchar](15) NULL,
	[FirstContactName] [varchar](50) NULL,
	[FirstContactRelation] [varchar](50) NULL,
	[FirstContactMobileNo] [varchar](15) NULL,
	[FirstContactPhoneNo] [varchar](15) NULL,
	[SecondContactName] [varchar](50) NULL,
	[SecondContactRelation] [varchar](50) NULL,
	[SecondContactMobileNo] [varchar](15) NULL,
	[SecondContactPhoneNo] [varchar](15) NULL,
	[ReportTo] [bigint] NULL,
	[DateOfJoin] [datetime] NULL,
	[Available] [bit] NULL,
	[DivisionID] [bigint] NULL,
	[DepartmentID] [bigint] NULL,
	[ShiftID] [bigint] NULL,
	[NearestLandMark] [bigint] NULL,
	[Latitude] [numeric](10, 6) NULL,
	[Longitude] [numeric](10, 6) NULL,
	[DisplayName] [varchar](20) NULL,
	[StreetAddress] [varchar](250) NULL,
	[UserName] [varchar](50) NULL,
	[Password] [varchar](100) NULL,
	[CubicleNumber] [varchar](50) NULL,
	[ExtentionNumber] [varchar](10) NULL,
	[Building] [varchar](20) NULL,
	[CreatedOn] [datetime] NULL,
	[CreatedBy] [bigint] NULL,
	[ModifiedOn] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ZoneId] [bigint] NULL,
	[OrgId] [bigint] NULL,
	[LocalityId] [bigint] NULL,
	[IsDeleted] [bit] NULL,
	[UserGroup] [bigint] NULL,
	[EmployeeCode] [varchar](10) NULL,
 CONSTRAINT [PK_rvlfEmployee] PRIMARY KEY CLUSTERED 
(
	[EmployeeID] 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].[rvlfEmployeeShifts]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfEmployeeShifts](
	[EmployeeId] [bigint] NOT NULL,
	[ShiftDate] [datetime] NULL,
	[ShiftDay] [varchar](10) NULL,
	[ShiftIn] [time](7) NULL,
	[ShiftOut] [time](7) NULL,
	[Leave] [bit] NULL,
	[Tracking] [varchar](100) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfEquipmentAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfEquipmentAssignment](
	[EqmtAssignID] [bigint] IDENTITY(1,1) NOT NULL,
	[EquipmentID] [bigint] NULL,
	[BoxID] [varchar](15) NOT NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfEquipmentItemAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfEquipmentItemAssignment](
	[EquipmentID] [bigint] NULL,
	[ItemID] [bigint] NULL,
	[BoxID] [nvarchar](200) NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[Remarks] [varchar](1500) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfEquipmentLocation]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfEquipmentLocation](
	[EquipmentLoca] [tinyint] NULL,
	[EquipmentLocaName] [varchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfFailSafeNotification]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFailSafeNotification](
	[NotificationType] [tinyint] NOT NULL,
	[NotificationDate] [date] NOT NULL,
	[IsNotificationSent] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Index [ClusteredIndex-20190128-102237]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [ClusteredIndex-20190128-102237] ON [dbo].[rvlfFailSafeNotification]
(
	[NotificationType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfFaultyDevices]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFaultyDevices](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Boxid] [bigint] NULL,
	[FaultDate] [datetime] NULL,
	[FixedDate] [datetime] NULL,
	[Isfault] [bit] NULL,
 CONSTRAINT [PK__rvlfFaul__3213E83F85D31F42] 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
/****** Object:  Table [dbo].[RVLFFILTERUSERASSIGNMENT]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFFILTERUSERASSIGNMENT](
	[ASSIGNMENTID] [int] IDENTITY(1,1) NOT NULL,
	[USERID] [int] NOT NULL,
	[FILTERID] [int] NOT NULL,
 CONSTRAINT [PK_RVLFFILTERUSERASSIGNMENT_ASSIGNMENTID] PRIMARY KEY CLUSTERED 
(
	[ASSIGNMENTID] 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].[rvlfFirmware]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFirmware](
	[FwId] [bigint] IDENTITY(234,1) NOT NULL,
	[BoxHwTypeId] [bigint] NULL,
	[FwTypeId] [bigint] NULL,
	[FwName] [varchar](75) NULL,
	[FwLocalPath] [varchar](150) NULL,
	[FwOAPPath] [varchar](150) NULL,
	[FwDateReleased] [datetime] NULL,
	[MaxGeozones] [int] NULL,
	[OAPPort] [int] NULL,
	[FwCategoryID] [int] NULL,
	[LastUpdatedDate] [datetime] NULL,
 CONSTRAINT [PK_rvlfFirmware] PRIMARY KEY CLUSTERED 
(
	[FwId] 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].[rvlfFirmwareCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFirmwareCategory](
	[FwCategoryID] [int] NOT NULL,
	[FwCategotyName] [nvarchar](100) NULL,
 CONSTRAINT [PK_rvlfFirmwareCategory] PRIMARY KEY CLUSTERED 
(
	[FwCategoryID] 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].[rvlfFirmwareChannels]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFirmwareChannels](
	[FwChId] [bigint] IDENTITY(355,1) NOT NULL,
	[ChId] [bigint] NULL,
	[FwId] [bigint] NULL,
	[ChPriority] [tinyint] NULL,
 CONSTRAINT [PK_rvlfFirmwareChannels] PRIMARY KEY CLUSTERED 
(
	[FwChId] 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].[rvlfFirmwareType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFirmwareType](
	[FwTypeId] [bigint] IDENTITY(3,1) NOT NULL,
	[FwTypeName] [varchar](75) NULL,
 CONSTRAINT [PK_rvlfFirmwareType] PRIMARY KEY CLUSTERED 
(
	[FwTypeId] 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].[rvlfFleet]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFleet](
	[FleetId] [bigint] IDENTITY(285,1) NOT NULL,
	[FleetName] [nvarchar](100) NULL,
	[OrganizationId] [bigint] NOT NULL,
	[Description] [varchar](250) NOT NULL,
	[Email] [varchar](2010) NULL,
	[SMS] [varchar](160) NULL,
	[TimeZone] [int] NULL,
	[DayLightSaving] [bit] NULL,
	[Notify] [bit] NULL,
	[Warning] [bit] NULL,
	[Critical] [bit] NULL,
	[AutoAdjustDayLightSaving] [bit] NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDefault] [bit] NULL,
	[StationID] [int] NULL,
	[Fleet_Latitude] [decimal](10, 6) NULL,
	[Fleet_Longitude] [decimal](10, 6) NULL,
	[PowerPlantRating] [varchar](50) NULL,
	[RatingOfHVREquip] [varchar](50) NULL,
	[ControllerType] [tinyint] NULL,
 CONSTRAINT [PK_rvlfFleet] PRIMARY KEY CLUSTERED 
(
	[FleetId] 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].[rvlfFleetUsers]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFleetUsers](
	[FleetId] [bigint] NOT NULL,
	[UserId] [bigint] NOT NULL,
	[AssignedBy] [bigint] NOT NULL,
	[AssignedDate] [datetime] NOT NULL,
 CONSTRAINT [PK_rvlfFleetUsers] PRIMARY KEY CLUSTERED 
(
	[FleetId] ASC,
	[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
/****** Object:  Table [dbo].[rvlfFleetVehicles]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFleetVehicles](
	[FleetId] [bigint] NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[IsActive] [bit] NOT NULL,
	[AssignedBy] [bigint] NOT NULL,
	[AssignedDate] [datetime] NOT NULL,
	[DeactivatedBy] [bigint] NULL,
	[DeactivatedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [Idx_FleetId]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [Idx_FleetId] ON [dbo].[rvlfFleetVehicles]
(
	[FleetId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfFMIMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFMIMaster](
	[FMIMasterID] [bigint] IDENTITY(32,1) NOT NULL,
	[FMIId] [bigint] NULL,
	[FMIDescription] [varchar](1000) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfFuelContainer]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFuelContainer](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[RefgId] [int] NOT NULL,
	[Odometer] [bigint] NOT NULL,
	[Date] [datetime] NULL,
	[FuelQty] [varchar](50) NULL,
	[Value] [varchar](50) NULL,
	[AvgConsumption] [float] NOT NULL,
	[CurrConsumption] [float] NOT NULL,
	[Variance] [float] NULL,
	[Mileage] [float] NULL,
	[Price] [float] NULL,
	[ExsLessQty] [float] NULL,
	[CreatedBy] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NOT NULL,
 CONSTRAINT [PK_rvlfFuelContainer] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfFuelEntry]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFuelEntry](
	[FuelEntryID] [bigint] IDENTITY(78,1) NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[FromDate] [date] NULL,
	[ToDate] [date] NULL,
	[FuelFilled] [decimal](18, 2) NOT NULL,
	[FuelCost] [decimal](18, 2) NULL,
	[Comments] [varchar](250) NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[FuelFilledDateTime] [datetime] NULL,
	[FuelStation] [varchar](250) NULL,
 CONSTRAINT [PK_rvlf_FuelEntry] PRIMARY KEY CLUSTERED 
(
	[FuelEntryID] 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].[rvlfFuelVehicle]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfFuelVehicle](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[VehicleId] [bigint] NULL,
	[Odometer] [bigint] NULL,
	[Date] [datetime] NULL,
	[FuelQty] [varchar](50) NULL,
	[Value] [varchar](50) NULL,
	[AvgConsumption] [float] NULL,
	[CurrConsumption] [float] NULL,
	[Variance] [float] NULL,
	[Mileage] [float] NULL,
	[Price] [float] NULL,
	[ExsLessQty] [float] NULL,
	[CreatedBy] [int] NOT NULL,
	[CreateDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NULL,
	[IsRecent] [bit] NULL,
 CONSTRAINT [PK_rvlfFuelVehicle] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfGarminRoute]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGarminRoute](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[VehicleId] [int] NOT NULL,
	[RouteId] [smallint] NULL,
	[UserId] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[RouteStatus] [varchar](30) NULL,
	[IsAssigned] [bit] NULL,
	[LanmarkId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGarminStop]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGarminStop](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[VehicleId] [int] NOT NULL,
	[StopId] [int] NOT NULL,
	[LandmarkId] [int] NULL,
	[UserId] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[StopStatus] [varchar](30) NULL,
	[IsAssigned] [bit] NULL,
	[StreetAddress] [nvarchar](250) NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[isRoute] [bit] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGarminStopStatus]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGarminStopStatus](
	[StatusId] [int] IDENTITY(1,1) NOT NULL,
	[StatusName] [varchar](25) NOT NULL,
	[StatusCode] [varchar](5) NULL,
	[IsStopStatus] [bit] NOT NULL,
	[FutureCol] [varchar](1) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGarminWaypoint]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGarminWaypoint](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[VehicleId] [int] NOT NULL,
	[WayPointId] [int] NOT NULL,
	[LandmarkId] [int] NULL,
	[SymbolId] [int] NULL,
	[UserId] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[Comments] [varchar](200) NULL,
	[IsAssigned] [bit] NULL,
	[StreetAddress] [nvarchar](250) NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGatewayMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGatewayMaster](
	[GatewayMasterId] [bigint] IDENTITY(1,1) NOT NULL,
	[GatewayId] [nvarchar](50) NOT NULL,
	[GatewayPassword] [varchar](500) NOT NULL,
	[OrganizationId] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[CreatedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[IsDeleted] [bit] NULL,
 CONSTRAINT [PK_rvlfGatewayMaster] PRIMARY KEY CLUSTERED 
(
	[GatewayMasterId] 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].[rvlfGeozoneRestricted]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGeozoneRestricted](
	[VehicleId] [bigint] NULL,
	[GeozoneNo] [bigint] NULL,
	[IsRestricted] [bit] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGeozoneSalikFare]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGeozoneSalikFare](
	[SNo] [bigint] IDENTITY(61,1) NOT NULL,
	[GeozoneID] [bigint] NULL,
	[VehicleTypeId] [int] NULL,
	[TollFare] [numeric](8, 2) NULL,
	[ValidFrom] [datetime] NULL,
	[ValidTo] [datetime] NULL,
	[Status] [bit] NULL,
 CONSTRAINT [PK_rvlfGeozoneSalikFare] PRIMARY KEY CLUSTERED 
(
	[SNo] 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].[rvlfGeozoneSet]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGeozoneSet](
	[GeozoneNo] [bigint] NOT NULL,
	[SequenceNo] [tinyint] NOT NULL,
	[Latitude] [decimal](10, 6) NOT NULL,
	[Longitude] [decimal](12, 6) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGoogleRequest]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGoogleRequest](
	[RequestDate] [date] NOT NULL,
	[RequestCount] [bigint] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGridAdvancedFilters]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGridAdvancedFilters](
	[FilterSettingsID] [bigint] IDENTITY(20,1) NOT NULL,
	[UserID] [bigint] NULL,
	[ModuleId] [int] NULL,
	[FilterExpression] [nvarchar](max) NULL,
 CONSTRAINT [PK_rvlfGridAdvancedFilters] PRIMARY KEY CLUSTERED 
(
	[FilterSettingsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfGroupSecurity]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfGroupSecurity](
	[UserGroupId] [int] NOT NULL,
	[OperationTypeId] [int] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_rvlfGroupSecurity] PRIMARY KEY CLUSTERED 
(
	[UserGroupId] 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].[rvlfIconType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfIconType](
	[IconTypeId] [bigint] NOT NULL,
	[IconTypeName] [varchar](25) NOT NULL,
 CONSTRAINT [PK_rvlfIconType] PRIMARY KEY CLUSTERED 
(
	[IconTypeId] 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].[rvlfInvItemMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvItemMaster](
	[ItemSNo] [bigint] IDENTITY(280,1) NOT NULL,
	[Itemcode] [varchar](50) NULL,
	[ItemName] [varchar](150) NULL,
	[ItemDesc] [varchar](300) NULL,
	[AvailQty] [int] NULL,
	[OpenQty] [int] NULL,
	[ReorderQty] [int] NULL,
	[UnitPrice] [numeric](18, 2) NULL,
	[IsActive] [bit] NULL,
	[Createdby] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[Modifiedby] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[OrganizatioID] [bigint] NULL,
	[ItemCatID] [int] NULL,
	[UOM] [tinyint] NULL,
	[ItemImage] [varchar](max) NULL,
	[SerialNo] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfInvItemMaster] PRIMARY KEY CLUSTERED 
(
	[ItemSNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfInvItemMaster_bkp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvItemMaster_bkp](
	[ItemSNo] [bigint] IDENTITY(280,1) NOT NULL,
	[Itemcode] [varchar](50) NULL,
	[ItemName] [varchar](150) NULL,
	[ItemDesc] [varchar](300) NULL,
	[AvailQty] [int] NULL,
	[OpenQty] [int] NULL,
	[ReorderQty] [int] NULL,
	[UnitPrice] [numeric](18, 2) NULL,
	[IsActive] [bit] NULL,
	[Createdby] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[Modifiedby] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[OrganizatioID] [bigint] NULL,
	[ItemCatID] [int] NULL,
	[UOM] [tinyint] NULL,
	[ItemImage] [nvarchar](max) NOT NULL,
	[SerialNo] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfInvItemMaster_bkp] PRIMARY KEY CLUSTERED 
(
	[ItemSNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfInvItemMaster_Test]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvItemMaster_Test](
	[ItemSNo] [bigint] IDENTITY(280,1) NOT NULL,
	[Itemcode] [varchar](50) NULL,
	[ItemName] [varchar](150) NULL,
	[ItemDesc] [varchar](300) NULL,
	[AvailQty] [int] NULL,
	[OpenQty] [int] NULL,
	[ReorderQty] [int] NULL,
	[UnitPrice] [numeric](18, 2) NULL,
	[IsActive] [bit] NULL,
	[Createdby] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[Modifiedby] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[OrganizatioID] [bigint] NULL,
	[ItemCatID] [int] NULL,
	[UOM] [tinyint] NULL,
	[ItemImage] [nvarchar](max) NULL,
	[SerialNo] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfInvItemMaster_Test] PRIMARY KEY CLUSTERED 
(
	[ItemSNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfInvoiceEntry]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvoiceEntry](
	[InvSno] [bigint] IDENTITY(38,1) NOT NULL,
	[InvoiceNo] [varchar](50) NULL,
	[InvoiceDate] [datetime] NULL,
	[DueDate] [datetime] NULL,
	[VendorID] [bigint] NULL,
	[Ref_PONo] [varchar](150) NULL,
	[Remarks] [varchar](500) NULL,
	[ModifiedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[CreatedBy] [bigint] NULL,
	[IsDelete] [bit] NULL,
	[OrganizationId] [bigint] NULL,
	[TotAmount] [numeric](18, 2) NULL,
	[TaxAmount] [numeric](18, 2) NULL,
 CONSTRAINT [PK_rvlfInvoiceEntry] PRIMARY KEY CLUSTERED 
(
	[InvSno] 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].[rvlfInvoiceItems]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvoiceItems](
	[InvL_Sno] [bigint] IDENTITY(1,1) NOT NULL,
	[InvSno] [bigint] NULL,
	[ItemCode] [varchar](50) NULL,
	[UnitPrice] [numeric](18, 2) NULL,
	[OrderQty] [int] NULL,
	[ReceivedQty] [int] NULL,
	[Amount] [numeric](18, 2) NULL,
	[TotalAmount] [numeric](18, 2) NULL,
	[ModifiedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[CreatedBy] [bigint] NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_rvlfInvoiceItems] PRIMARY KEY CLUSTERED 
(
	[InvL_Sno] 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].[rvlfInvOrderReqItems]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvOrderReqItems](
	[OrderSno] [bigint] IDENTITY(160,1) NOT NULL,
	[OrderNo] [bigint] NULL,
	[Itemcode] [varchar](50) NULL,
	[UnitPrice] [numeric](18, 2) NULL,
	[ReqQty] [int] NULL,
	[IssuedQty] [int] NULL,
	[TotalAmt] [numeric](18, 2) NULL,
	[Remarks] [varchar](250) NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_rvlfInvOrderReqItems] PRIMARY KEY CLUSTERED 
(
	[OrderSno] 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].[rvlfInvOrderRequest]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfInvOrderRequest](
	[OrderNo] [bigint] IDENTITY(40,1) NOT NULL,
	[OrderBy] [bigint] NULL,
	[OrderDate] [datetime] NULL,
	[ApprovedBy] [bigint] NULL,
	[ApprovedDate] [datetime] NULL,
	[CancelledBy] [bigint] NULL,
	[CancelledDate] [datetime] NULL,
	[Comments] [varchar](300) NULL,
	[Status] [char](1) NULL,
	[Modifiedby] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[OrganizationID] [bigint] NULL,
	[IsDelete] [bigint] NULL,
	[DueDate] [datetime] NULL,
	[OrderReqno]  AS ('ORN-'+CONVERT([varchar](20),[OrderNo],(0))),
 CONSTRAINT [PK_rvlfInvOrderRequest] PRIMARY KEY CLUSTERED 
(
	[OrderNo] 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].[rvlfItemCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfItemCategory](
	[ItemCatID] [smallint] IDENTITY(100,1) NOT NULL,
	[ItemCategoryName] [varchar](150) NULL,
	[IsDelete] [bit] NULL,
	[OrganizatioID] [bigint] NULL,
	[Createdby] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[Modifiedby] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[ItemCatDesc] [varchar](100) NULL,
 CONSTRAINT [PK_rvlfItemCategory] PRIMARY KEY CLUSTERED 
(
	[ItemCatID] 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].[rvlfItemTypeDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfItemTypeDetails](
	[ItemTypeDetailID] [bigint] IDENTITY(753,1) NOT NULL,
	[ItemTypeID] [bigint] NOT NULL,
	[ItemID] [bigint] NOT NULL,
	[SlNo] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [ClusteredIndex-20181212-111011]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [ClusteredIndex-20181212-111011] ON [dbo].[rvlfItemTypeDetails]
(
	[ItemTypeDetailID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfItemTypeMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfItemTypeMaster](
	[ItemTypeID] [bigint] IDENTITY(70,1) NOT NULL,
	[ItemTypeName] [varchar](100) NOT NULL,
	[ItemtypeDesc] [varchar](250) NULL,
	[Image] [varchar](max) NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifyBy] [bigint] NULL,
	[ModifyDate] [datetime] NULL,
	[isDelete] [int] NULL,
	[OrganizatioID] [bigint] NULL,
 CONSTRAINT [PK_rvlfItemTypeMaster] PRIMARY KEY CLUSTERED 
(
	[ItemTypeID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[RVLFKPICALCULATION]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPICALCULATION](
	[CALCID] [tinyint] IDENTITY(5,1) NOT NULL,
	[CALCNAME] [varchar](10) NOT NULL,
	[ISVISIBLE] [bit] NOT NULL,
 CONSTRAINT [PK_RVLFKPICALCULATION_CALCID] PRIMARY KEY CLUSTERED 
(
	[CALCID] 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].[RVLFKPICHARTTYPES]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPICHARTTYPES](
	[CHARTID] [tinyint] IDENTITY(1,1) NOT NULL,
	[CHARTNAME] [varchar](10) NOT NULL,
	[ISVISIBLE] [bit] NOT NULL,
 CONSTRAINT [PK_RVLFKPICHARTTYPES_CHARTID] PRIMARY KEY CLUSTERED 
(
	[CHARTID] 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].[RVLFKPIDISPLAY]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIDISPLAY](
	[DISPLAYID] [tinyint] IDENTITY(5,1) NOT NULL,
	[DISPLAYNAME] [varchar](20) NOT NULL,
	[ISVISIBLE] [bit] NOT NULL,
	[TILETEMPLATE] [varchar](max) NULL,
	[TILETEMPLATE_Mobile] [varchar](max) NULL,
	[PROGRESSBARTEMPLATE] [varchar](max) NULL,
	[ResponsiveTemplate] [varchar](max) NULL,
 CONSTRAINT [PK_RVLFKPIDISPLAY_DISPLAYID] PRIMARY KEY CLUSTERED 
(
	[DISPLAYID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[RVLFKPIFILTERS]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIFILTERS](
	[FILTERID] [int] IDENTITY(1,1) NOT NULL,
	[FILTERNAME] [varchar](25) NOT NULL,
	[FILTERDESC] [varchar](150) NULL,
	[ISDELETE] [bit] NOT NULL,
	[CREATEDBY] [int] NOT NULL,
	[CREATEDDATE] [datetime] NOT NULL,
	[MODIFIEDBY] [int] NULL,
	[MODIFIEDDATE] [datetime] NULL,
 CONSTRAINT [PK_RVLFKPIFILTERS_FILTERID] PRIMARY KEY CLUSTERED 
(
	[FILTERID] 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].[RVLFKPIFILTERUSERASSIGNMENT]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIFILTERUSERASSIGNMENT](
	[ASSIGNMENTID] [int] IDENTITY(1,1) NOT NULL,
	[USERID] [int] NOT NULL,
	[FILTERID] [int] NOT NULL,
 CONSTRAINT [PK_RVLFKPIFILTERUSERASSIGNMENT_ASSIGNMENTID] PRIMARY KEY CLUSTERED 
(
	[ASSIGNMENTID] 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].[rvlfKPIGridPosition]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfKPIGridPosition](
	[PositionId] [bigint] IDENTITY(784,1) NOT NULL,
	[AssignmentId] [bigint] NOT NULL,
	[x] [tinyint] NULL,
	[y] [tinyint] NULL,
	[width] [tinyint] NULL,
	[height] [tinyint] NULL,
 CONSTRAINT [PK_rvlfKPIGridPosition] PRIMARY KEY CLUSTERED 
(
	[PositionId] 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].[RVLFKPIMASTER]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIMASTER](
	[KPIID] [int] IDENTITY(1,1) NOT NULL,
	[KPINAME] [varchar](150) NOT NULL,
	[KPIDESC] [varchar](250) NULL,
	[KPITYPEID] [int] NOT NULL,
	[ORGID] [bigint] NOT NULL,
	[CALCID] [tinyint] NOT NULL,
	[DISPLAYID] [tinyint] NOT NULL,
	[ISUNIT] [bit] NOT NULL,
	[UNITNAME] [varchar](5) NULL,
	[ISCHART] [bit] NOT NULL,
	[CHARTID] [tinyint] NULL,
	[ISGRID] [bit] NOT NULL,
	[GRIDCOLUMNS] [tinyint] NULL,
	[CREATEDBY] [int] NOT NULL,
	[CREATEDDATE] [datetime] NOT NULL,
	[MODIFIEDBY] [int] NULL,
	[MODIFIEDDATE] [datetime] NULL,
 CONSTRAINT [PK_RVLFKPIMASTER_KPIID] PRIMARY KEY CLUSTERED 
(
	[KPIID] 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].[RVLFKPIMASTER_FMS]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIMASTER_FMS](
	[KPIID] [int] IDENTITY(1,1) NOT NULL,
	[KPINAME] [varchar](150) NOT NULL,
	[KPIDESC] [varchar](250) NULL,
	[KPITYPEID] [int] NOT NULL,
	[ORGID] [bigint] NOT NULL,
	[CALCID] [tinyint] NOT NULL,
	[DISPLAYID] [tinyint] NOT NULL,
	[ISUNIT] [bit] NOT NULL,
	[UNITNAME] [varchar](5) NULL,
	[ISCHART] [bit] NOT NULL,
	[CHARTID] [tinyint] NULL,
	[ISGRID] [bit] NOT NULL,
	[GRIDCOLUMNS] [tinyint] NULL,
	[CREATEDBY] [int] NOT NULL,
	[CREATEDDATE] [datetime] NOT NULL,
	[MODIFIEDBY] [int] NULL,
	[MODIFIEDDATE] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[RVLFKPIQUERYBUILDER]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIQUERYBUILDER](
	[BUILDERID] [int] IDENTITY(1,1) NOT NULL,
	[KPIID] [int] NOT NULL,
	[SQLQUERY] [varchar](max) NOT NULL,
	[CREATEDBY] [int] NOT NULL,
	[CREATEDDATE] [datetime] NOT NULL,
	[MODIFIEDBY] [int] NULL,
	[MODIFIEDDATE] [datetime] NULL,
 CONSTRAINT [PK_RVLFKPIQUERYBUILDER_BUILDERID] PRIMARY KEY CLUSTERED 
(
	[BUILDERID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[RVLFKPIREFERENCE_LOG]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIREFERENCE_LOG](
	[REFERENCEID] [int] IDENTITY(1,1) NOT NULL,
	[KPIId] [int] NOT NULL,
	[KPITITLE] [varchar](75) NOT NULL,
	[UserId] [varchar](max) NULL,
	[UserGroupId] [varchar](max) NULL,
	[FilterId] [varchar](max) NULL,
 CONSTRAINT [PK_RVLFKPIREFERENCE_LOG_REFERENCEID] PRIMARY KEY CLUSTERED 
(
	[REFERENCEID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[RVLFKPITYPES]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPITYPES](
	[KPITYPEID] [int] IDENTITY(1,1) NOT NULL,
	[KPITYPENAME] [varchar](50) NOT NULL,
	[ISSTANDARD] [bit] NOT NULL,
	[OPERATIONTYPEID] [int] NOT NULL,
 CONSTRAINT [PK_RVLFKPITYPES_KPITYPEID] PRIMARY KEY CLUSTERED 
(
	[KPITYPEID] 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].[RVLFKPIUSERASSIGNMENT]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RVLFKPIUSERASSIGNMENT](
	[ASSIGNMENTID] [int] IDENTITY(1,1) NOT NULL,
	[KPIID] [int] NOT NULL,
	[USERID] [int] NOT NULL,
	[ASSIGNEDBY] [int] NOT NULL,
	[ASSIGNDDATE] [datetime] NOT NULL,
	[MODIFIEDBY] [int] NULL,
	[MODIFIEDDATE] [datetime] NULL,
	[CUSTOMTITLE] [varchar](75) NOT NULL,
	[CUSTOMDESC] [varchar](250) NULL,
	[FLEETID] [int] NOT NULL,
	[BOXID] [varchar](75) NOT NULL,
	[TITLECLRCODE] [varchar](10) NOT NULL,
	[DISPTYPEID] [tinyint] NOT NULL,
	[CostKPIsValue] [decimal](18, 2) NULL,
	[TemperatureType] [tinyint] NULL,
	[REFRESHFREQUENCY] [int] NOT NULL,
	[DURATION] [int] NOT NULL,
	[MINRANGE] [int] NOT NULL,
	[MAXRANGE] [int] NOT NULL,
	[ISASSIGN] [bit] NOT NULL,
	[ISDELETE] [bit] NOT NULL,
	[REFERENCEID] [int] NOT NULL,
	[IsReversed] [bit] NULL,
	[CustId] [bigint] NULL,
	[CurrEnergytype] [int] NULL,
 CONSTRAINT [PK_RVLFKPIUSERASSINGMENT_ASSIGNMENTID] PRIMARY KEY CLUSTERED 
(
	[ASSIGNMENTID] 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].[rvlfLandmark]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfLandmark](
	[LandmarkID] [bigint] IDENTITY(1618,1) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[LandmarkName] [nvarchar](100) NULL,
	[Latitude] [decimal](10, 6) NOT NULL,
	[Longitude] [decimal](10, 6) NOT NULL,
	[Description] [nvarchar](250) NULL,
	[Radius] [int] NOT NULL,
	[Notify] [bit] NOT NULL,
	[Warning] [bit] NOT NULL,
	[Critical] [bit] NOT NULL,
	[Email] [varchar](2010) NULL,
	[SMS] [varchar](160) NULL,
	[TimeZone] [int] NULL,
	[DayLightSaving] [int] NULL,
	[AutoAdjustDayLightSaving] [bit] NULL,
	[StreetAddress] [nvarchar](250) NULL,
	[LandmarkType] [tinyint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[LandmarkCategoryID] [bigint] NULL,
	[StreetAddress_Ar] [nvarchar](250) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
 CONSTRAINT [PK_rvlfLandmark] PRIMARY KEY CLUSTERED 
(
	[LandmarkID] 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].[rvlfLandmarkCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfLandmarkCategory](
	[LandmarkCategoryID] [bigint] IDENTITY(91,1) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[CategoryName] [nvarchar](50) NULL,
	[Description] [nvarchar](500) NULL,
	[ImagePath] [nvarchar](500) NULL,
 CONSTRAINT [PK_rvlfLandmarkCategory] PRIMARY KEY CLUSTERED 
(
	[LandmarkCategoryID] 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].[rvlfLocalityMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfLocalityMaster](
	[LocalityId] [bigint] IDENTITY(106,1) NOT NULL,
	[LocalityName] [varchar](100) NULL,
	[Latitude] [numeric](10, 6) NULL,
	[Longitude] [numeric](10, 6) NULL,
	[OrgId] [bigint] NULL,
	[Allocated] [bit] NULL,
	[DisplayName] [varchar](20) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfLogoOption]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfLogoOption](
	[LogoOptionID] [int] NULL,
	[LogoOptionName] [nvarchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfLogProcCalls]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfLogProcCalls](
	[LogID] [bigint] IDENTITY(172081,1) NOT NULL,
	[ProcedureName] [varchar](50) NULL,
	[ParameterList] [varchar](600) NULL,
 CONSTRAINT [PK_rvlfLogProcCalls] PRIMARY KEY CLUSTERED 
(
	[LogID] 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].[rvlfMaintenanceCategoryService]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenanceCategoryService](
	[ServiceCategoryId] [bigint] NOT NULL,
	[ServiceId] [bigint] NOT NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL,
 CONSTRAINT [PK_rvlfMaintenanceCategoryService] PRIMARY KEY CLUSTERED 
(
	[ServiceCategoryId] ASC,
	[ServiceId] 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].[rvlfMaintenancePlan]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenancePlan](
	[PlanId] [bigint] IDENTITY(153,1) NOT NULL,
	[PlanName] [varchar](100) NOT NULL,
	[PlanDescription] [varchar](250) NULL,
	[RecurringService] [bit] NULL,
	[OverdueReminder] [tinyint] NULL,
	[TotalPlannedCost] [numeric](18, 2) NULL,
	[OrganizationId] [bigint] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[VAT] [numeric](18, 2) NULL,
 CONSTRAINT [PK_rvlfMaintenancePlan] PRIMARY KEY CLUSTERED 
(
	[PlanId] 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].[rvlfMaintenancePlanDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenancePlanDetails](
	[PlanDetailsId] [bigint] IDENTITY(241,1) NOT NULL,
	[PlanId] [bigint] NOT NULL,
	[ServiceType] [tinyint] NOT NULL,
	[ServiceInterval] [int] NOT NULL,
	[Frequency] [tinyint] NOT NULL,
	[Notification1] [tinyint] NOT NULL,
	[Notification2] [tinyint] NOT NULL,
	[Notification3] [tinyint] NOT NULL,
 CONSTRAINT [PK_rvlfMaintenancePlanDetails] PRIMARY KEY CLUSTERED 
(
	[PlanDetailsId] 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].[rvlfMaintenancePlanServices]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenancePlanServices](
	[PlanId] [bigint] NOT NULL,
	[ServiceId] [bigint] NOT NULL,
	[PlannedCost] [numeric](18, 2) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMaintenanceService]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenanceService](
	[ServiceId] [bigint] IDENTITY(88,1) NOT NULL,
	[ServiceName] [varchar](100) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[Description] [varchar](250) NULL,
	[ServiceCategoryId] [bigint] NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
 CONSTRAINT [PK_rvlfMaintenanceService] PRIMARY KEY CLUSTERED 
(
	[ServiceId] 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].[rvlfMaintenanceServiceCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenanceServiceCategory](
	[ServiceCategoryId] [bigint] IDENTITY(31,1) NOT NULL,
	[ServiceCategoryName] [nvarchar](50) NOT NULL,
	[ServiceCatDescription] [varchar](250) NULL,
	[OrganizationId] [bigint] NOT NULL,
 CONSTRAINT [PK_rvlfMaintenanceServiceCategory] PRIMARY KEY CLUSTERED 
(
	[ServiceCategoryId] 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].[rvlfMaintenanceServiceDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMaintenanceServiceDetails](
	[ServiceDetailsId] [bigint] NOT NULL,
	[ServiceId] [bigint] NOT NULL,
	[ServicedOn] [datetime] NULL,
	[ServiceCost] [decimal](18, 2) NULL,
	[ServicedBy] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMAKDevices]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMAKDevices](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[SubTypeId] [int] NULL,
	[EquipmentName] [varchar](50) NULL,
	[DateOfPurchase] [date] NULL,
	[CustomerName] [varchar](50) NULL,
	[EquipmentLocation] [varchar](250) NULL,
	[ContactNo] [varchar](15) NULL,
	[WarrantyStDate] [datetime] NULL,
	[WarrantyEndDate] [datetime] NULL,
	[AMCStDate] [datetime] NULL,
	[AMCEndDate] [datetime] NULL,
	[AdditionalInfo] [varchar](250) NULL,
	[OrganizationId] [int] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NULL,
	[VehicleId] [bigint] NULL,
	[Email] [varchar](100) NULL,
	[CustomerId] [int] NULL,
	[OpeningEngineHrs] [bigint] NULL,
	[EquipmentSrNo] [varchar](50) NULL,
	[EquipmentLoca] [tinyint] NULL,
	[EConsumptionType] [tinyint] NULL,
	[NoofShifts] [varchar](100) NULL,
	[VFantype] [tinyint] NULL,
	[isAddParams] [bit] NULL,
	[IsMainScr] [bit] NULL,
 CONSTRAINT [PK_rvlfMAKDevices] PRIMARY KEY CLUSTERED 
(
	[Sno] ASC,
	[BoxId] 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].[rvlfMake]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMake](
	[MakeId] [smallint] IDENTITY(1,1) NOT NULL,
	[MakeName] [varchar](50) NOT NULL,
	[VehicleTypeId] [tinyint] NULL,
 CONSTRAINT [PK_rvlfMake] PRIMARY KEY CLUSTERED 
(
	[MakeId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMAKParameters]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMAKParameters](
	[Sno] [int] NOT NULL,
	[BoxMsgInTypeId] [int] NOT NULL,
	[ParameterName] [varchar](150) NOT NULL,
	[VehicleTypeId] [tinyint] NOT NULL,
	[OrganizationId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMAKProducts]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMAKProducts](
	[ProductId] [tinyint] NOT NULL,
	[ProductName] [varchar](30) NOT NULL,
	[ProductDesc] [varchar](100) NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[IsDelete] [bit] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMakSubProducts]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMakSubProducts](
	[SubtypeId] [int] NOT NULL,
	[ProductId] [tinyint] NULL,
	[SubTypeDesc] [varchar](50) NULL,
	[Isdelete] [bit] NULL,
	[CreatedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfManualEntry]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfManualEntry](
	[ManualEntryID] [bigint] IDENTITY(70,1) NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[FromDate] [date] NOT NULL,
	[ToDate] [date] NOT NULL,
	[EngineHours] [bigint] NULL,
	[Kilometers] [bigint] NULL,
	[Comments] [varchar](250) NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_rvlfManualEntry] PRIMARY KEY CLUSTERED 
(
	[ManualEntryID] 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].[rvlfMDTBoxMessageTable]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMDTBoxMessageTable](
	[BoxId] [int] NOT NULL,
	[CannedMsgId] [bigint] NULL,
	[UserId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMDTFormAssigned]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMDTFormAssigned](
	[MsgNo] [int] NOT NULL,
	[VehicleId] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMDTFormMessages]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMDTFormMessages](
	[MsgNo] [int] IDENTITY(1,1) NOT NULL,
	[FormMsgId] [int] NOT NULL,
	[MsgName] [varchar](150) NOT NULL,
	[Answer] [varchar](25) NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[IsDelete] [bit] NOT NULL,
	[BoxId] [bigint] NOT NULL,
	[Title] [varchar](20) NULL,
	[OrganizationId] [int] NULL,
	[TypeId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMDTMsg]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMDTMsg](
	[BoxID] [bigint] NOT NULL,
	[GroupId] [int] NOT NULL,
	[MsgId] [int] NOT NULL,
	[MsgMode] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMDTUserTable]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMDTUserTable](
	[UserId] [bigint] IDENTITY(106,1) NOT NULL,
	[MDTUserId] [varchar](5) NOT NULL,
	[MDTUserName] [varchar](50) NOT NULL,
	[MDTUserPassword] [varchar](8) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
 CONSTRAINT [PK_rvlfMDTUserTable] 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
/****** Object:  Table [dbo].[rvlfModel]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfModel](
	[ModelId] [smallint] IDENTITY(1,1) NOT NULL,
	[ModelName] [varchar](200) NULL,
	[MakeId] [smallint] NULL,
	[VehicleTypeId] [smallint] NULL,
 CONSTRAINT [PK_rvlfModel] PRIMARY KEY CLUSTERED 
(
	[ModelId] 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].[rvlfModule]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfModule](
	[ModuleID] [bigint] IDENTITY(57,1) NOT NULL,
	[ModuleName] [varchar](50) NOT NULL,
	[ModuleDesc] [varchar](250) NULL,
	[ClassName] [varchar](50) NULL,
	[PagePath] [varchar](250) NULL,
	[ParentModuleId] [bigint] NULL,
	[DisplayOrder] [int] NULL,
	[IsVisibleToNonAnglerAdmin] [bit] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[ModuleName_Ar] [nvarchar](100) NULL,
 CONSTRAINT [PK_rvlfModule] PRIMARY KEY CLUSTERED 
(
	[ModuleID] 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].[rvlfMsgInHst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst](
	[MessageInID] [uniqueidentifier] NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[OriginDateTime] [datetime] NOT NULL,
	[DateTimeReceived] [datetime] NOT NULL,
	[ServiceID] [tinyint] NULL,
	[BoxMsgInTypeId] [tinyint] NULL,
	[BoxProtocolTypeId] [tinyint] NULL,
	[CommInfo1] [varchar](15) NULL,
	[CommInfo2] [int] NULL,
	[ValidGps] [smallint] NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[Speed] [tinyint] NULL,
	[Heading] [smallint] NULL,
	[SensorMask] [varchar](30) NULL,
	[CustomProp] [varchar](2000) NULL,
	[StreetAddress] [varchar](250) NULL,
	[SequenceNum] [bigint] NULL,
	[IsArmed] [bit] NULL,
	[NearestLandmark] [varchar](300) NULL,
	[Priority] [tinyint] NULL,
	[IsNotificationSent] [bit] NULL,
	[LandMarkID] [bigint] NULL,
	[IsProcessed] [bit] NULL,
	[IsNew] [bit] NULL,
	[RecordID] [bigint] NULL,
	[odometer] [bigint] NULL,
	[duration] [bigint] NULL,
	[RoadSpeedLimit] [varchar](100) NULL,
	[RoadType] [int] NULL,
	[StreetAddress_AR] [nvarchar](max) NULL,
	[MsgStatus] [varchar](200) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[IsArchived] [bit] NULL,
	[ControllerID] [tinyint] NULL,
	[RefID] [int] NULL,
	[CmdId] [tinyint] NULL,
	[DCSIM] [tinyint] NULL,
	[WeatherInfo] [nvarchar](4000) NULL,
	[Alarm] [bit] NULL,
 CONSTRAINT [PK_rvlfMsgInHst] PRIMARY KEY CLUSTERED 
(
	[MessageInID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfmsginhst_bkp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfmsginhst_bkp](
	[MessageInID] [uniqueidentifier] NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[OriginDateTime] [datetime] NOT NULL,
	[DateTimeReceived] [datetime] NOT NULL,
	[ServiceID] [tinyint] NULL,
	[BoxMsgInTypeId] [tinyint] NULL,
	[BoxProtocolTypeId] [tinyint] NULL,
	[CommInfo1] [varchar](15) NULL,
	[CommInfo2] [int] NULL,
	[ValidGps] [smallint] NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[Speed] [tinyint] NULL,
	[Heading] [smallint] NULL,
	[SensorMask] [varchar](30) NULL,
	[CustomProp] [varchar](2000) NULL,
	[StreetAddress] [varchar](250) NULL,
	[SequenceNum] [bigint] NULL,
	[IsArmed] [bit] NULL,
	[NearestLandmark] [varchar](300) NULL,
	[Priority] [tinyint] NULL,
	[IsNotificationSent] [bit] NULL,
	[LandMarkID] [bigint] NULL,
	[IsProcessed] [bit] NULL,
	[IsNew] [bit] NULL,
	[RecordID] [bigint] NULL,
	[odometer] [bigint] NULL,
	[duration] [bigint] NULL,
	[RoadSpeedLimit] [varchar](100) NULL,
	[RoadType] [int] NULL,
	[StreetAddress_AR] [nvarchar](max) NULL,
	[MsgStatus] [varchar](200) NULL,
	[StreetAddress_Hin] [nvarchar](250) NULL,
	[IsArchived] [bit] NULL,
	[ControllerID] [tinyint] NULL,
	[RefID] [int] NULL,
	[CmdId] [tinyint] NULL,
	[DCSIM] [tinyint] NULL,
	[WeatherInfo] [nvarchar](4000) NULL,
	[Alarm] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMsgInHst_FibreCompactor]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst_FibreCompactor](
	[MessageInID] [uniqueidentifier] NULL,
	[OriginDateTime] [datetime] NULL,
	[BoxID] [varchar](15) NULL,
	[CR12] [decimal](18, 1) NULL,
	[CY12] [decimal](18, 1) NULL,
	[CB12] [decimal](18, 1) NULL,
	[CR12_R] [bit] NULL,
	[WH12] [float] NULL,
	[PF12] [decimal](18, 2) NULL,
	[PO12] [decimal](18, 1) NULL,
	[P8] [float] NULL,
	[P8_R] [bit] NULL,
	[CR13] [decimal](18, 1) NULL,
	[CY13] [decimal](18, 1) NULL,
	[CB13] [decimal](18, 1) NULL,
	[CR13_R] [bit] NULL,
	[WH13] [float] NULL,
	[PF13] [decimal](18, 2) NULL,
	[PO13] [decimal](18, 1) NULL,
	[CR14] [decimal](18, 1) NULL,
	[CY14] [decimal](18, 1) NULL,
	[CB14] [decimal](18, 1) NULL,
	[CR14_R] [bit] NULL,
	[WH14] [float] NULL,
	[PF14] [decimal](18, 2) NULL,
	[PO14] [decimal](18, 1) NULL,
	[P9] [float] NULL,
	[P9_R] [bit] NULL,
	[CR15] [decimal](18, 1) NULL,
	[CY15] [decimal](18, 1) NULL,
	[CB15] [decimal](18, 1) NULL,
	[CR15_R] [bit] NULL,
	[WH15] [float] NULL,
	[PF15] [decimal](18, 2) NULL,
	[PO15] [decimal](18, 1) NULL,
	[CR16] [decimal](18, 1) NULL,
	[CY16] [decimal](18, 1) NULL,
	[CB16] [decimal](18, 1) NULL,
	[CR16_R] [bit] NULL,
	[WH16] [float] NULL,
	[PF16] [decimal](18, 2) NULL,
	[PO16] [decimal](18, 1) NULL,
	[P10] [float] NULL,
	[P10_R] [bit] NULL,
	[CR17] [decimal](18, 1) NULL,
	[CY17] [decimal](18, 1) NULL,
	[CB17] [decimal](18, 1) NULL,
	[CR17_R] [bit] NULL,
	[WH17] [float] NULL,
	[PF17] [decimal](18, 2) NULL,
	[PO17] [decimal](18, 1) NULL,
	[CR18] [decimal](18, 1) NULL,
	[CY18] [decimal](18, 1) NULL,
	[CB18] [decimal](18, 1) NULL,
	[CR18_R] [bit] NULL,
	[WH18] [float] NULL,
	[PF18] [decimal](18, 2) NULL,
	[PO18] [decimal](18, 1) NULL,
	[P11] [float] NULL,
	[P11_R] [bit] NULL,
	[CR19] [decimal](18, 1) NULL,
	[CY19] [decimal](18, 1) NULL,
	[CB19] [decimal](18, 1) NULL,
	[CR19_R] [bit] NULL,
	[WH19] [float] NULL,
	[PF19] [decimal](18, 2) NULL,
	[PO19] [decimal](18, 1) NULL,
	[CY12_R] [bit] NULL,
	[CB12_R] [bit] NULL,
	[CY13_R] [bit] NULL,
	[CB13_R] [bit] NULL,
	[CY14_R] [bit] NULL,
	[CB14_R] [bit] NULL,
	[CY15_R] [bit] NULL,
	[CB15_R] [bit] NULL,
	[CY16_R] [bit] NULL,
	[CB16_R] [bit] NULL,
	[CY17_R] [bit] NULL,
	[CB17_R] [bit] NULL,
	[CY18_R] [bit] NULL,
	[CB18_R] [bit] NULL,
	[CY19_R] [bit] NULL,
	[CB19_R] [bit] NULL,
	[WH12_EC] [bigint] NULL,
	[WH13_EC] [bigint] NULL,
	[WH14_EC] [bigint] NULL,
	[WH15_EC] [bigint] NULL,
	[WH16_EC] [bigint] NULL,
	[WH17_EC] [bigint] NULL,
	[WH18_EC] [bigint] NULL,
	[WH19_EC] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMsgInHst_Primary]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst_Primary](
	[MessageInID] [uniqueidentifier] NULL,
	[OriginDateTime] [datetime] NULL,
	[BoxID] [varchar](15) NULL,
	[CR6] [decimal](18, 1) NULL,
	[CY6] [decimal](18, 1) NULL,
	[CB6] [decimal](18, 1) NULL,
	[CR6_R] [bit] NULL,
	[WH6] [float] NULL,
	[PF6] [decimal](18, 2) NULL,
	[PO6] [decimal](18, 1) NULL,
	[P6] [float] NULL,
	[P6_R] [bit] NULL,
	[CR7] [decimal](18, 1) NULL,
	[CY7] [decimal](18, 1) NULL,
	[CB7] [decimal](18, 1) NULL,
	[CR7_R] [bit] NULL,
	[WH7] [float] NULL,
	[PF7] [decimal](18, 2) NULL,
	[PO7] [decimal](18, 1) NULL,
	[CR8] [decimal](18, 1) NULL,
	[CY8] [decimal](18, 1) NULL,
	[CB8] [decimal](18, 1) NULL,
	[CR8_R] [bit] NULL,
	[WH8] [float] NULL,
	[PF8] [decimal](18, 2) NULL,
	[PO8] [decimal](18, 1) NULL,
	[CR9] [decimal](18, 1) NULL,
	[CY9] [decimal](18, 1) NULL,
	[CB9] [decimal](18, 1) NULL,
	[CR9_R] [bit] NULL,
	[WH9] [float] NULL,
	[PF9] [decimal](18, 2) NULL,
	[PO9] [decimal](18, 1) NULL,
	[P7] [float] NULL,
	[P7_R] [bit] NULL,
	[CR10] [decimal](18, 1) NULL,
	[CY10] [decimal](18, 1) NULL,
	[CB10] [decimal](18, 1) NULL,
	[CR10_R] [bit] NULL,
	[WH10] [float] NULL,
	[PF10] [decimal](18, 2) NULL,
	[PO10] [decimal](18, 1) NULL,
	[CR11] [decimal](18, 1) NULL,
	[CY11] [decimal](18, 1) NULL,
	[CB11] [decimal](18, 1) NULL,
	[CR11_R] [bit] NULL,
	[WH11] [float] NULL,
	[PF11] [decimal](18, 2) NULL,
	[PO11] [decimal](18, 1) NULL,
	[CY6_R] [bit] NULL,
	[CB6_R] [bit] NULL,
	[CY7_R] [bit] NULL,
	[CB7_R] [bit] NULL,
	[CY8_R] [bit] NULL,
	[CB8_R] [bit] NULL,
	[CY9_R] [bit] NULL,
	[CB9_R] [bit] NULL,
	[CY10_R] [bit] NULL,
	[CB10_R] [bit] NULL,
	[CY11_R] [bit] NULL,
	[CB11_R] [bit] NULL,
	[WH6_EC] [bigint] NULL,
	[WH7_EC] [bigint] NULL,
	[WH8_EC] [bigint] NULL,
	[WH9_EC] [bigint] NULL,
	[WH10_EC] [bigint] NULL,
	[WH11_EC] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMsgInHst_Secondary]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst_Secondary](
	[MessageInID] [uniqueidentifier] NULL,
	[OriginDateTime] [datetime] NULL,
	[BoxID] [varchar](15) NULL,
	[CR3] [decimal](18, 1) NULL,
	[CY3] [decimal](18, 1) NULL,
	[CB3] [decimal](18, 1) NULL,
	[CR3_R] [bit] NULL,
	[WH3] [float] NULL,
	[PF3] [decimal](18, 2) NULL,
	[PO3] [decimal](18, 1) NULL,
	[P5] [float] NULL,
	[P5_R] [bit] NULL,
	[CR4] [decimal](18, 1) NULL,
	[CY4] [decimal](18, 1) NULL,
	[CB4] [decimal](18, 1) NULL,
	[CR4_R] [bit] NULL,
	[WH4] [float] NULL,
	[PF4] [decimal](18, 2) NULL,
	[PO4] [decimal](18, 1) NULL,
	[CR5] [decimal](18, 1) NULL,
	[CY5] [decimal](18, 1) NULL,
	[CB5] [decimal](18, 1) NULL,
	[CR5_R] [bit] NULL,
	[WH5] [float] NULL,
	[PF5] [decimal](18, 2) NULL,
	[PO5] [decimal](18, 1) NULL,
	[CY3_R] [bit] NULL,
	[CB3_R] [bit] NULL,
	[CY4_R] [bit] NULL,
	[CB4_R] [bit] NULL,
	[CY5_R] [bit] NULL,
	[CB5_R] [bit] NULL,
	[WH3_EC] [bigint] NULL,
	[WH4_EC] [bigint] NULL,
	[WH5_EC] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMsgInHst_Techno]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst_Techno](
	[MessageInID] [uniqueidentifier] NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[OriginDateTime] [datetime] NOT NULL,
	[DateTimeReceived] [datetime] NOT NULL,
	[BoxMsgInTypeId] [tinyint] NULL,
	[CommInfo1] [varchar](15) NULL,
	[CommInfo2] [int] NULL,
	[ValidGps] [smallint] NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[Speed] [tinyint] NULL,
	[Heading] [smallint] NULL,
	[CustomProp] [varchar](2000) NULL,
	[StreetAddress] [varchar](250) NULL,
	[SequenceNum] [bigint] NULL,
	[IsArmed] [bit] NULL,
	[IsProcessed] [bit] NULL,
	[IsArchived] [bit] NULL,
	[ControllerID] [bigint] NULL,
	[Alarm] [bit] NULL,
	[Batt_Volt] [decimal](18, 2) NULL,
	[Batt_Current] [bigint] NULL,
	[Batt_LstRreplacement] [varchar](500) NULL,
	[Chrg_Alternator] [decimal](18, 2) NULL,
	[Coolant_Temp] [smallint] NULL,
	[EngineSpeed] [int] NULL,
	[Engine_RunTime] [bigint] NULL,
	[FuelLevel] [smallint] NULL,
	[Tot_Watts] [float] NULL,
	[Tot_VA] [float] NULL,
	[Tot_VAr] [float] NULL,
	[Gen_KWh] [float] NULL,
	[Gen_KVAh] [float] NULL,
	[Gen_KVArh] [float] NULL,
	[Gen_Freq] [float] NULL,
	[Gen_AvgPF] [float] NULL,
	[Gen_L1_PF] [float] NULL,
	[Gen_L1_VAr] [float] NULL,
	[Gen_L1_VA] [float] NULL,
	[Gen_L1_Watts] [float] NULL,
	[Gen_L1_Current] [float] NULL,
	[Gen_L2_PF] [float] NULL,
	[Gen_L2_VAr] [float] NULL,
	[Gen_L2_VA] [float] NULL,
	[Gen_L2_Watts] [float] NULL,
	[Gen_L2_Current] [float] NULL,
	[Gen_L3_PF] [smallint] NULL,
	[Gen_L3_VAr] [float] NULL,
	[Gen_L3_VA] [float] NULL,
	[Gen_L3_Watts] [float] NULL,
	[Gen_L3_Current] [float] NULL,
	[Gen_LNVolt] [float] NULL,
	[Gen_LLVolt] [float] NULL,
	[NumofStarts] [int] NULL,
	[Oil_Temp] [smallint] NULL,
	[Oil_Pressure] [int] NULL,
	[GateWayID] [bigint] NULL,
	[ComMode] [nvarchar](50) NULL,
	[Digital_IP] [varchar](50) NULL,
	[Digital_OP] [varchar](50) NULL,
	[GEN_L1_N_VOLT] [float] NULL,
	[GEN_L2_N_VOLT] [float] NULL,
	[GEN_L3_N_VOLT] [float] NULL,
	[GEN_L1_L2_VOLT] [float] NULL,
	[GEN_L2_L3_VOLT] [float] NULL,
	[GEN_L1_L3_VOLT] [float] NULL,
	[GENCURRENT_L1] [float] NULL,
	[GENCURRENT_L2] [float] NULL,
	[GENCURRENT_L3] [float] NULL,
	[BatteryCharger_OP_Cur] [float] NULL,
	[Controller_Mode] [varchar](50) NULL,
	[Supervisor_State] [varchar](50) NULL,
	[Gen_Rating] [varchar](50) NULL,
 CONSTRAINT [PK_rvlfMsgInHst_Techno] PRIMARY KEY CLUSTERED 
(
	[MessageInID] 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].[rvlfMsgInHst_Techno_355]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst_Techno_355](
	[MessageInID] [uniqueidentifier] NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[OriginDateTime] [datetime] NOT NULL,
	[DateTimeReceived] [datetime] NOT NULL,
	[BoxMsgInTypeId] [tinyint] NULL,
	[CommInfo1] [varchar](15) NULL,
	[CommInfo2] [int] NULL,
	[ValidGps] [smallint] NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[Speed] [tinyint] NULL,
	[Heading] [smallint] NULL,
	[CustomProp] [varchar](2000) NULL,
	[StreetAddress] [varchar](250) NULL,
	[SequenceNum] [bigint] NULL,
	[IsArmed] [bit] NULL,
	[IsProcessed] [bit] NULL,
	[IsArchived] [bit] NULL,
	[ControllerID] [varchar](50) NULL,
	[Alarm] [bit] NULL,
	[S1_Tot_Watts] [float] NULL,
	[S1_Tot_VA] [float] NULL,
	[S1_Tot_VAr] [float] NULL,
	[S1_KWh] [float] NULL,
	[S1_KVAh] [float] NULL,
	[S1_KVArh] [float] NULL,
	[S1_Freq] [float] NULL,
	[S1_AvgPF] [float] NULL,
	[S1_L1_PF] [float] NULL,
	[S1_L1_VAr] [float] NULL,
	[S1_L1_VA] [float] NULL,
	[S1_L1_Watts] [float] NULL,
	[S1_L1_Current] [float] NULL,
	[S1_L2_PF] [float] NULL,
	[S1_L2_VAr] [float] NULL,
	[S1_L2_VA] [float] NULL,
	[S1_L2_Watts] [float] NULL,
	[S1_L2_Current] [float] NULL,
	[S1_L3_PF] [float] NULL,
	[S1_L3_VAr] [float] NULL,
	[S1_L3_VA] [float] NULL,
	[S1_L3_Watts] [float] NULL,
	[S1_L3_Current] [float] NULL,
	[S2_Tot_Watts] [float] NULL,
	[S2_Tot_VA] [float] NULL,
	[S2_Tot_VAr] [float] NULL,
	[S2_KWh] [float] NULL,
	[S2_KVAh] [float] NULL,
	[S2_KVArh] [float] NULL,
	[S2_Freq] [float] NULL,
	[S2_AvgPF] [float] NULL,
	[S2_L1_PF] [float] NULL,
	[S2_L1_VAr] [float] NULL,
	[S2_L1_VA] [float] NULL,
	[S2_L1_Watts] [float] NULL,
	[S2_L1_Current] [float] NULL,
	[S2_L2_PF] [float] NULL,
	[S2_L2_VAr] [float] NULL,
	[S2_L2_VA] [float] NULL,
	[S2_L2_Watts] [float] NULL,
	[S2_L2_Current] [float] NULL,
	[S2_L3_PF] [float] NULL,
	[S2_L3_VAr] [float] NULL,
	[S2_L3_VA] [float] NULL,
	[S2_L3_Watts] [float] NULL,
	[S2_L3_Current] [float] NULL,
	[Main_Gen_LNVolt] [float] NULL,
	[Gen_LLVolt] [float] NULL,
	[GateWayID] [bigint] NULL,
	[ComMode] [nvarchar](50) NULL,
	[Digital_IP] [varchar](50) NULL,
	[Digital_OP] [varchar](50) NULL,
	[S1_L1_N_Voltage] [float] NULL,
	[S1_L2_N_Voltage] [float] NULL,
	[S1_L3_N_Voltage] [float] NULL,
	[S1_L1_L2_Voltage] [float] NULL,
	[S1_L2_L3_Voltage] [float] NULL,
	[S1_L3_L1_Voltage] [float] NULL,
	[S2_L1_N_Voltage] [float] NULL,
	[S2_L2_N_Voltage] [float] NULL,
	[S2_L3_N_Voltage] [float] NULL,
	[S2_L1_L2_Voltage] [float] NULL,
	[S2_L2_L3_Voltage] [float] NULL,
	[S2_L3_L1_Voltage] [float] NULL,
	[S1_LN_Volt] [float] NULL,
	[S1_LL_Volt] [float] NULL,
	[S2_LN_Volt] [float] NULL,
	[S2_LL_Volt] [float] NULL,
 CONSTRAINT [PK_rvlfMsgInHst_Techno_355] PRIMARY KEY CLUSTERED 
(
	[MessageInID] 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].[rvlfMsgInHst_Technobkp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHst_Technobkp](
	[MessageInID] [uniqueidentifier] NOT NULL,
	[BoxId] [varchar](15) NOT NULL,
	[OriginDateTime] [datetime] NOT NULL,
	[DateTimeReceived] [datetime] NOT NULL,
	[BoxMsgInTypeId] [tinyint] NULL,
	[CommInfo1] [varchar](15) NULL,
	[CommInfo2] [int] NULL,
	[ValidGps] [smallint] NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[Speed] [tinyint] NULL,
	[Heading] [smallint] NULL,
	[CustomProp] [varchar](2000) NULL,
	[StreetAddress] [varchar](250) NULL,
	[SequenceNum] [bigint] NULL,
	[IsArmed] [bit] NULL,
	[IsProcessed] [bit] NULL,
	[IsArchived] [bit] NULL,
	[ControllerID] [bigint] NULL,
	[Alarm] [bit] NULL,
	[Batt_Volt] [decimal](18, 2) NULL,
	[Batt_Current] [bigint] NULL,
	[Batt_LstRreplacement] [varchar](500) NULL,
	[Chrg_Alternator] [decimal](18, 2) NULL,
	[Coolant_Temp] [smallint] NULL,
	[EngineSpeed] [int] NULL,
	[Engine_RunTime] [bigint] NULL,
	[FuelLevel] [smallint] NULL,
	[Tot_Watts] [float] NULL,
	[Tot_VA] [float] NULL,
	[Tot_VAr] [float] NULL,
	[Gen_KWh] [float] NULL,
	[Gen_KVAh] [float] NULL,
	[Gen_KVArh] [float] NULL,
	[Gen_Freq] [float] NULL,
	[Gen_AvgPF] [float] NULL,
	[Gen_L1_PF] [float] NULL,
	[Gen_L1_VAr] [float] NULL,
	[Gen_L1_VA] [float] NULL,
	[Gen_L1_Watts] [float] NULL,
	[Gen_L1_Current] [float] NULL,
	[Gen_L2_PF] [float] NULL,
	[Gen_L2_VAr] [float] NULL,
	[Gen_L2_VA] [float] NULL,
	[Gen_L2_Watts] [float] NULL,
	[Gen_L2_Current] [float] NULL,
	[Gen_L3_PF] [smallint] NULL,
	[Gen_L3_VAr] [float] NULL,
	[Gen_L3_VA] [float] NULL,
	[Gen_L3_Watts] [float] NULL,
	[Gen_L3_Current] [float] NULL,
	[Gen_LNVolt] [float] NULL,
	[Gen_LLVolt] [float] NULL,
	[NumofStarts] [int] NULL,
	[Oil_Temp] [smallint] NULL,
	[Oil_Pressure] [int] NULL,
	[GateWayID] [bigint] NULL,
	[ComMode] [nvarchar](50) NULL,
	[Digital_IP] [varchar](50) NULL,
	[Digital_OP] [varchar](50) NULL,
	[GEN_L1_N_VOLT] [float] NULL,
	[GEN_L2_N_VOLT] [float] NULL,
	[GEN_L3_N_VOLT] [float] NULL,
	[GEN_L1_L2_VOLT] [float] NULL,
	[GEN_L2_L3_VOLT] [float] NULL,
	[GEN_L1_L3_VOLT] [float] NULL,
	[GENCURRENT_L1] [float] NULL,
	[GENCURRENT_L2] [float] NULL,
	[GENCURRENT_L3] [float] NULL,
	[BatteryCharger_OP_Cur] [float] NULL,
	[Controller_Mode] [varchar](50) NULL,
	[Supervisor_State] [varchar](50) NULL,
	[Gen_Rating] [varchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfMsgInHstParam_PIII]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHstParam_PIII](
	[RefMsgInID] [uniqueidentifier] NOT NULL,
	[Messageinid] [uniqueidentifier] NULL,
	[OriginDateTime] [datetime] NULL,
	[BoxId] [bigint] NULL,
	[controllerID] [tinyint] NULL,
	[RefID] [int] NULL,
	[CmdId] [tinyint] NULL,
	[Seconday_Current_Limit(IDC)] [varchar](6) NULL,
	[Secondary_Voltage] [varchar](6) NULL,
	[Spark_Rate] [varchar](6) NULL,
	[Operating_Charge_Ratio] [varchar](6) NULL,
	[Optinal_Input_Power] [varchar](6) NULL,
	[Corona_Power] [varchar](6) NULL,
	[VDC_peak] [varchar](6) NULL,
	[VDC_Through] [varchar](6) NULL,
	[IAC_PRI] [varchar](6) NULL,
	[Operating_IDC_Limit] [varchar](6) NULL,
	[Mains_Frequency] [varchar](6) NULL,
	[Total_Accumulated_Spark] [varchar](6) NULL,
	[Total_Operating_Time] [varchar](6) NULL,
	[Operating_Corona_Energy] [varchar](6) NULL,
	[Input_Energy] [varchar](6) NULL,
	[Secondary_current_Limit] [varchar](6) NULL,
	[Sec_Current_Drop_AfterSpark] [varchar](6) NULL,
	[T_Recovery_cyc] [varchar](6) NULL,
	[T_Fast_Ramp_cyc] [varchar](6) NULL,
	[Charge_Ratio] [varchar](6) NULL,
	[Recharge_HW] [varchar](6) NULL,
	[BC_IDC_Min] [varchar](6) NULL,
	[RAP_IDC_Limit] [varchar](6) NULL,
	[BC_CR_Maximum] [varchar](6) NULL,
	[Load_Status1_IDC_Limit] [varchar](6) NULL,
	[LS_1_V_Limit] [varchar](6) NULL,
	[LS_1_IDC_Setbk] [varchar](6) NULL,
	[RAP_TM1_Pause] [varchar](6) NULL,
	[RAP_TM1_Run] [varchar](6) NULL,
	[RAP_TM2_Pause] [varchar](6) NULL,
	[RAP_TM2_Run] [varchar](6) NULL,
	[RAP_TM3_Pause] [varchar](6) NULL,
	[RAP_TM3_Run] [varchar](6) NULL,
	[RAP_MOT1_ON_OFF] [bit] NULL,
	[RAP_MOT2_ON_OFF] [bit] NULL,
	[RAP_MOT3_ON_OFF] [bit] NULL,
	[RAP_CONT_ON_OFF] [bit] NULL,
	[Back_Corona_ON_OFF] [bit] NULL,
	[HT_ON_OFF] [bit] NULL,
	[Sec_Curr_drop_after_dbleSpark] [varchar](6) NULL,
	[MAX_Spark_Rate] [varchar](6) NULL,
	[TQuench_CYC] [varchar](6) NULL,
	[Back_Corona_MEAS] [varchar](6) NULL,
	[BC_IDC_Step] [varchar](6) NULL,
	[BC_Hold_Time] [varchar](6) NULL,
	[LS-1_CR] [varchar](6) NULL,
	[RECHARGE_FIRING] [varchar](6) NULL,
 CONSTRAINT [PK_rvlfMsgInHstParam_PIII] PRIMARY KEY CLUSTERED 
(
	[RefMsgInID] 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].[rvlfMsgInHstParam_PR]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInHstParam_PR](
	[RefMsgInID] [uniqueidentifier] NOT NULL,
	[Messageinid] [uniqueidentifier] NULL,
	[OriginDateTime] [datetime] NULL,
	[BoxId] [bigint] NULL,
	[controllerID] [tinyint] NULL,
	[RefID] [int] NULL,
	[CmdId] [tinyint] NULL,
	[Primary_Voltage_Value] [varchar](6) NULL,
	[Primary_Current_Value] [varchar](6) NULL,
	[Primary_Power_Value] [varchar](6) NULL,
	[Secondary_Voltage_Value] [varchar](6) NULL,
	[Secondary_Current_Value] [varchar](6) NULL,
	[Spark_Per_Minute] [varchar](6) NULL,
	[Arcs_Per_Minute] [varchar](6) NULL,
	[Under_Voltage_TripMode] [varchar](6) NULL,
	[Program_no_of_Rapper] [varchar](6) NULL,
	[Primary_Voltage_limit] [varchar](6) NULL,
	[Primary_Current_Limit] [varchar](6) NULL,
	[Secondary_Voltage_Limit] [varchar](6) NULL,
	[Secondary_Current_Limit] [varchar](6) NULL,
	[Under_Voltage_Set_Point] [varchar](6) NULL,
	[Secondary_Current_Peak_Limit] [varchar](6) NULL,
	[Ramp] [varchar](6) NULL,
	[Pedestal] [varchar](6) NULL,
	[Quench_Time] [varchar](6) NULL,
	[Spark_Rate] [varchar](6) NULL,
	[IE_Charge_Halfcycle] [varchar](6) NULL,
	[IE_Discharge_Cycle] [varchar](6) NULL,
	[IE_Background_Power] [varchar](6) NULL,
	[IE_Optimise_Timer] [varchar](6) NULL,
	[Power_Down_Rapping] [varchar](6) NULL,
	[Rapper1_Interval_Timer] [varchar](6) NULL,
	[Rapper1_On_timer] [varchar](6) NULL,
	[Rapper2_Interval_timer] [varchar](6) NULL,
	[Rapper2_On_Timer] [varchar](6) NULL,
	[Rapper3_Interval_Timer] [varchar](6) NULL,
	[Rapper3_On_Timer] [varchar](6) NULL,
	[Rapper4_Interval_Timer] [varchar](6) NULL,
	[Rapper4_On_Timer] [varchar](6) NULL,
	[Phase_Back] [varchar](6) NULL,
	[DCSIM] [tinyint] NULL,
	[T1] [decimal](6, 2) NULL,
	[T2] [decimal](6, 2) NULL,
	[T3] [decimal](6, 2) NULL,
	[P1] [decimal](6, 2) NULL,
	[P2] [decimal](6, 2) NULL,
	[P3] [decimal](6, 2) NULL,
	[P4] [decimal](6, 2) NULL,
	[P5] [decimal](6, 2) NULL,
	[VR] [decimal](6, 2) NULL,
	[VY] [decimal](6, 2) NULL,
	[VB] [decimal](6, 2) NULL,
	[CR] [decimal](6, 2) NULL,
	[CY] [decimal](6, 2) NULL,
	[CB] [decimal](6, 2) NULL,
	[WH] [decimal](6, 2) NULL,
	[PF] [decimal](6, 2) NULL,
	[PO] [decimal](6, 2) NULL,
 CONSTRAINT [PK_rvlfMsgInHstParam_PR] PRIMARY KEY CLUSTERED 
(
	[RefMsgInID] 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].[rvlfMsgInSMSTemplates]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInSMSTemplates](
	[BoxMsgInTypeID] [tinyint] NOT NULL,
	[SMSTemplate] [varchar](8000) NOT NULL,
	[OrganizationID] [bigint] NULL,
 CONSTRAINT [PK_rvlfMsgInSMSTemplates] PRIMARY KEY CLUSTERED 
(
	[BoxMsgInTypeID] 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].[rvlfMsgInTemplates]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgInTemplates](
	[BoxMsgInTemplateID] [bigint] NOT NULL,
	[BoxMsgInTypeID] [tinyint] NOT NULL,
	[MessageTemplate] [varchar](8000) NOT NULL,
	[OrganizationID] [bigint] NULL,
 CONSTRAINT [PK_rvlfMsgInTemplates] PRIMARY KEY CLUSTERED 
(
	[BoxMsgInTemplateID] 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].[rvlfMsgOutHst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfMsgOutHst](
	[BoxId] [varchar](15) NOT NULL,
	[SentDateTime] [datetime] NOT NULL,
	[UserId] [bigint] NOT NULL,
	[Priority] [tinyint] NOT NULL,
	[ServiceId] [tinyint] NOT NULL,
	[BoxCmdOutTypeId] [tinyint] NOT NULL,
	[BoxProtocolTypeId] [tinyint] NOT NULL,
	[CommInfo1] [varchar](15) NOT NULL,
	[CommInfo2] [int] NOT NULL,
	[CustomProp] [varchar](max) NULL,
	[SequenceNum] [bigint] NOT NULL,
	[Acknowledged] [tinyint] NULL,
	[MessageInID] [uniqueidentifier] NULL,
	[Scheduled] [bit] NULL,
	[ScheduleId] [bigint] NULL,
	[isCommentSentStatus] [int] NULL,
	[isCommentSentUpdateDate] [datetime] NULL,
	[TriggerCount] [bigint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfNavTeqRequest]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNavTeqRequest](
	[RequestDate] [date] NOT NULL,
	[RequestCount] [bigint] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfNews]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNews](
	[NewsId] [bigint] IDENTITY(76,1) NOT NULL,
	[NewsName] [nvarchar](50) NULL,
	[NewsDescription] [nvarchar](2500) NULL,
	[Type] [nvarchar](50) NULL,
	[NavigateURL] [nvarchar](200) NULL,
	[PublishDate] [datetime] NULL,
	[ExpiryDate] [datetime] NULL,
	[OrganizationId] [bigint] NULL,
	[TipsShownDate] [datetime] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[ImageName] [nvarchar](250) NULL,
	[AuthorName] [nvarchar](250) NULL,
	[IsNotificationSent] [bit] NULL,
	[ReleasePDFLink] [varchar](1000) NULL,
	[IsPushNotification] [bit] NULL,
 CONSTRAINT [PK_rvlfNews] PRIMARY KEY CLUSTERED 
(
	[NewsId] 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].[rvlfNotificationList]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationList](
	[UserID] [bigint] NOT NULL,
	[NotificationType] [tinyint] NOT NULL,
	[TypeID] [bigint] NOT NULL,
	[Email] [bit] NULL,
	[SMS] [bit] NULL,
	[CreateDateTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfNotificationListTypes]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationListTypes](
	[NotificationTypeId] [int] NULL,
	[NotificationTypeName] [varchar](500) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfNotificationLog]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationLog](
	[MessageInID] [uniqueidentifier] NOT NULL,
	[OriginDateTime] [datetime] NULL,
	[DateTimeReceived] [datetime] NULL,
	[CanSendEmail] [bit] NOT NULL,
	[IsMailSent] [int] NULL,
	[CanSendSMS] [bit] NOT NULL,
	[IsSMSSent] [int] NULL,
	[UserID] [bigint] NULL,
	[OrganizationID] [bigint] NULL,
	[UserName] [varchar](50) NOT NULL,
	[Email] [varchar](200) NULL,
	[MobileNo] [varchar](15) NULL,
	[StreetAddress] [varchar](400) NULL,
	[Speed] [varchar](25) NULL,
	[BoxId] [varchar](15) NOT NULL,
	[BoxMsgInTypeName] [varchar](50) NOT NULL,
	[VehicleID] [bigint] NOT NULL,
	[VehicleDescription] [varchar](20) NOT NULL,
	[VehicleName] [varchar](20) NULL,
	[FleetID] [bigint] NULL,
	[FleetName] [varchar](100) NULL,
	[LicensePlate] [varchar](20) NULL,
	[Subjectsufix] [varchar](25) NOT NULL,
	[Duration] [varchar](50) NULL,
	[MessageDetails] [varchar](max) NULL,
	[IsEmailError] [bit] NULL,
	[NoOfEmailTries] [tinyint] NULL,
	[EmailErrorMessage] [varchar](600) NULL,
	[IsSMSError] [bit] NULL,
	[NoOfSMSTries] [tinyint] NULL,
	[SMSError] [varchar](600) NULL,
	[EmailProcessedDate] [datetime] NULL,
	[SMSProcessedDate] [datetime] NULL,
	[SMSScheduleID] [int] NULL,
	[SMSBasedQueryID] [bigint] IDENTITY(93529,1) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfNotificationLog_SendSMSTest]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationLog_SendSMSTest](
	[MessageInID] [uniqueidentifier] NULL,
	[OriginDateTime] [datetime] NULL,
	[DateTimeReceived] [datetime] NULL,
	[CanSendEmail] [bit] NOT NULL,
	[IsMailSent] [int] NULL,
	[CanSendSMS] [bit] NOT NULL,
	[IsSMSSent] [int] NULL,
	[UserID] [bigint] NULL,
	[OrganizationID] [bigint] NULL,
	[UserName] [varchar](50) NULL,
	[Email] [varchar](200) NULL,
	[MobileNo] [varchar](15) NULL,
	[StreetAddress] [varchar](400) NULL,
	[Speed] [varchar](25) NULL,
	[BoxId] [int] NULL,
	[BoxMsgInTypeName] [varchar](50) NULL,
	[VehicleID] [bigint] NULL,
	[VehicleDescription] [varchar](20) NULL,
	[VehicleName] [varchar](20) NULL,
	[FleetID] [bigint] NULL,
	[FleetName] [varchar](100) NULL,
	[LicensePlate] [varchar](20) NULL,
	[Subjectsufix] [varchar](25) NULL,
	[Duration] [varchar](50) NULL,
	[MessageDetails] [varchar](max) NULL,
	[IsEmailError] [bit] NULL,
	[NoOfEmailTries] [tinyint] NULL,
	[EmailErrorMessage] [varchar](600) NULL,
	[IsSMSError] [bit] NULL,
	[NoOfSMSTries] [tinyint] NULL,
	[SMSError] [varchar](600) NULL,
	[EmailProcessedDate] [datetime] NULL,
	[SMSProcessedDate] [datetime] NULL,
	[SMSScheduleID] [int] NULL,
	[SMSBasedQueryID] [bigint] IDENTITY(3179,1) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfNotificationRead]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationRead](
	[MessageInId] [uniqueidentifier] NOT NULL,
	[UserId] [int] NOT NULL,
	[ReadDate] [datetime] NULL,
 CONSTRAINT [pk_rvlfNotificationRead_MessageInId_UserId] PRIMARY KEY CLUSTERED 
(
	[MessageInId] ASC,
	[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
/****** Object:  Table [dbo].[rvlfNotifications]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotifications](
	[NotificationID] [bigint] IDENTITY(1,1) NOT NULL,
	[NotificationName] [varchar](50) NULL,
 CONSTRAINT [PK_rvlfNotifications] PRIMARY KEY CLUSTERED 
(
	[NotificationID] 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].[rvlfNotificationToParents]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationToParents](
	[NotificationId] [bigint] IDENTITY(18,1) NOT NULL,
	[NotificationName] [nvarchar](50) NULL,
	[Description] [nvarchar](2500) NULL,
	[ExpiryDate] [datetime] NULL,
	[NotificationType] [tinyint] NULL,
	[OrganizationId] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[PublishedDate] [datetime] NULL,
	[IsNotificationSent] [bit] NULL,
 CONSTRAINT [PK_rvlfNotificationToParents] PRIMARY KEY CLUSTERED 
(
	[NotificationId] 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].[rvlfNotificationToParentsLog]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfNotificationToParentsLog](
	[NotificationLogId] [bigint] IDENTITY(49,1) NOT NULL,
	[NotificationId] [bigint] NOT NULL,
	[StudentId] [bigint] NOT NULL,
 CONSTRAINT [PK_rvlfNotificationToParentsLog] PRIMARY KEY CLUSTERED 
(
	[NotificationLogId] 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].[rvlfOfficeAddress]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOfficeAddress](
	[AddressId] [bigint] IDENTITY(6,1) NOT NULL,
	[LocationId] [bigint] NULL,
	[AddressName] [varchar](200) NULL,
	[Latitude] [numeric](10, 6) NULL,
	[Longitude] [numeric](10, 6) NULL,
	[PasswordChange] [tinyint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfOfficeLocation]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOfficeLocation](
	[LocationId] [bigint] IDENTITY(5,1) NOT NULL,
	[LocationName] [varchar](200) NULL,
	[MorningPeakFromTime] [time](7) NULL,
	[MorningPeakToTime] [time](7) NULL,
	[EveningPeakFromTime] [time](7) NULL,
	[EveningPeakToTime] [time](7) NULL,
	[PeakTimeMinutesPerKM] [numeric](5, 2) NULL,
	[NonPeakTimeMinutesPerKM] [numeric](5, 2) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfOperationType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOperationType](
	[OperationTypeId] [bigint] IDENTITY(446,1) NOT NULL,
	[ModuleID] [bigint] NULL,
	[OperationTypeName] [varchar](100) NOT NULL,
	[OperationDesc] [varchar](250) NOT NULL,
	[IsVisibleToNonAnglerAdmin] [bit] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[OperationTypeName_Ar] [nvarchar](100) NULL,
 CONSTRAINT [PK_rvlfOperationType] PRIMARY KEY CLUSTERED 
(
	[OperationTypeId] 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].[rvlfOrganization]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrganization](
	[OrganizationId] [bigint] IDENTITY(132,1) NOT NULL,
	[OrganizationName] [varchar](200) NOT NULL,
	[OrganizationDisplayName] [varchar](20) NULL,
	[OrganizationCode] [varchar](5) NOT NULL,
	[VATNumber] [varchar](20) NULL,
	[Address] [varchar](200) NOT NULL,
	[CityName] [varchar](75) NULL,
	[StateName] [varchar](75) NULL,
	[CountryId] [bigint] NOT NULL,
	[PhoneNo] [varchar](20) NULL,
	[MobileNo] [varchar](15) NULL,
	[WebsiteURL] [varchar](150) NULL,
	[OrganizationEmailID] [varchar](200) NOT NULL,
	[Description] [varchar](250) NULL,
	[LogoName] [varchar](150) NULL,
	[MapGroupId] [smallint] NOT NULL,
	[ContactPerson] [varchar](100) NOT NULL,
	[Designation] [varchar](100) NULL,
	[ContactEmailID] [varchar](200) NULL,
	[ContactPerson2] [varchar](100) NULL,
	[ContactEmailID2] [varchar](200) NULL,
	[ContactPerson3] [varchar](100) NULL,
	[ContactEmailID3] [varchar](200) NULL,
	[ContactPerson4] [varchar](100) NULL,
	[ContactEmailID4] [varchar](200) NULL,
	[ContactPerson5] [varchar](100) NULL,
	[ContactEmailID5] [varchar](200) NULL,
	[ContactPerson6] [varchar](100) NULL,
	[ContactEmailID6] [varchar](200) NULL,
	[ContactPhoneNo] [varchar](20) NULL,
	[ExpiresOn] [datetime] NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[TotalNoofEmailTries] [tinyint] NULL,
	[TotalNoofSMSTries] [tinyint] NULL,
	[NoOfFleet] [int] NULL,
	[NoOfVehicles] [int] NULL,
	[NoOfUsers] [int] NULL,
	[EnforcePasswordPolicy] [bit] NULL,
	[PwdMinCharacters] [tinyint] NULL,
	[CngOnFirstLogin] [bit] NULL,
	[LockUser] [bit] NULL,
	[LockUserTries] [int] NULL,
	[LockIP] [bit] NULL,
	[IPLockDuration] [tinyint] NULL,
	[IPTries] [int] NULL,
	[OrgDistance] [tinyint] NULL,
	[OrgMapProvider] [tinyint] NULL,
	[MaxSMSLimit] [tinyint] NULL,
	[IsVehicleStatusNotification] [bit] NULL,
	[NotificationEffectiveFrom] [datetime] NULL,
	[OrgDistIncPercentValue] [decimal](6, 2) NULL,
	[CurrencyTypeId] [tinyint] NULL,
	[OrgLang] [varchar](50) NULL,
	[SMSQryCount] [int] NULL,
	[OrgLangSettings] [varchar](20) NULL,
	[NoOfLandmarks] [int] NULL,
	[NoOfGeozones] [int] NULL,
	[NoOfUSerGroups] [int] NULL,
	[EnableApp] [bit] NULL,
	[AppInsDate] [datetime] NULL,
	[AppExpDays] [int] NULL,
	[AppReminder1] [int] NULL,
	[OrgLatitude] [decimal](10, 6) NULL,
	[OrgLongitude] [decimal](10, 6) NULL,
	[OrgZoomlevel] [int] NULL,
	[SMSReminder] [int] NULL,
	[ISRoadSpeedEnabled] [bit] NULL,
 CONSTRAINT [PK_rvlfOrganization] PRIMARY KEY CLUSTERED 
(
	[OrganizationId] 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].[rvlfOrganizationGeozone]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrganizationGeozone](
	[GeozoneNo] [bigint] IDENTITY(10716,1) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[GeozoneId] [bigint] NOT NULL,
	[GeozoneName] [nvarchar](150) NULL,
	[GeozoneType] [tinyint] NOT NULL,
	[Direction] [tinyint] NOT NULL,
	[SeverityId] [tinyint] NOT NULL,
	[Description] [nvarchar](150) NULL,
	[Notify] [bit] NULL,
	[Email] [varchar](2010) NULL,
	[SMS] [varchar](160) NULL,
	[TimeZone] [int] NOT NULL,
	[DayLightSaving] [int] NULL,
	[Warning] [bit] NULL,
	[Critical] [bit] NULL,
	[AutoAdjustDayLightSaving] [bit] NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[CategoryId] [bigint] NULL,
	[LandmarkID] [bigint] NULL,
	[Radius] [smallint] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [Idx_GeozoneNo]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [Idx_GeozoneNo] ON [dbo].[rvlfOrganizationGeozone]
(
	[GeozoneNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfOrganizationLogoOption]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrganizationLogoOption](
	[AssignmentID] [int] IDENTITY(1,1) NOT NULL,
	[LogoOptionID] [int] NULL,
	[OrganizationID] [bigint] NULL,
 CONSTRAINT [PK_rvlfOrganizationLogoOption] PRIMARY KEY CLUSTERED 
(
	[AssignmentID] 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].[rvlfOrganizationPackage]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrganizationPackage](
	[PackageOrgId] [bigint] IDENTITY(492,1) NOT NULL,
	[PackageId] [bigint] NOT NULL,
	[OrganizationID] [bigint] NOT NULL,
	[PurchasedOn] [datetime] NOT NULL,
	[ExpiresOn] [datetime] NOT NULL,
	[IsActive] [bit] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_rvlfOrganizationPackage] PRIMARY KEY CLUSTERED 
(
	[PackageOrgId] 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].[rvlfOrganizationServiceURL_App]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrganizationServiceURL_App](
	[URLId] [int] NOT NULL,
	[OrgId] [int] NOT NULL,
	[ServiceURL] [varchar](500) NOT NULL,
 CONSTRAINT [PK_rvlfOrganizationServiceURL_App] PRIMARY KEY CLUSTERED 
(
	[URLId] 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].[rvlfOrganizationSolution]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrganizationSolution](
	[OrgSolutionId] [int] IDENTITY(1,1) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[SolutionId] [int] NOT NULL,
 CONSTRAINT [PK_rvlfOrganizationSolution] PRIMARY KEY CLUSTERED 
(
	[OrgSolutionId] 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].[rvlfOrgDepartment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrgDepartment](
	[DepartmentID] [bigint] IDENTITY(2,1) NOT NULL,
	[DepartmentName] [varchar](50) NULL,
 CONSTRAINT [PK_rvlfOrgDepartment] PRIMARY KEY CLUSTERED 
(
	[DepartmentID] 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].[rvlfOrgDivision]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrgDivision](
	[OrgDivisionID] [bigint] IDENTITY(3,1) NOT NULL,
	[OrgDivisionName] [varchar](50) NULL,
 CONSTRAINT [PK_rvlfOrgDivision] PRIMARY KEY CLUSTERED 
(
	[OrgDivisionID] 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].[rvlfOrgIgnoreMsgs]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrgIgnoreMsgs](
	[IgId] [bigint] IDENTITY(5,1) NOT NULL,
	[OrgId] [bigint] NOT NULL,
	[BoxMsgInTypeId] [tinyint] NOT NULL,
	[SensorNo] [tinyint] NULL,
	[Description] [varchar](150) NULL,
 CONSTRAINT [PK_rvlfOrgIgnoreMsgs] PRIMARY KEY CLUSTERED 
(
	[IgId] 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].[rvlfOrgShifts]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOrgShifts](
	[ShiftID] [bigint] IDENTITY(3,1) NOT NULL,
	[ShiftName] [varchar](15) NULL,
	[ShiftInTime] [time](7) NULL,
	[ShiftOutTime] [time](7) NULL,
	[OrganizationID] [bigint] NULL,
 CONSTRAINT [PK_rvlfOrgShifts] PRIMARY KEY CLUSTERED 
(
	[ShiftID] 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].[rvlfOutput]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfOutput](
	[OutputId] [tinyint] NOT NULL,
	[OutputName] [varchar](20) NOT NULL,
	[OutputAction] [varchar](50) NULL,
 CONSTRAINT [PK_rvlfOutput] PRIMARY KEY CLUSTERED 
(
	[OutputId] 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].[rvlfPackage]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfPackage](
	[PackageId] [bigint] IDENTITY(75,1) NOT NULL,
	[PackageName] [varchar](50) NOT NULL,
	[PackageDesc] [varchar](250) NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
 CONSTRAINT [PK_rvlfPackage] PRIMARY KEY CLUSTERED 
(
	[PackageId] 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].[rvlfPackageOperations]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfPackageOperations](
	[PackageId] [bigint] NOT NULL,
	[ModuleID] [bigint] NOT NULL,
	[OperationID] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfParamMst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfParamMst](
	[ParamId] [int] NOT NULL,
	[ParamName] [varchar](100) NOT NULL,
	[ParamDescription] [varchar](50) NULL,
	[VehicleTypeId] [tinyint] NOT NULL,
	[OrganizationId] [int] NULL,
	[MReason] [varchar](1000) NULL,
	[MCorrectiveAction] [varchar](max) NULL,
 CONSTRAINT [PK_adr_ParamMst] PRIMARY KEY CLUSTERED 
(
	[ParamId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfParamRange]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfParamRange](
	[Rid] [bigint] IDENTITY(1,1) NOT NULL,
	[Boxid] [nvarchar](100) NULL,
	[IsActive] [bit] NULL,
	[T1_Min] [decimal](18, 1) NULL,
	[T1_Max] [decimal](18, 1) NULL,
	[T2_Min] [decimal](18, 1) NULL,
	[T2_Max] [decimal](18, 1) NULL,
	[T3_Min] [decimal](18, 1) NULL,
	[T3_Max] [decimal](18, 1) NULL,
	[T4_Min] [decimal](18, 1) NULL,
	[T4_Max] [decimal](18, 1) NULL,
	[T5_Min] [decimal](18, 1) NULL,
	[T5_Max] [decimal](18, 1) NULL,
	[P1_Min] [float] NULL,
	[P1_Max] [float] NULL,
	[P2_Min] [float] NULL,
	[P2_Max] [float] NULL,
	[P3_Min] [float] NULL,
	[P3_Max] [float] NULL,
	[P4_Min] [float] NULL,
	[P4_Max] [float] NULL,
	[P5_Min] [float] NULL,
	[P5_Max] [float] NULL,
	[P6_Min] [float] NULL,
	[P6_Max] [float] NULL,
	[P7_Min] [float] NULL,
	[P7_Max] [float] NULL,
	[P8_Min] [float] NULL,
	[P8_Max] [float] NULL,
	[P9_Min] [float] NULL,
	[P9_Max] [float] NULL,
	[P10_Min] [float] NULL,
	[P10_Max] [float] NULL,
	[P11_Min] [float] NULL,
	[P11_Max] [float] NULL,
	[DPs_Min] [int] NULL,
	[DPs_Max] [int] NULL,
	[DPp_Min] [int] NULL,
	[DPp_Max] [int] NULL,
	[DPp1_Min] [int] NULL,
	[DPp1_Max] [int] NULL,
	[V1_Min] [int] NULL,
	[V1_Max] [int] NULL,
	[V2_Min] [int] NULL,
	[V2_Max] [int] NULL,
	[C1_Min] [decimal](18, 1) NULL,
	[C1_Max] [decimal](18, 1) NULL,
	[RC1] [decimal](18, 1) NULL,
	[C2_Min] [decimal](18, 1) NULL,
	[C2_Max] [decimal](18, 1) NULL,
	[RC2] [decimal](18, 1) NULL,
	[C3_Min] [decimal](18, 1) NULL,
	[C3_Max] [decimal](18, 1) NULL,
	[RC3] [decimal](18, 1) NULL,
	[C4_Min] [decimal](18, 1) NULL,
	[C4_Max] [decimal](18, 1) NULL,
	[RC4] [decimal](18, 1) NULL,
	[C5_Min] [decimal](18, 1) NULL,
	[C5_Max] [decimal](18, 1) NULL,
	[RC5] [decimal](18, 1) NULL,
	[C6_Min] [decimal](18, 1) NULL,
	[C6_Max] [decimal](18, 1) NULL,
	[RC6] [decimal](18, 1) NULL,
	[C7_Min] [decimal](18, 1) NULL,
	[C7_Max] [decimal](18, 1) NULL,
	[RC7] [decimal](18, 1) NULL,
	[C8_Min] [decimal](18, 1) NULL,
	[C8_Max] [decimal](18, 1) NULL,
	[RC8] [decimal](18, 1) NULL,
	[C9_Min] [decimal](18, 1) NULL,
	[C9_Max] [decimal](18, 1) NULL,
	[RC9] [decimal](18, 1) NULL,
	[C10_Min] [decimal](18, 1) NULL,
	[C10_Max] [decimal](18, 1) NULL,
	[RC10] [decimal](18, 1) NULL,
	[C11_Min] [decimal](18, 1) NULL,
	[C11_Max] [decimal](18, 1) NULL,
	[RC11] [decimal](18, 1) NULL,
	[C12_Min] [decimal](18, 1) NULL,
	[C12_Max] [decimal](18, 1) NULL,
	[RC12] [decimal](18, 1) NULL,
	[C13_Min] [decimal](18, 1) NULL,
	[C13_Max] [decimal](18, 1) NULL,
	[RC13] [decimal](18, 1) NULL,
	[C14_Min] [decimal](18, 1) NULL,
	[C14_Max] [decimal](18, 1) NULL,
	[RC14] [decimal](18, 1) NULL,
	[C15_Min] [decimal](18, 1) NULL,
	[C15_Max] [decimal](18, 1) NULL,
	[RC15] [decimal](18, 1) NULL,
	[C16_Min] [decimal](18, 1) NULL,
	[C16_Max] [decimal](18, 1) NULL,
	[RC16] [decimal](18, 1) NULL,
	[C17_Min] [decimal](18, 1) NULL,
	[C17_Max] [decimal](18, 1) NULL,
	[RC17] [decimal](18, 1) NULL,
	[C18_Min] [decimal](18, 1) NULL,
	[C18_Max] [decimal](18, 1) NULL,
	[RC18] [decimal](18, 1) NULL,
	[C19_Min] [decimal](18, 1) NULL,
	[C19_Max] [decimal](18, 1) NULL,
	[RC19] [decimal](18, 1) NULL,
	[CreatedDate] [datetime] NULL,
	[CreatedBy] [bigint] NULL,
	[ModifyDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
 CONSTRAINT [PK_rvlfParamRange] PRIMARY KEY CLUSTERED 
(
	[Rid] 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].[rvlfParentChildFleetRelation]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfParentChildFleetRelation](
	[ParentFleetRelationshipId] [bigint] IDENTITY(343,1) NOT NULL,
	[FleetId] [bigint] NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[UserId] [bigint] NOT NULL,
	[ParentFleetId] [bigint] NOT NULL,
	[AssignedDateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_rvlfParentChildFleetRelation] PRIMARY KEY CLUSTERED 
(
	[ParentFleetRelationshipId] 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].[rvlfParentMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfParentMaster](
	[UserId] [bigint] IDENTITY(16,1) NOT NULL,
	[UserName] [nvarchar](50) NULL,
	[TitleId] [int] NULL,
	[Password] [varchar](100) NULL,
	[Email] [varchar](200) NULL,
	[PhoneNo] [varchar](15) NULL,
	[MobileNo] [varchar](15) NULL,
	[OrganizationId] [int] NOT NULL,
	[DisplayName] [nvarchar](100) NULL,
	[IsLocked] [bit] NULL,
	[LockedDateTime] [datetime] NULL,
	[IsActive] [bit] NULL,
	[IsPwdChanged] [bit] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[IsDelete] [bit] NULL,
	[IsRegisteredUser] [bit] NULL,
	[IsHidden] [bit] NULL,
	[UGUID] [uniqueidentifier] NULL,
	[IsSMSQry] [bit] NULL,
	[LastHour] [int] NULL,
	[IsPushNotfication] [int] NULL,
	[DevRegID] [varchar](500) NULL,
	[DevOS] [char](5) NULL,
	[AllowMobApp] [int] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfPartnerMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfPartnerMaster](
	[AssignmentId] [bigint] IDENTITY(41,1) NOT NULL,
	[PartnerId] [bigint] NULL,
	[OrganizationId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfPrecannedMessages]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfPrecannedMessages](
	[CannedMsgId] [bigint] IDENTITY(394,1) NOT NULL,
	[PrecannedMsgId] [int] NOT NULL,
	[MsgName] [varchar](500) NOT NULL,
	[IsServerMsg] [bit] NOT NULL,
	[OrganizationId] [bigint] NULL,
	[IsGarmin] [bit] NULL,
 CONSTRAINT [PK_rvlfPrecannedMessages] PRIMARY KEY CLUSTERED 
(
	[CannedMsgId] 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].[rvlfRefrigeration]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRefrigeration](
	[RefgId] [int] IDENTITY(1,1) NOT NULL,
	[RefgName] [varchar](50) NOT NULL,
	[RefgMake] [varchar](50) NULL,
	[Year] [char](4) NULL,
	[ModelNo] [varchar](50) NULL,
	[EngineNo] [varchar](50) NULL,
	[CompressorNo] [varchar](50) NULL,
	[DateOfPurchase] [datetime] NULL,
	[PurchaseValue] [varchar](50) NULL,
	[AssessedDate] [datetime] NULL,
	[AssessedValue] [varchar](50) NULL,
	[AvgFuel] [float] NULL,
	[ModeOfPurchase] [varchar](50) NULL,
	[TechDetails] [varchar](150) NULL,
	[CreatedBy] [int] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NOT NULL,
	[IsActive] [bit] NOT NULL,
	[OrganizationId] [bigint] NULL,
 CONSTRAINT [PK_rvlfRefrigeration] PRIMARY KEY CLUSTERED 
(
	[RefgId] 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].[rvlfRefrigeratorAssignmt]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRefrigeratorAssignmt](
	[RefAsgnNo] [bigint] IDENTITY(47,1) NOT NULL,
	[RefgId] [int] NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[AssignDate] [datetime] NULL,
	[UnAssignDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfReleaseTemplate]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfReleaseTemplate](
	[ReleaseTemplateId] [numeric](18, 0) IDENTITY(34,1) NOT NULL,
	[TemplateName] [varchar](200) NOT NULL,
	[Template] [varchar](max) NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[RvlfReportCategoryTypes]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RvlfReportCategoryTypes](
	[CategoryTypesId] [bigint] IDENTITY(1,1) NOT NULL,
	[CategoryTypesName] [varchar](50) NULL,
	[CategoryTypesName_Ar] [nvarchar](100) NULL,
	[CategoryTypesName_Hin] [nvarchar](100) NULL,
 CONSTRAINT [PK_RvlfCategoryTypes] PRIMARY KEY CLUSTERED 
(
	[CategoryTypesId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfReportTypes]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfReportTypes](
	[ReportTypesId] [bigint] NOT NULL,
	[ReportTypesName] [varchar](35) NOT NULL,
	[GuiId] [bigint] NULL,
	[GuiName] [varchar](50) NULL,
	[OperationTypeId] [bigint] NULL,
	[CategoryTypesId] [bigint] NULL,
	[ReportTypesName_Ar] [nvarchar](250) NULL,
	[ReportTypesName_Hin] [nvarchar](250) NULL,
	[RptDurationMints] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [IDX_ReportID]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [IDX_ReportID] ON [dbo].[rvlfReportTypes]
(
	[CategoryTypesId] ASC,
	[ReportTypesId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRFIDMsgTypes]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRFIDMsgTypes](
	[MsgTypeId] [int] NOT NULL,
	[MsgTypeName] [nvarchar](50) NULL,
	[Description] [varchar](500) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRFIDSchoolSMSNotification]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRFIDSchoolSMSNotification](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[StudentID] [varchar](20) NULL,
	[VehicleID] [bigint] NULL,
	[BoxID] [bigint] NULL,
	[GeozoneID] [int] NULL,
	[OrganizationId] [int] NULL,
	[EntryExitTime] [datetime] NULL,
	[RFID] [nvarchar](20) NULL,
	[StudentName] [varchar](50) NULL,
	[ContactNo] [varchar](15) NULL,
	[MessageTemplate] [varchar](200) NULL,
	[MsgType] [int] NULL,
	[IsSMSSent] [bit] NULL,
	[SMSProcessedDateTime] [datetime] NULL,
	[HeadCount] [int] NULL,
 CONSTRAINT [PK_rvlfRFIDSchoolSMSNotification] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfRFIDSchoolSMSNotification_bkp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRFIDSchoolSMSNotification_bkp](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[StudentID] [varchar](20) NULL,
	[VehicleID] [bigint] NULL,
	[BoxID] [bigint] NULL,
	[GeozoneID] [int] NULL,
	[OrganizationId] [int] NULL,
	[EntryExitTime] [datetime] NULL,
	[RFID] [nvarchar](20) NULL,
	[StudentName] [varchar](50) NULL,
	[ContactNo] [varchar](15) NULL,
	[MessageTemplate] [varchar](200) NULL,
	[MsgType] [int] NULL,
	[IsSMSSent] [bit] NULL,
	[SMSProcessedDateTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfROICost]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfROICost](
	[Id] [tinyint] IDENTITY(26,1) NOT NULL,
	[CostName] [varchar](30) NOT NULL,
	[CostDesc] [varchar](150) NULL,
	[CreatedBy] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[CostType] [tinyint] NOT NULL,
	[IsDelete] [bit] NULL,
	[OrgId] [int] NULL,
 CONSTRAINT [PK_rvlfROICost] 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
/****** Object:  Table [dbo].[rvlfRouteAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteAssignment](
	[AssignmentId] [bigint] IDENTITY(25,1) NOT NULL,
	[RouteScheduleId] [bigint] NULL,
	[VehicleId] [bigint] NULL,
	[DriverId] [bigint] NULL,
	[FromDate] [datetime] NULL,
	[ToDate] [datetime] NULL,
 CONSTRAINT [PK_rvlfRouteAssignment] PRIMARY KEY CLUSTERED 
(
	[AssignmentId] 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].[rvlfRouteDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteDetails](
	[RouteDetailsId] [int] IDENTITY(1,1) NOT NULL,
	[RouteID] [smallint] NULL,
	[LndID] [int] NULL,
	[SeqID] [tinyint] NULL,
	[Duration] [varchar](100) NULL,
	[Distance] [varchar](100) NULL,
	[TrafficDuration] [varchar](100) NULL,
	[HaltTime] [int] NULL,
	[BufferTime] [int] NULL,
	[DurationSec] [varchar](100) NULL,
 CONSTRAINT [PK_rvlfRouteDetails] PRIMARY KEY CLUSTERED 
(
	[RouteDetailsId] 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].[rvlfRouteDriverAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteDriverAssignment](
	[AssignmentId] [bigint] IDENTITY(522,1) NOT NULL,
	[RouteId] [smallint] NOT NULL,
	[DriverId] [bigint] NOT NULL,
	[FromDateTime] [datetime] NOT NULL,
	[ToDateTime] [datetime] NOT NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRouteETA]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteETA](
	[AutoNoETA] [bigint] IDENTITY(39,1) NOT NULL,
	[BoxID] [bigint] NOT NULL,
	[ScheduleID] [bigint] NULL,
	[StartLocation] [nvarchar](250) NULL,
	[StartLocationDateTime] [datetime] NULL,
	[NextStop] [bigint] NULL,
	[NextStopName] [nvarchar](150) NULL,
	[NextStopDistance] [varchar](100) NULL,
	[NextStopDuration] [varchar](100) NULL,
	[NextStopETA] [varchar](100) NULL,
	[NextStopLat] [nchar](10) NULL,
	[NextStopLon] [nchar](10) NULL,
	[DestinationStopID] [bigint] NULL,
	[DestinationStopName] [nvarchar](150) NULL,
	[DestinationStopDistance] [varchar](100) NULL,
	[DestinationStopDuration] [varchar](100) NULL,
	[DestinationStopETA] [varchar](100) NULL,
	[DestinationLatLon] [varchar](2000) NULL,
	[MsgStatus] [varchar](200) NULL,
	[CustomProp] [varchar](2000) NULL,
	[StopStatus] [varchar](10) NULL,
	[RouteStatus] [int] NULL,
	[MessageInId] [uniqueidentifier] NULL,
	[RouteID] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRouteMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteMaster](
	[RouteID] [smallint] IDENTITY(1,1) NOT NULL,
	[RouteName] [varchar](30) NULL,
	[RouteDescription] [varchar](250) NULL,
	[TravelDuration] [varchar](50) NULL,
	[TravelDistance] [varchar](50) NULL,
	[OrgID] [bigint] NULL,
	[GRouteId] [smallint] NULL,
	[TrafficDuration] [varchar](50) NULL,
	[IsCircularTrip] [bit] NULL,
 CONSTRAINT [PK_rvlfRouteMaster] PRIMARY KEY CLUSTERED 
(
	[RouteID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRouteMasterCSC]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteMasterCSC](
	[RouteId] [bigint] IDENTITY(47,1) NOT NULL,
	[RouteName] [varchar](50) NULL,
	[VendorId] [bigint] NULL,
	[DisplayName] [varchar](20) NULL,
	[Description] [varchar](200) NULL,
	[OrgId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRouteScheduling]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteScheduling](
	[RouteSchedulingId] [bigint] IDENTITY(11,1) NOT NULL,
	[RouteId] [bigint] NULL,
	[ScheduleType] [nvarchar](50) NULL,
	[OrganizationId] [bigint] NULL,
	[FleetId] [bigint] NULL,
	[DriverGroupId] [bigint] NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL,
	[UnAssignedBy] [bigint] NULL,
	[UnAssignedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfRouteVehicleAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRouteVehicleAssignment](
	[AssignmentId] [bigint] IDENTITY(1800,1) NOT NULL,
	[RouteId] [smallint] NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[FromDateTime] [datetime] NOT NULL,
	[ToDateTime] [datetime] NOT NULL,
	[AssignedBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL,
	[Isdelete] [bit] NULL,
	[ScheduleId] [bigint] NULL,
	[IsTripLive] [bit] NULL,
	[Frequency] [tinyint] NULL,
	[WeekDays] [varchar](15) NULL,
	[DayOfMonth] [tinyint] NULL,
 CONSTRAINT [PK_rvlfRouteVehicleAssignment] PRIMARY KEY CLUSTERED 
(
	[AssignmentId] 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].[rvlfRptDuration_LT]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRptDuration_LT](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[IntInMin] [int] NOT NULL,
	[IntInSec] [int] NOT NULL,
	[OrgId] [int] NOT NULL,
	[IsDefault] [bit] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NOT NULL,
 CONSTRAINT [pk_rvlfRptDuration_LT] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfRptInterval_LT]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfRptInterval_LT](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[IntInMeter] [int] NOT NULL,
	[OrgId] [int] NOT NULL,
	[IsDefault] [bit] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[IsDelete] [bit] NOT NULL,
 CONSTRAINT [pk_rvlfRptInterval_LT] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfScheduledReportLog]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfScheduledReportLog](
	[ReportGenerationID] [bigint] IDENTITY(47592,1) NOT NULL,
	[ReportScheduleID] [bigint] NULL,
	[UserID] [bigint] NULL,
	[Email] [varchar](200) NULL,
	[ReportStartDate] [datetime] NULL,
	[ReportEndDate] [datetime] NULL,
	[GeneratedOn] [datetime] NULL,
	[ActualGeneration] [datetime] NULL,
	[TimeZoneID] [smallint] NULL,
	[IsError] [bit] NULL,
	[ErrorMessage] [varchar](250) NULL,
	[ErrorCode] [char](5) NULL,
	[ReportRef] [uniqueidentifier] NULL,
	[ReportPath] [varchar](130) NULL,
 CONSTRAINT [PK_rvlfScheduledReportLog] PRIMARY KEY CLUSTERED 
(
	[ReportGenerationID] 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].[rvlfScheduledVehicleRequisition]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfScheduledVehicleRequisition](
	[RequisitionId] [bigint] IDENTITY(14,1) NOT NULL,
	[EmployeeId] [bigint] NOT NULL,
	[RequisitionDate] [datetime] NOT NULL,
	[FromAddress] [varchar](200) NULL,
	[ToAddress] [varchar](200) NULL,
	[DistanceKM] [int] NULL,
	[RequisitionService] [varchar](7) NULL,
	[RequisitionFromDate] [datetime] NULL,
	[RequisitionToDate] [datetime] NULL,
	[Purpose] [varchar](100) NULL,
	[Comments] [varchar](200) NULL,
	[Approval] [char](1) NULL,
	[Closed] [bit] NULL,
	[DateOfClosed] [datetime] NULL,
	[ClosedComments] [varchar](200) NULL,
	[Latitude] [numeric](10, 6) NULL,
	[Longitude] [numeric](10, 6) NULL,
	[LocalityId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfScheduleOfCommandsMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfScheduleOfCommandsMaster](
	[ScheduleId] [bigint] IDENTITY(4500,1) NOT NULL,
	[BoxCmdOutTypeId] [tinyint] NULL,
	[Boxid] [varchar](15) NULL,
	[PacketInfo] [varchar](500) NOT NULL,
	[EffectiveFrom] [datetime] NULL,
	[EffectiveTo] [datetime] NULL,
	[Frequency] [tinyint] NULL,
	[No.ofRetries] [tinyint] NULL,
	[UserId] [bigint] NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[NextExecutionOn] [datetime] NULL,
	[ExecutionOn] [varchar](50) NULL,
	[ActualExecutionDate] [datetime] NULL,
	[Isdelete] [bit] NULL,
	[VI_ID] [bigint] NULL,
	[ControllerId] [int] NULL,
 CONSTRAINT [PK_rvlfScheduleOfCommandsMaster] PRIMARY KEY CLUSTERED 
(
	[ScheduleId] 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].[rvlfSchedulingOfCommandsLog]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSchedulingOfCommandsLog](
	[ScheduleLogId] [bigint] IDENTITY(1,1) NOT NULL,
	[ScheduleId] [bigint] NOT NULL,
	[ExecutionOn] [datetime] NULL,
	[IsCommandSend] [bit] NULL,
	[ResponseMsg] [varchar](200) NULL,
	[No.ofTries] [tinyint] NULL,
	[ResponseId] [tinyint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSchedulingReport]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSchedulingReport](
	[ReportScheduleId] [bigint] IDENTITY(722,1) NOT NULL,
	[OrganizationId] [bigint] NOT NULL,
	[ReportTypesId] [bigint] NOT NULL,
	[FleetId] [bigint] NOT NULL,
	[VehicleId] [varchar](500) NOT NULL,
	[EffectiveFrom] [datetime] NOT NULL,
	[EffectiveTo] [datetime] NULL,
	[ReportFrom] [datetime] NULL,
	[ReportTo] [datetime] NULL,
	[GenerateReportOn] [datetime] NULL,
	[ReportStartDate] [datetime] NULL,
	[ReportEndDate] [datetime] NULL,
	[NextGenerationDateTime] [datetime] NULL,
	[IsSummaryVisible] [bit] NOT NULL,
	[IsDetailsVisible] [bit] NOT NULL,
	[ShowHideOptions] [varchar](1000) NULL,
	[ReportParameters] [varchar](1000) NULL,
	[SortBy] [varchar](30) NOT NULL,
	[SortDirection] [tinyint] NOT NULL,
	[FileExtension] [tinyint] NULL,
	[Frequency] [tinyint] NOT NULL,
	[IsLocked] [bit] NULL,
	[LockedDateTime] [datetime] NULL,
	[CanGenerate] [bit] NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[ModifiedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[IsDeleted] [bit] NOT NULL,
	[WeekDayFrom] [tinyint] NULL,
	[WeekDayTo] [tinyint] NULL,
	[WeekDayOn] [tinyint] NULL,
	[DayOfMonth] [tinyint] NULL,
	[lastGeneratedDateTime] [datetime] NULL,
	[IsScheduled] [bit] NULL,
 CONSTRAINT [PK_rvlfSchedulingReport] PRIMARY KEY CLUSTERED 
(
	[ReportScheduleId] 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].[rvlfSchoolMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSchoolMaster](
	[SchoolID] [bigint] IDENTITY(1,1) NOT NULL,
	[SchoolName] [nvarchar](100) NULL,
	[AddressLine1] [nvarchar](200) NULL,
	[AddressLine2] [nvarchar](200) NULL,
	[City] [nvarchar](50) NULL,
	[Region] [nvarchar](50) NULL,
	[Street] [nvarchar](100) NULL,
	[Country] [nvarchar](50) NULL,
	[OrganizationID] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[StationName] [varchar](100) NULL,
	[StationID] [varchar](50) NULL,
	[StartTime] [varchar](15) NULL,
	[EndTime] [varchar](15) NULL,
	[Modifiedby] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[GeozoneId] [bigint] NULL,
	[WaitingTime] [varchar](10) NULL,
	[MobileNo] [nvarchar](20) NULL,
	[ReportingPerson] [bigint] NULL,
 CONSTRAINT [PK_rvlfSchoolMaster] PRIMARY KEY CLUSTERED 
(
	[SchoolID] 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].[rvlfScreenRefreshFrequency]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfScreenRefreshFrequency](
	[FrequencyId] [bigint] IDENTITY(1,1) NOT NULL,
	[RefreshFrequencyValue] [int] NOT NULL,
 CONSTRAINT [PK_rvlfScreenRefreshFrequency] PRIMARY KEY CLUSTERED 
(
	[FrequencyId] 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].[rvlfSensor]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSensor](
	[SensorId] [tinyint] NOT NULL,
	[SensorName] [varchar](20) NOT NULL,
	[SensorAction] [varchar](10) NOT NULL,
	[ActionOn] [varchar](15) NULL,
	[ActionOff] [varchar](15) NULL,
	[DefaultAlarmLevelOn] [tinyint] NULL,
	[DefaultAlarmLevelOff] [tinyint] NULL,
	[SensorName_Ar] [nvarchar](100) NULL,
	[ActionOn_Ar] [nvarchar](10) NULL,
	[ActionOff_Ar] [nvarchar](20) NULL,
	[SensorName_Hin] [nvarchar](100) NULL,
	[ActionOn_Hin] [nvarchar](10) NULL,
	[ActionOff_Hin] [nvarchar](20) NULL,
 CONSTRAINT [PK_rvlfSensor] PRIMARY KEY CLUSTERED 
(
	[SensorId] 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].[RvlfSensorMessages]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RvlfSensorMessages](
	[SensorID] [int] NOT NULL,
	[Message_EN] [nvarchar](250) NOT NULL,
	[Message_AR] [nvarchar](250) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfServerStatisticsInfo]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfServerStatisticsInfo](
	[SNo] [bigint] IDENTITY(91,1) NOT NULL,
	[ETDBConnection] [tinyint] NULL,
	[FMSDBConnection] [tinyint] NULL,
	[MobDBConnection] [tinyint] NULL,
	[ETUserLoginCount] [tinyint] NULL,
	[FMSUserLoginCount] [tinyint] NULL,
	[MobUserLoginCount] [tinyint] NULL,
	[ETPacketsReceived] [int] NULL,
	[FMSPacketsCount] [int] NULL,
	[MobPacketsCount] [int] NULL,
	[CreatedDateTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfServices]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfServices](
	[ServiceID] [tinyint] NOT NULL,
	[CommModeId] [tinyint] NOT NULL,
	[ServiceName] [varchar](50) NOT NULL,
	[DisplayName] [varchar](50) NOT NULL,
	[Description] [varchar](250) NOT NULL,
	[ServiceState] [tinyint] NULL,
	[SystemInstalled] [varchar](50) NULL,
 CONSTRAINT [PK_rvlfServices] PRIMARY KEY CLUSTERED 
(
	[ServiceID] 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].[rvlfSeverity]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSeverity](
	[AlarmLevelId] [smallint] NOT NULL,
	[AlarmLevelName] [varchar](25) NOT NULL,
	[CreateAlarm] [bit] NOT NULL,
	[CanSendNotification] [bit] NULL,
	[AlarmLevelName_AR] [nvarchar](25) NULL,
	[AlarmLevelName_Hin] [nvarchar](25) NULL,
 CONSTRAINT [PK_rvlfSeverity] PRIMARY KEY CLUSTERED 
(
	[AlarmLevelId] 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].[rvlfSeverityTemplate]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSeverityTemplate](
	[SeverityTempId] [bigint] IDENTITY(9,1) NOT NULL,
	[SeverityTempName] [nvarchar](20) NULL,
	[SensorIds] [nvarchar](50) NULL,
	[OutputIds] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfSeverityTemplate] PRIMARY KEY CLUSTERED 
(
	[SeverityTempId] 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].[rvlfSMSInHst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSMSInHst](
	[SMSID] [int] IDENTITY(1,1) NOT NULL,
	[MessageInId] [uniqueidentifier] NOT NULL,
	[OriginDateTime] [datetime] NOT NULL,
	[BoxId] [int] NOT NULL,
	[Customprop] [varchar](2000) NOT NULL,
	[MobileNo] [varchar](50) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSMSSettings]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSMSSettings](
	[ServiceUrlName] [varchar](100) NULL,
	[UnameKey] [varchar](50) NULL,
	[Unamevalue] [varchar](50) NULL,
	[PasswordKey] [varchar](50) NULL,
	[PasswordValue] [varchar](50) NULL,
	[SenderKey] [varchar](50) NULL,
	[SenderValue] [varchar](10) NULL,
	[DestinationKey] [varchar](50) NULL,
	[MessageKey] [varchar](50) NULL,
	[OrganizationId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSolutionModules]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSolutionModules](
	[SolutionId] [bigint] NOT NULL,
	[ModuleId] [bigint] NOT NULL,
	[ModuleName] [nvarchar](50) NOT NULL,
	[ModuleDesc] [nvarchar](250) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSolutionOperation]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSolutionOperation](
	[SolutionId] [bigint] NOT NULL,
	[OperationId] [bigint] NOT NULL,
	[OperationTypeName] [nvarchar](100) NOT NULL,
	[OperationDesc] [nvarchar](250) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSparesRequestDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSparesRequestDetails](
	[ReqDetID] [bigint] IDENTITY(47,1) NOT NULL,
	[RequestID] [bigint] NULL,
	[BoxID] [varchar](100) NULL,
	[EquipmentID] [bigint] NULL,
	[ItemIds] [varchar](max) NULL,
	[ItemIDswithQty] [nvarchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSparesRequestMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSparesRequestMaster](
	[RequestID] [bigint] IDENTITY(51,1) NOT NULL,
	[BoxId] [varchar](100) NULL,
	[EquipmentID] [bigint] NULL,
	[ItemIDs] [nvarchar](2000) NULL,
	[RequestBy] [bigint] NULL,
	[RequestDate] [datetime] NULL,
	[OrganizationID] [bigint] NULL,
	[ModifyBy] [bigint] NULL,
	[ModifyDate] [datetime] NULL,
	[isDelete] [int] NULL,
 CONSTRAINT [PK_rvlfSparesRequestMaster] PRIMARY KEY CLUSTERED 
(
	[RequestID] 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].[rvlfSPNCategory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSPNCategory](
	[SPNCategoryID] [bigint] IDENTITY(3,1) NOT NULL,
	[SPNCategory] [varchar](200) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSPNMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSPNMaster](
	[SPNMasterID] [bigint] IDENTITY(1,1) NOT NULL,
	[SPNID] [bigint] NULL,
	[SPNDescription] [varchar](1000) NULL,
	[SPNCategoryID] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfStudentMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfStudentMaster](
	[StudentMasterID] [bigint] IDENTITY(121,1) NOT NULL,
	[StudentID] [varchar](25) NULL,
	[StudentFirstName] [nvarchar](100) NULL,
	[StudentMiddleName] [nvarchar](30) NULL,
	[StudentLastName] [nvarchar](30) NULL,
	[FleetName] [nvarchar](50) NULL,
	[StationID] [varchar](50) NULL,
	[BusInternalNo] [nvarchar](20) NULL,
	[SchoolID] [bigint] NULL,
	[Grade] [nvarchar](15) NULL,
	[Gender] [bit] NULL,
	[GuardianFirstName] [nvarchar](50) NULL,
	[Relationship] [nvarchar](30) NULL,
	[ContactNo] [varchar](15) NULL,
	[AlternateContactNo] [varchar](20) NULL,
	[EmailAddress] [nvarchar](100) NULL,
	[LandmarkName] [nvarchar](50) NULL,
	[PickupTime] [varchar](15) NULL,
	[DropOffTime] [varchar](15) NULL,
	[AddressLine1] [nvarchar](100) NULL,
	[AddressLine2] [nvarchar](100) NULL,
	[City] [nvarchar](50) NULL,
	[Street] [nvarchar](100) NULL,
	[Region] [nvarchar](100) NULL,
	[Country] [nvarchar](50) NULL,
	[OrganizationID] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[Active] [bit] NULL,
	[FutureUse1] [nvarchar](50) NULL,
	[FutureUse2] [nvarchar](50) NULL,
	[FutureUse3] [nvarchar](50) NULL,
	[ModifiedDate] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[IsDelete] [bit] NULL,
	[RFID] [varchar](100) NULL,
	[SMSSettings] [int] NULL,
	[GeozoneId] [bigint] NULL,
	[NotificationType] [int] NULL,
	[Photo] [varchar](1000) NULL,
 CONSTRAINT [PK_rvlfStudentMaster] PRIMARY KEY CLUSTERED 
(
	[StudentMasterID] 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].[rvlfStudentVehicleAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfStudentVehicleAssignment](
	[StudentMasterId] [bigint] NULL,
	[VehicleId] [bigint] NULL,
	[AssignBy] [bigint] NULL,
	[AssignedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSystemConfigDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSystemConfigDetails](
	[SysDetailID] [bigint] IDENTITY(167,1) NOT NULL,
	[SysConfigID] [bigint] NULL,
	[MachineName] [varchar](150) NULL,
	[MachineVolume] [decimal](18, 2) NULL,
	[rowIndex] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [ClusteredIndex-20181212-110412]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [ClusteredIndex-20181212-110412] ON [dbo].[rvlfSystemConfigDetails]
(
	[SysDetailID] ASC,
	[SysConfigID] ASC,
	[rowIndex] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfSystemConfigMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfSystemConfigMaster](
	[SysConfigID] [bigint] IDENTITY(80,1) NOT NULL,
	[CustomerID] [bigint] NULL,
	[BoxID] [varchar](100) NULL,
	[OrganizationID] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[ModifyBy] [bigint] NULL,
	[ModifyDate] [datetime] NULL,
	[isDelete] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfTimeBasedGeozone]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTimeBasedGeozone](
	[TimeAssignGeoZoneId] [bigint] IDENTITY(11,1) NOT NULL,
	[BoxId] [bigint] NOT NULL,
	[GeozoneId] [bigint] NOT NULL,
	[FromDate] [datetime] NULL,
	[Todate] [datetime] NULL,
	[FromTime] [varchar](5) NULL,
	[FromTime1] [varchar](5) NULL,
	[FromTime2] [varchar](5) NULL,
	[ToTime] [varchar](5) NULL,
	[ToTime1] [varchar](5) NULL,
	[ToTime2] [varchar](5) NULL,
	[RecurrenceDays] [nvarchar](15) NULL,
 CONSTRAINT [PK_rvlf_sp_TimeBasedGeozone] PRIMARY KEY CLUSTERED 
(
	[TimeAssignGeoZoneId] 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].[rvlfTimeZones]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTimeZones](
	[TimeZoneID] [int] NOT NULL,
	[TimeZoneName] [varchar](100) NOT NULL,
	[TimeZoneDesc] [varchar](10) NULL,
	[HoursToBeAdded] [numeric](18, 0) NULL,
	[MinToBeAdded] [numeric](18, 0) NULL,
 CONSTRAINT [PK_rvlfTimeZones] PRIMARY KEY CLUSTERED 
(
	[TimeZoneID] 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].[rvlfTitle]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTitle](
	[TitleId] [int] IDENTITY(1,1) NOT NULL,
	[TitleName] [varchar](10) NOT NULL,
 CONSTRAINT [PK_rvlfTitle] PRIMARY KEY CLUSTERED 
(
	[TitleId] 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].[rvlfTrendParamMst]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTrendParamMst](
	[ParamId] [int] IDENTITY(1,1) NOT NULL,
	[ParamName] [varchar](50) NOT NULL,
	[ParamDescr] [varchar](50) NULL,
	[VehicleType] [tinyint] NULL,
	[OrganizationId] [bigint] NOT NULL,
 CONSTRAINT [PK__rvlfTren__C132B124FA8C0B4B] PRIMARY KEY CLUSTERED 
(
	[ParamId] 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].[rvlfTrinetraSolutions]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTrinetraSolutions](
	[SolutionId] [int] NOT NULL,
	[SolutionName] [varchar](50) NOT NULL,
	[ResourceFileName] [varchar](30) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfTripDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTripDetails](
	[TripId] [bigint] NOT NULL,
	[BoxId] [int] NOT NULL,
	[StartDate] [datetime] NOT NULL,
	[EndDate] [datetime] NULL,
	[OdometerStart] [bigint] NOT NULL,
	[OdometerEnd] [bigint] NULL,
	[StartMessageInID] [uniqueidentifier] NULL,
	[EndMessageInID] [uniqueidentifier] NULL,
	[IsTripClosed] [bit] NULL,
	[IdlingDuration] [int] NULL,
	[StopTime] [int] NULL,
	[SensorNo] [smallint] NULL,
 CONSTRAINT [PK_rvlfTripDetails] PRIMARY KEY CLUSTERED 
(
	[TripId] 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].[rvlfTripDetails_AFC]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTripDetails_AFC](
	[TripId] [bigint] NOT NULL,
	[BoxId] [int] NOT NULL,
	[StartDate] [datetime] NOT NULL,
	[EndDate] [datetime] NULL,
	[OdometerStart] [bigint] NOT NULL,
	[OdometerEnd] [bigint] NULL,
	[StartMessageInID] [uniqueidentifier] NULL,
	[EndMessageInID] [uniqueidentifier] NULL,
	[IsTripClosed] [bit] NULL,
	[IdlingDuration] [int] NULL,
	[StopTime] [int] NULL,
	[IsDelete] [bit] NULL,
 CONSTRAINT [PK_rvlfTripDetails_AFC] PRIMARY KEY CLUSTERED 
(
	[TripId] 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].[rvlfTripDetails_ROI]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTripDetails_ROI](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[BoxId] [int] NOT NULL,
	[OdoStart] [bigint] NOT NULL,
	[OdoEnd] [bigint] NOT NULL,
	[Distance] [bigint] NOT NULL,
	[Idling] [bigint] NOT NULL,
	[Running] [bigint] NOT NULL,
	[NoOfDays] [tinyint] NOT NULL,
	[StartDate] [datetime] NOT NULL,
	[IsMonthStart] [bit] NOT NULL,
	[InstalledDate] [datetime] NULL,
 CONSTRAINT [PK__rvlfTrip__CA1FE46470E025DD] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfTripFareDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTripFareDetails](
	[TripId] [bigint] NOT NULL,
	[PackageLocation] [varchar](25) NULL,
	[UsersDepartment] [varchar](25) NULL,
	[AddDistance] [decimal](8, 2) NULL,
	[UwDistance] [decimal](8, 2) NULL,
	[TollCharge] [decimal](8, 2) NULL,
	[MaintFare] [decimal](8, 2) NULL,
	[FuelRate] [decimal](8, 2) NULL,
	[FuelHike] [decimal](6, 2) NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDate] [datetime] NULL,
	[VendorId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfTripSheetGeneration]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTripSheetGeneration](
	[TripSheetId] [bigint] IDENTITY(84,1) NOT NULL,
	[TripDate] [datetime] NULL,
	[TripGeneratedBy] [bigint] NULL,
	[NoEmpTravelled] [int] NULL,
	[TripType] [varchar](7) NULL,
	[TripGeneratedDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfTyreAxleMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTyreAxleMaster](
	[AxleId] [int] IDENTITY(1,1) NOT NULL,
	[AxleName] [varchar](20) NULL,
 CONSTRAINT [PK__TyreAxle__B625F65A336D0349] PRIMARY KEY CLUSTERED 
(
	[AxleId] 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].[rvlfTyreHistory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTyreHistory](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[TyreID] [varchar](50) NULL,
	[TyreMappingID] [int] NULL,
	[VehicleID] [bigint] NULL,
	[CreatedDate] [datetime] NULL,
	[Category] [int] NULL,
	[Odometer] [bigint] NULL,
	[AxleID] [int] NULL,
	[LocationID] [int] NULL,
	[Distance] [bigint] NULL,
	[SwapComments] [varchar](150) NULL,
	[IsRetread] [int] NULL,
	[IsRemap] [bit] NULL,
 CONSTRAINT [PK__TyreHist__3214EC076E8DC917] 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
/****** Object:  Table [dbo].[rvlfTyreMake]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTyreMake](
	[BrandID] [int] IDENTITY(1,1) NOT NULL,
	[BrandName] [varchar](50) NULL,
	[CreatedDateTime] [datetime] NULL,
	[OrganizationId] [bigint] NULL,
	[Benefits] [varchar](100) NULL,
 CONSTRAINT [PK__TyreMake__DAD4F3BE7446A26D] PRIMARY KEY CLUSTERED 
(
	[BrandID] 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].[rvlfTyreModel]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTyreModel](
	[ModelID] [int] IDENTITY(1,1) NOT NULL,
	[BrandID] [int] NULL,
	[ModelName] [varchar](50) NULL,
	[Size] [varchar](50) NULL,
	[Width] [varchar](20) NULL,
	[Remarks] [varchar](50) NULL,
	[CreatedDateTime] [datetime] NULL,
 CONSTRAINT [PK__TyreMode__E8D7A1CC78173351] PRIMARY KEY CLUSTERED 
(
	[ModelID] 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].[rvlfTyreStock]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTyreStock](
	[StockID] [int] IDENTITY(1,1) NOT NULL,
	[TyreID] [bigint] NULL,
	[VendorId] [int] NULL,
	[TotalQuantity] [bigint] NULL,
	[UsedQuantity] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[Available] [bigint] NULL,
	[BrandID] [int] NULL,
	[ModelID] [int] NULL,
	[OrganizationID] [bigint] NULL,
 CONSTRAINT [PK__TyreStoc__2C83A9E265045EDD] PRIMARY KEY CLUSTERED 
(
	[StockID] 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].[rvlfTyreVehicleMapping]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfTyreVehicleMapping](
	[TyreMappingId] [int] IDENTITY(1,1) NOT NULL,
	[TyreID] [int] NULL,
	[VehicleID] [bigint] NULL,
	[AxleID] [int] NULL,
	[TyreLocationID] [int] NULL,
	[Odometer] [bigint] NULL,
	[LifeTimeKM] [bigint] NULL,
	[AvailLifeTime] [bigint] NULL,
	[MappedDate] [datetime] NULL,
	[CreatedBy] [int] NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [int] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[IsDelete] [bit] NULL,
	[IsActive] [bit] NULL,
	[Notification1] [int] NULL,
	[Notification2] [int] NULL,
	[Notification3] [int] NULL,
	[Category] [int] NULL,
	[ToVehicleID] [bigint] NULL,
	[ToAxleID] [int] NULL,
	[ToLocationID] [int] NULL,
	[ToVehicleOdometer] [bigint] NULL,
	[SwapDate] [datetime] NULL,
	[RemovedDate] [datetime] NULL,
	[RemovedOdometer] [bigint] NULL,
	[SwappedOdometer] [bigint] NULL,
	[TyreName] [varchar](50) NULL,
	[TID] [varchar](50) NULL,
	[BrandID] [int] NULL,
	[ModelID] [int] NULL,
	[VendorId] [int] NULL,
	[OrganizationId] [int] NULL,
	[Distance] [bigint] NULL,
	[RemoveComments] [varchar](150) NULL,
	[CurrentOdo] [bigint] NULL,
	[Travelled] [bigint] NULL,
	[IsNearing] [bit] NULL,
	[IsNotfication1Sent] [bit] NULL,
	[IsNotfication2Sent] [bit] NULL,
	[IsNotfication3Sent] [bit] NULL,
	[IsRethread] [int] NULL,
	[PrevCategory] [int] NULL,
	[IsRemap] [int] NULL,
	[RetreadVendorId] [int] NULL,
	[RetreadCost] [bigint] NULL,
 CONSTRAINT [PK__TyreVehi__016925335A86D06A] PRIMARY KEY CLUSTERED 
(
	[TyreMappingId] 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].[rvlfUOM]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUOM](
	[Uno] [tinyint] IDENTITY(28,1) NOT NULL,
	[UOM] [varchar](15) NULL,
	[Description] [varchar](100) NULL,
	[OrganizationID] [bigint] NULL,
 CONSTRAINT [PK_rvlfUOM] PRIMARY KEY CLUSTERED 
(
	[Uno] 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].[rvlfUser]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUser](
	[UserId] [bigint] IDENTITY(599,1) NOT NULL,
	[UserName] [nvarchar](50) NULL,
	[TitleId] [int] NULL,
	[Password] [varchar](100) NULL,
	[Firstname] [varchar](50) NOT NULL,
	[LastName] [varchar](50) NOT NULL,
	[Email] [varchar](200) NULL,
	[PhoneNo] [varchar](15) NULL,
	[MobileNo] [varchar](15) NULL,
	[OrganizationId] [int] NOT NULL,
	[DisplayName] [nvarchar](100) NULL,
	[IsLocked] [bit] NOT NULL,
	[LockedDateTime] [datetime] NULL,
	[IsActive] [bit] NULL,
	[IsPwdChanged] [bit] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[IsDelete] [bit] NULL,
	[IsRegisteredUser] [bit] NULL,
	[IsHidden] [bit] NULL,
	[UGUID] [uniqueidentifier] NULL,
	[IsSMSQry] [bit] NULL,
	[LastHour] [int] NULL,
	[IsPushNotfication] [int] NULL,
	[DevRegID] [varchar](500) NULL,
	[DevOS] [char](5) NULL,
	[NewsReminder] [datetime] NULL,
	[ExpiryDate] [datetime] NULL,
	[PwdRetry] [tinyint] NULL,
	[CustomerID] [bigint] NULL,
 CONSTRAINT [PK_rvlfUser] 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
/****** Object:  Table [dbo].[rvlfUserFeedback]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserFeedback](
	[UserFeedbackId] [bigint] IDENTITY(23,1) NOT NULL,
	[UserId] [bigint] NULL,
	[OrganizationId] [bigint] NULL,
	[FeedbackText] [nvarchar](350) NULL,
	[FeedbackDate] [datetime] NULL,
	[UserRatings] [tinyint] NULL,
	[IsPushNotification] [bit] NULL,
	[ReplyText] [nvarchar](350) NULL,
	[ReplyDate] [datetime] NULL,
	[Status] [bit] NULL,
 CONSTRAINT [PK_rvlfUserFeedback] PRIMARY KEY CLUSTERED 
(
	[UserFeedbackId] 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].[rvlfUserGroup]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserGroup](
	[UserGroupId] [bigint] IDENTITY(260,1) NOT NULL,
	[UserGroupName] [nvarchar](30) NULL,
	[UserGroupDesc] [nvarchar](250) NULL,
	[IsDefaultUserGroup] [bit] NULL,
	[OrganizationId] [bigint] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDate] [datetime] NULL,
	[LockUserTries] [tinyint] NULL,
 CONSTRAINT [PK_rvlfUserGroup] PRIMARY KEY CLUSTERED 
(
	[UserGroupId] 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].[rvlfUserGroupAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserGroupAssignment](
	[UserId] [bigint] NOT NULL,
	[UserGroupId] [int] NOT NULL,
	[AssignedBy] [bigint] NOT NULL,
	[AssignedDate] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Index [Idx_UserGroupId]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [Idx_UserGroupId] ON [dbo].[rvlfUserGroupAssignment]
(
	[UserGroupId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfUserGroupSecurity]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserGroupSecurity](
	[SecurityId] [bigint] IDENTITY(80405,1) NOT NULL,
	[UserGroupId] [bigint] NOT NULL,
	[ModuleId] [bigint] NOT NULL,
	[OperationTypeId] [bigint] NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Index [Idx_UserGroupId]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [Idx_UserGroupId] ON [dbo].[rvlfUserGroupSecurity]
(
	[UserGroupId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfUserLogin]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserLogin](
	[LoginId] [bigint] IDENTITY(139264,1) NOT NULL,
	[UserId] [bigint] NOT NULL,
	[OrgId] [bigint] NOT NULL,
	[LoginDateTime] [datetime] NOT NULL,
	[LogOffDateTime] [datetime] NULL,
	[IP] [varchar](15) NOT NULL,
	[LoginStatus] [bit] NOT NULL,
 CONSTRAINT [PK_rvlfUserLogin] PRIMARY KEY CLUSTERED 
(
	[LoginId] 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].[rvlfUserLogin_PhoneApp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserLogin_PhoneApp](
	[LoginId] [bigint] IDENTITY(1598,1) NOT NULL,
	[UserId] [bigint] NOT NULL,
	[OrgId] [bigint] NOT NULL,
	[LoginDateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfUserLoginDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserLoginDetails](
	[SessionId] [nvarchar](500) NOT NULL,
	[UserId] [bigint] NOT NULL,
	[OrgId] [int] NOT NULL,
	[LoginId] [bigint] NOT NULL,
	[UserName] [nvarchar](50) NOT NULL,
	[DisplayName] [nvarchar](50) NOT NULL,
	[OrgName] [nvarchar](50) NOT NULL,
	[IsAnglerAdmin] [bit] NOT NULL,
	[LastLoginDateTime] [datetime] NOT NULL,
	[LastLoginUser] [nvarchar](50) NOT NULL,
	[TimeZoneHours] [int] NOT NULL,
	[TimeZoneMins] [int] NOT NULL,
	[DistanceSpeedUnit] [int] NOT NULL,
	[HasPackageId] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfUserPreferences]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserPreferences](
	[UserPreferenceId] [bigint] IDENTITY(655,1) NOT NULL,
	[UserId] [bigint] NULL,
	[TimezoneId] [bigint] NULL,
	[Distance] [tinyint] NULL,
	[DefaultFleetId] [bigint] NULL,
	[RefreshFrequencyId] [bigint] NULL,
	[OrganizationId] [bigint] NULL,
	[LandingPageId] [bigint] NULL,
	[Fuel] [tinyint] NULL,
	[Lang] [varchar](100) NULL,
	[DefaultDateFormat] [int] NULL,
	[UserPreferedChart] [varchar](100) NULL,
	[Hours] [varchar](10) NULL,
	[FromDate] [datetime] NULL,
	[ToDate] [datetime] NULL,
	[ChartPosition] [varchar](500) NULL,
	[DefaultVehicleId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfUserPriviledges]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfUserPriviledges](
	[UserGroupId] [bigint] NOT NULL,
	[ModuleID] [bigint] NOT NULL,
	[OperationTypeId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehicle]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicle](
	[VehicleId] [bigint] IDENTITY(1021,1) NOT NULL,
	[Vin] [varchar](20) NULL,
	[LicensePlate] [varchar](20) NULL,
	[MakeId] [smallint] NULL,
	[ModelId] [smallint] NULL,
	[VehicleTypeId] [int] NULL,
	[StateProvince] [varchar](150) NULL,
	[ModelYear] [smallint] NULL,
	[Color] [varchar](20) NULL,
	[VehicleDescription] [nvarchar](40) NULL,
	[OrganizationId] [bigint] NOT NULL,
	[IconTypeId] [smallint] NULL,
	[TimeZone] [int] NULL,
	[DayLightSaving] [bit] NULL,
	[Email] [varchar](2010) NULL,
	[SMS] [varchar](160) NULL,
	[Notify] [bit] NULL,
	[Critical] [bit] NULL,
	[Warning] [bit] NULL,
	[AutoAdjustDayLightSaving] [bit] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[Modified DateTime] [datetime] NULL,
	[NearingMaintenance] [datetime] NULL,
	[DisplayName] [varchar](50) NULL,
	[Location] [varchar](200) NULL,
	[TankCapacity] [int] NULL,
	[CapacityUnits] [varchar](10) NULL,
	[Category] [varchar](10) NULL,
	[LastInsuranceExpired] [datetime] NULL,
	[LastPermitExpired] [datetime] NULL,
	[LastFCDate] [datetime] NULL,
	[IsEmailSent] [bit] NULL,
	[IsSMSSent] [bit] NULL,
	[PurchasedDate] [datetime] NULL,
	[OpeningEngineHours] [int] NULL,
	[InternalNo] [varchar](20) NULL,
	[VehicleDescription_Ar] [nvarchar](20) NULL,
	[SIMCardNo] [nvarchar](50) NULL,
	[MSISDN] [nvarchar](50) NULL,
	[IMSI] [nvarchar](50) NULL,
	[RptInterval] [varchar](10) NULL,
	[SpdThreshold] [tinyint] NULL,
	[InstalledDate] [datetime] NULL,
	[RefgId] [int] NULL,
	[VehicleOwnership] [int] NULL,
	[LeaseExpiryDate] [datetime] NULL,
	[CapacityValue] [bigint] NULL,
	[Capacityunit] [int] NULL,
	[LifeSpan] [int] NULL,
	[InsuranceExpiryDate] [datetime] NULL,
	[IsUnderWarranty] [bit] NULL,
	[WarrantyExpiryDate] [datetime] NULL,
	[IsDocumentsUploaded] [bit] NULL,
	[NoAlarms] [bit] NULL,
	[ElecTripAlert] [bit] NULL,
	[ShutdownAlert] [bit] NULL,
 CONSTRAINT [PK_rvlfVehicle] PRIMARY KEY CLUSTERED 
(
	[VehicleId] 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].[rvlfVehicleAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleAssignment](
	[BoxId] [varchar](15) NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[AssingedBy] [bigint] NOT NULL,
	[AssignedDateTime] [datetime] NOT NULL,
	[OldBoxID] [int] NULL,
	[IsDeleted] [bit] NULL,
	[DeletedDateTime] [datetime] NULL,
	[ServiceID] [tinyint] NULL,
	[ThresholdSpeed] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [Idx_VehicleId]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [Idx_VehicleId] ON [dbo].[rvlfVehicleAssignment]
(
	[VehicleId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehicleCost]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleCost](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[CostType] [tinyint] NOT NULL,
	[VehicleId] [int] NOT NULL,
	[Cost] [decimal](10, 2) NULL,
	[EffectiveFrom] [datetime] NOT NULL,
	[EffectiveTo] [datetime] NOT NULL,
	[CreatedBy] [int] NOT NULL,
	[CreatedDate] [datetime] NOT NULL,
 CONSTRAINT [PK__rvlfVehi__CA1FE46462920686] PRIMARY KEY CLUSTERED 
(
	[Sno] 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].[rvlfVehicleCurrentReadings]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleCurrentReadings](
	[VehicleId] [bigint] NOT NULL,
	[CurrentEngineHours] [bigint] NOT NULL,
	[CurrentOdometerReading] [bigint] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehicleDocuments]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleDocuments](
	[UploadId] [bigint] IDENTITY(73,1) NOT NULL,
	[VehicleId] [bigint] NULL,
	[DocumentName] [varchar](50) NULL,
	[DocumentPath] [nvarchar](max) NULL,
	[UploadedBy] [bigint] NULL,
	[UploadedDate] [datetime] NULL,
	[IsDeleted] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehicleGeozone]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleGeozone](
	[VehicleId] [bigint] NOT NULL,
	[GeozoneNo] [bigint] NOT NULL,
	[SeverityId] [tinyint] NOT NULL,
	[AssingedBy] [bigint] NOT NULL,
	[AssingedDate] [datetime] NOT NULL,
	[IsUnAuthorizedGeozone] [bit] NULL,
	[IsRestricted] [bit] NULL
) ON [PRIMARY]
GO
/****** Object:  Index [Idx_Geozone]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE CLUSTERED INDEX [Idx_Geozone] ON [dbo].[rvlfVehicleGeozone]
(
	[GeozoneNo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehicleMaintenanceService]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleMaintenanceService](
	[ServiceDetailsId] [bigint] IDENTITY(598,1) NOT NULL,
	[VehiclePlanId] [bigint] NOT NULL,
	[PlanDetailsId] [bigint] NOT NULL,
	[ServiceType] [tinyint] NOT NULL,
	[Frequency] [tinyint] NOT NULL,
	[DueOn] [bigint] NULL,
	[StatusChangeOn] [bigint] NULL,
	[StartDate] [datetime] NULL,
	[DueOnDate] [datetime] NULL,
	[OverdueDate] [datetime] NULL,
	[EngineHrsOnDue] [bigint] NULL,
	[OdometerReadingOnDue] [bigint] NULL,
	[EngineHrsOnClose] [bigint] NULL,
	[OdometerReadingOnClose] [bigint] NULL,
	[ExecutedOn] [datetime] NULL,
	[ServiceCost] [decimal](18, 2) NULL,
	[Comments] [varchar](250) NULL,
	[RescheduledOn] [datetime] NULL,
	[Status] [tinyint] NOT NULL,
	[IsNotification1Sent] [bit] NULL,
	[IsNotification2Sent] [bit] NULL,
	[IsNotification3Sent] [bit] NULL,
	[NearingPercentage] [bigint] NULL,
	[IsNearing] [bit] NOT NULL,
	[NotificationDate] [datetime] NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[ModifiedBy] [bigint] NULL,
	[ModifiedDateTime] [datetime] NULL,
	[RunningSerial] [int] NULL,
 CONSTRAINT [PK_rvlfVehicleMaintenanceService] PRIMARY KEY CLUSTERED 
(
	[ServiceDetailsId] 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].[rvlfVehicleMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleMaster](
	[VehicleId] [bigint] IDENTITY(3,1) NOT NULL,
	[VehicleName] [varchar](100) NULL,
	[Capacity] [int] NULL,
	[Allocated] [bit] NULL,
	[VehicleTypeId] [bigint] NULL,
	[ModelYear] [smallint] NULL,
	[Color] [varchar](20) NULL,
	[VehicleDescription] [varchar](50) NULL,
	[LicensePlate] [varchar](20) NULL,
	[MakeId] [smallint] NULL,
	[ModelId] [smallint] NULL,
	[EngineNo] [varchar](30) NULL,
	[ChassisNo] [varchar](30) NULL,
	[InsuranceType] [varchar](50) NULL,
	[InsuranceValidityDate] [datetime] NULL,
	[PermitValidityDate] [datetime] NULL,
	[VendorId] [bigint] NULL,
	[OrgId] [bigint] NULL,
	[DisplayName] [varchar](20) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehiclePlanAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehiclePlanAssignment](
	[VehiclePlanId] [bigint] IDENTITY(1,1) NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[PlanId] [bigint] NOT NULL,
	[IsActive] [bit] NOT NULL,
	[EngineHrsStartValue] [bigint] NULL,
	[OdometerReadingOpeningValue] [bigint] NULL,
	[OdometerReadingStartValue] [bigint] NULL,
	[TimeBasedStartValue] [datetime] NULL,
	[AssignedStatus] [bit] NOT NULL,
	[AssignedBy] [bigint] NOT NULL,
	[AssignedDateTime] [datetime] NOT NULL,
 CONSTRAINT [PK_rvlfVehiclePlanAssignment] PRIMARY KEY CLUSTERED 
(
	[VehiclePlanId] 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].[rvlfVehicleRFIDs]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleRFIDs](
	[Sno] [int] IDENTITY(1,1) NOT NULL,
	[VehicleId] [bigint] NOT NULL,
	[IButtonID] [int] NOT NULL,
	[AssignedBy] [int] NOT NULL,
	[AssignedDate] [datetime] NOT NULL,
 CONSTRAINT [pk_rvlfVehicleRFIDsSno] PRIMARY KEY CLUSTERED 
(
	[Sno] ASC,
	[VehicleId] ASC,
	[IButtonID] 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].[rvlfVehicleTempUserAssignment]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleTempUserAssignment](
	[TAutoTokenID] [bigint] IDENTITY(65,1) NOT NULL,
	[VehicleID] [varchar](500) NOT NULL,
	[TokenID] [uniqueidentifier] NOT NULL,
	[Email] [varchar](500) NOT NULL,
	[MobileNo] [varchar](20) NOT NULL,
	[ExpiresFrom] [datetime] NOT NULL,
	[ExpiresTo] [datetime] NOT NULL,
	[isDelete] [bit] NOT NULL,
	[isAssign] [int] NOT NULL,
	[CreatedBy] [bigint] NOT NULL,
	[CreatedDateTime] [datetime] NOT NULL,
	[Remarks] [varchar](500) NOT NULL,
	[DeletedBy] [bigint] NULL,
	[DeletedDateTime] [datetime] NULL,
	[UnAssignedBy] [bigint] NULL,
	[UnAssignedDateTime] [datetime] NULL,
	[UnAssignedRemarks] [varchar](500) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVehicleType]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleType](
	[VehicleTypeId] [int] NOT NULL,
	[VehicleTypeName] [varchar](100) NOT NULL,
 CONSTRAINT [PK_rvlfVehicleType] PRIMARY KEY CLUSTERED 
(
	[VehicleTypeId] 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].[rvlfVehicleTypeMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVehicleTypeMaster](
	[VehicleTypeId] [bigint] IDENTITY(3,1) NOT NULL,
	[VehicleTypeName] [varchar](50) NULL,
	[RatePerKM] [numeric](5, 2) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVendorVehicleHistory]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVendorVehicleHistory](
	[VendorVehicleHstryId] [bigint] IDENTITY(99,1) NOT NULL,
	[VendorVehicleAssignId] [bigint] NULL,
	[ContractFrom] [datetime] NULL,
	[ContractTo] [datetime] NULL,
	[ExpNotificationType] [int] NULL,
	[ExpNotification1] [int] NULL,
	[ExpNotification2] [int] NULL,
	[MonthlyRunningDistance] [int] NULL,
	[IsDistanceNotify] [bit] NULL,
	[MonthlyEngineHrs] [int] NULL,
	[IsEngineHrsNotify] [bit] NULL,
	[IsRenew] [bit] NULL,
	[Remarks] [varchar](500) NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
 CONSTRAINT [PK_rvlfVendorVehicleHistory] PRIMARY KEY CLUSTERED 
(
	[VendorVehicleHstryId] 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].[rvlfVendorVehicleNotificationLog]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVendorVehicleNotificationLog](
	[VendorVehicleSettingsId] [bigint] NOT NULL,
	[LeaseNotificationType] [tinyint] NULL,
	[IsEmail] [bit] NULL,
	[IsSent] [bit] NULL,
	[NotificationDate] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfVendorVehicleSettings]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVendorVehicleSettings](
	[VendorVehicleSettingsId] [bigint] IDENTITY(69,1) NOT NULL,
	[VendorVehicleAssignId] [bigint] NULL,
	[ContractFrom] [datetime] NULL,
	[ContractTo] [datetime] NULL,
	[ExpNotificationType] [int] NULL,
	[ExpNotification1] [int] NULL,
	[ExpNotification2] [int] NULL,
	[MonthlyRunningDistance] [int] NULL,
	[IsDistanceNotify] [bit] NULL,
	[MonthlyEngineHrs] [int] NULL,
	[IsEngineHrsNotify] [bit] NULL,
	[IsRenew] [bit] NULL,
	[Remarks] [varchar](500) NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[TokenID] [uniqueidentifier] NULL,
	[Email] [varchar](500) NULL,
 CONSTRAINT [PK_rvlfVendorVehicleSettings] PRIMARY KEY CLUSTERED 
(
	[VendorVehicleSettingsId] 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].[rvlfViolationRating]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfViolationRating](
	[RatingId] [bigint] IDENTITY(869,1) NOT NULL,
	[OrganizationID] [bigint] NOT NULL,
	[VehicleID] [bigint] NOT NULL,
	[BoxMsgInTypeID] [tinyint] NOT NULL,
	[Rating] [tinyint] NULL,
 CONSTRAINT [PK_rvlfViolationRating1] PRIMARY KEY CLUSTERED 
(
	[OrganizationID] ASC,
	[VehicleID] ASC,
	[BoxMsgInTypeID] 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].[rvlfVORDetails]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfVORDetails](
	[Vno] [bigint] IDENTITY(10,1) NOT NULL,
	[FleetId] [bigint] NULL,
	[VehicleId] [bigint] NULL,
	[DateFrom] [datetime] NULL,
	[DateTo] [datetime] NULL,
	[RefDoc] [varchar](50) NULL,
	[AdditionalInfo] [varchar](500) NULL,
	[Reason] [varchar](1000) NULL,
	[OrganizationId] [bigint] NULL,
	[CreatedBy] [bigint] NULL,
	[CreatedDateTime] [datetime] NULL,
	[ModifiedBy] [bigint] NULL,
	[Modified] [datetime] NULL,
 CONSTRAINT [PK__rvlfVORD__C5F07CBF4F000F25] PRIMARY KEY CLUSTERED 
(
	[Vno] 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].[rvlfWidgets]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfWidgets](
	[SlNo] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [int] NULL,
	[ColumnId] [int] NULL,
	[SortNo] [int] NULL,
	[Collapsed] [int] NULL,
	[Title] [varchar](100) NULL,
	[Status] [char](1) NULL,
	[TitleIndex] [varchar](2) NULL,
 CONSTRAINT [pk_rvlfWidgets_SlNo] PRIMARY KEY CLUSTERED 
(
	[SlNo] 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].[rvlfWOApproval]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfWOApproval](
	[WOApprovalId] [bigint] IDENTITY(1,1) NOT NULL,
	[WOGenId] [bigint] NULL,
	[WONo] [nvarchar](50) NULL,
	[ApprovedBy] [bigint] NULL,
	[ApprovedDate] [datetime] NULL,
	[StatusType] [tinyint] NULL,
	[Remarks] [nvarchar](500) NULL,
	[AssignedTo] [bigint] NULL,
	[OrganizationId] [bigint] NULL,
 CONSTRAINT [PK_rvlfWOApproval] PRIMARY KEY CLUSTERED 
(
	[WOApprovalId] 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].[rvlfWOClosure]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfWOClosure](
	[WOClosingId] [bigint] IDENTITY(1,1) NOT NULL,
	[WOGenId] [bigint] NULL,
	[WONo] [varchar](50) NULL,
	[ClosedBy] [bigint] NULL,
	[ClosedDate] [datetime] NULL,
	[StatusType] [tinyint] NOT NULL,
	[Remarks] [nvarchar](500) NULL,
	[AssignedTo] [bigint] NULL,
	[OrganizationId] [bigint] NULL,
 CONSTRAINT [PK_rvlfWOClosure] PRIMARY KEY CLUSTERED 
(
	[WOClosingId] 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].[rvlfWOGeneration]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfWOGeneration](
	[WOGenId] [bigint] IDENTITY(1,1) NOT NULL,
	[WONo] [nvarchar](50) NULL,
	[VehiclePlanId] [bigint] NULL,
	[WOTypeId] [int] NULL,
	[VendorId] [bigint] NULL,
	[StartDate] [datetime] NULL,
	[EDC] [datetime] NULL,
	[WarrantyorContract] [nvarchar](100) NULL,
	[WarrantyEndDate] [datetime] NULL,
	[AssignedTo] [bigint] NULL,
	[Remarks] [nvarchar](500) NULL,
	[Status] [tinyint] NULL,
	[IsDelete] [bit] NULL,
	[CreatedBY] [bigint] NULL,
	[CreatedDatetime] [datetime] NULL,
	[OrganizationId] [bigint] NULL,
	[QuotationFile] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfWOTypes]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfWOTypes](
	[WOTypeId] [int] IDENTITY(1,1) NOT NULL,
	[WOTypeName] [nvarchar](50) NULL,
 CONSTRAINT [PK_rvlfWOTypes] PRIMARY KEY CLUSTERED 
(
	[WOTypeId] 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].[rvlfWriteParams]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfWriteParams](
	[ParamID] [tinyint] NULL,
	[ParamName] [varchar](100) NULL,
	[ParamValues] [varchar](10) NULL,
	[EquipmentType] [tinyint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[rvlfZoneMaster]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[rvlfZoneMaster](
	[ZoneId] [bigint] IDENTITY(4,1) NOT NULL,
	[ZoneName] [varchar](50) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[SLSParam]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SLSParam](
	[sno] [int] IDENTITY(1,1) NOT NULL,
	[DateTim] [datetime] NULL,
	[ParamSLS] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_ButtonData]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_ButtonData](
	[BD_RecordID] [int] IDENTITY(1,1) NOT NULL,
	[SIM_ID] [int] NOT NULL,
	[Sent_Time] [datetime] NULL,
	[Rec_Time] [datetime] NULL,
	[Latitude] [nvarchar](50) NOT NULL,
	[Longitude] [nvarchar](50) NOT NULL,
	[Speed] [int] NULL,
	[Orientation] [float] NULL,
	[OdoRead] [nvarchar](50) NULL,
	[Seq_ID] [nvarchar](50) NULL,
	[Button_Code] [int] NOT NULL,
 CONSTRAINT [PK_T_ButtonData] PRIMARY KEY CLUSTERED 
(
	[BD_RecordID] 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].[T_CaseID]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_CaseID](
	[CID_RecordID] [int] NOT NULL,
	[SIM_ID] [int] NOT NULL,
	[Location_ID] [int] IDENTITY(1,1) NOT NULL,
	[CaseId] [bigint] NOT NULL,
	[CaseAssignTime] [datetime] NULL,
 CONSTRAINT [PK_T_CaseID] PRIMARY KEY CLUSTERED 
(
	[Location_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
/****** Object:  Table [dbo].[T_Data]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Data](
	[SIM_ID] [int] NOT NULL,
	[Sent_Time] [datetime] NULL,
	[Rec_Time] [datetime] NULL,
	[Latitude] [decimal](10, 6) NOT NULL,
	[Longitude] [decimal](10, 6) NOT NULL,
	[Button_Code] [int] NOT NULL,
	[Orientation] [float] NULL,
	[Seq_ID] [nvarchar](50) NULL,
	[OdoRead] [nvarchar](50) NULL,
	[Speed] [int] NULL,
	[CaseId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_Lasttdata]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_Lasttdata](
	[T_dataTime] [datetime] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_LatestButtonData]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_LatestButtonData](
	[SIM_ID] [int] NOT NULL,
	[Sent_Time] [datetime] NOT NULL,
	[Rec_Time] [datetime] NULL,
	[Latitude] [nvarchar](50) NOT NULL,
	[Longitude] [nvarchar](50) NOT NULL,
	[Speed] [int] NULL,
	[Orientation] [float] NULL,
	[OdoRead] [nvarchar](50) NULL,
	[Seq_ID] [nvarchar](50) NULL,
	[Button_Code] [int] NOT NULL,
 CONSTRAINT [PK_T_LatestButtonData] PRIMARY KEY CLUSTERED 
(
	[Sent_Time] 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].[T_LatestData]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_LatestData](
	[SIM_ID] [int] NOT NULL,
	[Sent_Time] [datetime] NOT NULL,
	[Rec_Time] [datetime] NULL,
	[Latitude] [nvarchar](50) NOT NULL,
	[Longitude] [nvarchar](50) NOT NULL,
	[Button_Code] [int] NOT NULL,
	[Orientation] [float] NULL,
	[Seq_ID] [nvarchar](50) NULL,
	[OdoRead] [nvarchar](50) NULL,
	[Speed] [int] NULL,
	[CaseId] [bigint] NULL,
 CONSTRAINT [PK_T_LatestData] PRIMARY KEY CLUSTERED 
(
	[Sent_Time] 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].[T_LatestData7]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_LatestData7](
	[SIM_ID] [int] NOT NULL,
	[Sent_Time] [datetime] NULL,
	[Rec_Time] [datetime] NULL,
	[Latitude] [nvarchar](50) NOT NULL,
	[Longitude] [nvarchar](50) NOT NULL,
	[Button_Code] [int] NOT NULL,
	[Orientation] [float] NULL,
	[Seq_ID] [nvarchar](50) NULL,
	[OdoRead] [nvarchar](50) NULL,
	[Speed] [int] NULL,
	[CaseId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[t_Records]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[t_Records](
	[StartRecordId] [bigint] NULL,
	[EndRecordId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[T_StoredData]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[T_StoredData](
	[SIM_ID] [int] NOT NULL,
	[Sent_Time] [datetime] NULL,
	[Rec_Time] [datetime] NULL,
	[Latitude] [nvarchar](50) NOT NULL,
	[Longitude] [nvarchar](50) NOT NULL,
	[Button_Code] [int] NOT NULL,
	[Orientation] [float] NULL,
	[Seq_ID] [nvarchar](50) NULL,
	[OdoRead] [nvarchar](50) NULL,
	[Speed] [int] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TblVehiclNames]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TblVehiclNames](
	[VName] [varchar](100) NULL,
	[IdNo] [int] IDENTITY(1,1) NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[temp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[temp](
	[BoxId] [int] NOT NULL,
	[BoxMsgInTypeId] [tinyint] NULL,
	[OriginDateTime] [datetime2](3) NOT NULL,
	[DateTimeReceived] [datetime2](3) NOT NULL,
	[Latitude] [decimal](10, 6) NULL,
	[Longitude] [decimal](10, 6) NULL,
	[Heading] [smallint] NULL,
	[Speed] [tinyint] NULL,
	[Odo] [bigint] NULL,
	[CustomProp] [varchar](600) NULL,
	[MessageInID] [uniqueidentifier] NOT NULL,
	[SequenceNum] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[temptable]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[temptable](
	[BoxId] [int] NOT NULL,
	[Odometer] [varchar](2000) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[userp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[userp](
	[UserId] [bigint] NULL,
	[TimezoneId] [bigint] NULL,
	[Distance] [tinyint] NULL,
	[DefaultFleetId] [bigint] NULL,
	[RefreshFrequencyId] [bigint] NULL,
	[OrganizationId] [bigint] NULL,
	[LandingPageId] [bigint] NULL,
	[Fuel] [tinyint] NULL,
	[Lang] [varchar](100) NULL,
	[DefaultDateFormat] [int] NULL,
	[UserPreferedChart] [varchar](100) NULL,
	[Hours] [varchar](100) NULL,
	[FromDate] [datetime] NULL,
	[ToDate] [datetime] NULL,
	[ChartPosition] [varchar](100) NULL,
	[DefaultVehicleId] [bigint] NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[vts_config_tool]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[vts_config_tool](
	[config_id] [int] IDENTITY(1,1) NOT NULL,
	[config_imei_no] [varchar](20) NULL,
	[config_access_point] [varchar](20) NULL,
	[config_url] [varchar](30) NULL,
	[config_port] [varchar](20) NULL,
	[config_analog_a] [bit] NULL,
	[config_analog_b] [bit] NULL,
	[config_analog_c] [bit] NULL,
	[config_analog_d] [bit] NULL,
	[config_analog_e] [bit] NULL,
	[config_can_pid_a] [varchar](2) NULL,
	[config_can_pid_b] [varchar](2) NULL,
	[config_can_pid_c] [varchar](2) NULL,
	[config_can_pid_d] [varchar](2) NULL,
	[config_can_pid_e] [varchar](2) NULL,
	[config_ref_speed] [varchar](5) NULL,
	[config_time_high] [varchar](5) NULL,
	[config_time_low] [varchar](5) NULL,
	[config_update_rate] [varchar](5) NULL,
	[config_mobile_no] [varchar](20) NULL,
	[config_password] [varchar](100) NULL,
 CONSTRAINT [pk_vts_config_tool] PRIMARY KEY CLUSTERED 
(
	[config_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
/****** Object:  Table [dbo].[XLSDataTemp]    Script Date: 02/01/2022 04:03:48 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[XLSDataTemp](
	[ abdulbaethib@et#ae] [nvarchar](255) NULL,
	[Delivered] [nvarchar](255) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object:  Index [IDX_Boxid]    Script Date: 02/01/2022 04:03:48 PM ******/
CREATE NONCLUSTERED INDEX [IDX_Boxid] ON [dbo].[rvlfMsgInHst]
(
	[BoxId] ASC
)
INCLUDE([OriginDateTime]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
ALTER TABLE [dbo].[adrControllerMaster] ADD  CONSTRAINT [DF_AdrControllerMaster_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
ALTER TABLE [dbo].[adrDCSIMMaster] ADD  CONSTRAINT [DF_adrDSCIMMaster_IsDelete]  DEFAULT ((0)) FOR [IsDelete]
GO
ALTER TABLE [dbo].[adrFieldMaster] ADD  CONSTRAINT [DF_adrFieldMaster_IsDelete]  DEFAULT ((0)) FOR [IsDelete]
GO
ALTER TABLE [dbo].[adrPassageMaster] ADD  CONSTRAINT [DF_adrPassageMaster_IsDelete]  DEFAULT ((0)) FOR [IsDelete]
GO
ALTER TABLE [dbo].[AspNet_SqlCacheTablesForChangeNotification] ADD  CONSTRAINT [DF__AspNet_Sq__notif__4CD7CF91]  DEFAULT (getdate()) FOR [notificationCreated]
GO
ALTER TABLE [dbo].[AspNet_SqlCacheTablesForChangeNotification] ADD  CONSTRAINT [DF__AspNet_Sq__chang__4DCBF3CA]  DEFAULT ((0)) FOR [changeId]
GO
ALTER TABLE [dbo].[MQTT_Messages] ADD  CONSTRAINT [DF_MQTT_Messages_Enable]  DEFAULT ((1)) FOR [Enable]
GO
ALTER TABLE [dbo].[MQTT_Messages] ADD  CONSTRAINT [DF__MQTT_Mess__DateT__3DF64A0B]  DEFAULT (getdate()) FOR [DateTime_created]
GO
ALTER TABLE [dbo].[rvlfAlarm] ADD  CONSTRAINT [DF_rvlfAlarm_IsClose]  DEFAULT ((0)) FOR [IsClosed]
GO
ALTER TABLE [dbo].[rvlfAlarmTransaction] ADD  CONSTRAINT [DF_rvlfAlarmTransaction_IsClose]  DEFAULT ((0)) FOR [IsClosed]
GO
ALTER TABLE [dbo].[rvlfAlarmTransaction_old] ADD  CONSTRAINT [DF_rvlfAlarmTransaction_IsClosed]  DEFAULT ((0)) FOR [IsClosed]
GO
ALTER TABLE [dbo].[rvlfAuditOperation] ADD  CONSTRAINT [DF_rvlfAuditOpr_OprDate]  DEFAULT (getutcdate()) FOR [OprDate]
GO
ALTER TABLE [dbo].[rvlfBoxMsgInType] ADD  CONSTRAINT [DF_rvlfBoxMsgInType_VisibleWeb]  DEFAULT ((1)) FOR [VisibleWeb]
GO
ALTER TABLE [dbo].[rvlfBoxMsgInType] ADD  CONSTRAINT [DF__rvlfBoxMs__Isvio__68687968]  DEFAULT ((0)) FOR [Isviolation]
GO
ALTER TABLE [dbo].[rvlfBoxMsgInType] ADD  CONSTRAINT [DF__rvlfBoxMs__IsDef__00F5C6BE]  DEFAULT ((0)) FOR [IsDefaultAlarm]
GO
ALTER TABLE [dbo].[rvlfCustomers] ADD  CONSTRAINT [DF__rvlfCusto__IsDel__6B680F00]  DEFAULT ((0)) FOR [IsDelete]
GO
ALTER TABLE [dbo].[rvlfFleet] ADD  CONSTRAINT [DF_rvlfFleet_CreatedDate]  DEFAULT (getdate()) FOR [CreatedDate]
GO
ALTER TABLE [dbo].[rvlfFleet] ADD  CONSTRAINT [DF__rvlfFleet__IsDef__65F6EC68]  DEFAULT ((0)) FOR [IsDefault]
GO
ALTER TABLE [dbo].[rvlfFleetUsers] ADD  CONSTRAINT [DF_rvlfFleetUsers_AssignedDate]  DEFAULT (getdate()) FOR [AssignedDate]
GO
ALTER TABLE [dbo].[rvlfFleetVehicles] ADD  CONSTRAINT [DF_rvlfFleetVehicles_IsActive]  DEFAULT ((1)) FOR [IsActive]
GO
ALTER TABLE [dbo].[rvlfFleetVehicles] ADD  CONSTRAINT [DF_rvlfFleetVehicles_AssignedDate]  DEFAULT (getdate()) FOR [AssignedDate]
GO
ALTER TABLE [dbo].[rvlfInvoiceEntry] ADD  CONSTRAINT [DF_rvlfInvoiceEntry_DueDate]  DEFAULT (NULL) FOR [DueDate]
GO
ALTER TABLE [dbo].[rvlfMsgInHst] ADD  CONSTRAINT [DF__rvlfMsgIn__Messa__756D6ECB]  DEFAULT (newsequentialid()) FOR [MessageInID]
GO
ALTER TABLE [dbo].[rvlfMsgInHst] ADD  CONSTRAINT [DF_rvlfMsgInHst_IsMailSent_1]  DEFAULT ((0)) FOR [IsNotificationSent]
GO
ALTER TABLE [dbo].[rvlfMsgInHst] ADD  CONSTRAINT [DF_rvlfMsgInHst_IsProcessed]  DEFAULT ((1)) FOR [IsProcessed]
GO
ALTER TABLE [dbo].[rvlfMsgInHst] ADD  CONSTRAINT [DF_rvlfMsgInHst_Alarm]  DEFAULT ((0)) FOR [Alarm]
GO
ALTER TABLE [dbo].[rvlfMsgInHst_Techno] ADD  CONSTRAINT [DF_rvlfMsgInHst_Techno_MessageInID]  DEFAULT (newsequentialid()) FOR [MessageInID]
GO
ALTER TABLE [dbo].[rvlfMsgInHst_Techno_355] ADD  CONSTRAINT [DF_rvlfMsgInHst_Techno_MessageInID_355]  DEFAULT (newsequentialid()) FOR [MessageInID]
GO
ALTER TABLE [dbo].[rvlfMsgInHstParam_PIII] ADD  CONSTRAINT [DF__rvlfMsgIn__RefMs__7F6F07AD]  DEFAULT (newsequentialid()) FOR [RefMsgInID]
GO
ALTER TABLE [dbo].[rvlfMsgInHstParam_PR] ADD  CONSTRAINT [DF__rvlfMsgIn__RefMs__024B7458]  DEFAULT (newsequentialid()) FOR [RefMsgInID]
GO
ALTER TABLE [dbo].[rvlfMsgInSMSTemplates] ADD  CONSTRAINT [DF__rvlfMsgIn__Organ__3414ACBA]  DEFAULT ((0)) FOR [OrganizationID]
GO
ALTER TABLE [dbo].[rvlfOrganization] ADD  CONSTRAINT [DF_rvlfOrganization_NoOfEmailRetry]  DEFAULT ((5)) FOR [TotalNoofEmailTries]
GO
ALTER TABLE [dbo].[rvlfOrganization] ADD  CONSTRAINT [DF_rvlfOrganization_NoOfSMSRetry]  DEFAULT ((1)) FOR [TotalNoofSMSTries]
GO
ALTER TABLE [dbo].[rvlfOrganization] ADD  CONSTRAINT [DF__rvlfOrgan__OrgDi__6BC66B05]  DEFAULT ((1)) FOR [OrgDistIncPercentValue]
GO
ALTER TABLE [dbo].[rvlfOrganizationGeozone] ADD  CONSTRAINT [DF_rvlfOrganizationGeozone_CreatedBy]  DEFAULT ((0)) FOR [CreatedBy]
GO
ALTER TABLE [dbo].[rvlfOrganizationGeozone] ADD  CONSTRAINT [DF_rvlfOrganizationGeozone_CreatedDateTime]  DEFAULT (getdate()) FOR [CreatedDateTime]
GO
ALTER TABLE [dbo].[rvlfParentChildFleetRelation] ADD  CONSTRAINT [DF_rvlfParentChildFleetRelation_AssignedDateTime]  DEFAULT (getutcdate()) FOR [AssignedDateTime]
GO
ALTER TABLE [dbo].[rvlfParentMaster] ADD  CONSTRAINT [DF_rvlfParentMaster_AllowMobApp]  DEFAULT ((0)) FOR [AllowMobApp]
GO
ALTER TABLE [dbo].[rvlfUser] ADD  CONSTRAINT [DF_rvlfUser_IsHidden]  DEFAULT ((0)) FOR [IsHidden]
GO
ALTER TABLE [dbo].[rvlfUser] ADD  CONSTRAINT [DF_rvlfUser_GUID]  DEFAULT (newsequentialid()) FOR [UGUID]
GO
ALTER TABLE [dbo].[rvlfVehicleAssignment] ADD  CONSTRAINT [DF_rvlfVehicleAssignment_IsDeleted]  DEFAULT ((0)) FOR [IsDeleted]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID for the messages in which can be used to mapped to the command in order to get the response / ACK.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'MessageInID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Box ID of the device in order to identify them' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'BoxId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time at which the message was originated' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'OriginDateTime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Date and time on which the message is received by the DCL.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'DateTimeReceived'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID of the service i.e. DCL, through which the message is received' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'ServiceID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The message in type ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'BoxMsgInTypeId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Protocol version ID through which the packet is parsed' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'BoxProtocolTypeId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The IP address through which the device has sent the packet i.e. the source IP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'CommInfo1'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Source port of the device.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'CommInfo2'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Specifies whether the GPS information is valid or not
     0 – Valid
     1 – Not Valid
     2 – GPS not 	available.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'ValidGps'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Latitude value of the position information.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'Latitude'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Longitude value of the position information.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'Longitude'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Speed of the vehicle' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'Speed'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Direction at which the vehicle travels.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'Heading'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Sensor mask which is parsed and stored as binary information with 8 bit value' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'SensorMask'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The other properties which is present in the packet.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'CustomProp'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The Street address based on the position of the vehicle' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'StreetAddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Sequence Number, in order to identify the packet loss.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'SequenceNum'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Specifies whether the box is armed or not' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'IsArmed'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Nearest Landmark based on the position of the vehicle' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'NearestLandmark'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The priority of the message' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'Priority'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Specified whether the notification is sent or not.
If the nitificaiton is not required then while inserting the value itself the bit will be set to 1 (true)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'IsNotificationSent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'LandMarkID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'LandMarkID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'As per the discussion we are using this field for WH2 summary calculation for shift based.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'rvlfMsgInHst', @level2type=N'COLUMN',@level2name=N'duration'
GO
