--USE idb_datastore GO /****** Object: Table [dbo].[ZD_AgentTicketStatus] Script Date: 9/3/2020 4:02:34 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_AgentTicketStatus]( [Name] [varchar](255) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [pending] [decimal](30, 10) NULL, [closed] [decimal](30, 10) NULL, [solved] [decimal](30, 10) NULL, [hold] [decimal](30, 10) NULL, [open] [decimal](30, 10) NULL, [new] [decimal](30, 10) NULL, ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_CSAT] Script Date: 9/3/2020 4:02:35 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_CSAT]( [TicketId] [decimal](30, 10) Not NULL, [CreatedAt] [datetime] NULL, [Assignee] [varchar](255) NULL, [Offered] [decimal](30, 10) NULL, [Good] [decimal](30, 10) NULL, [Bad] [decimal](30, 10) NULL, CONSTRAINT PK_ID PRIMARY KEY (TicketId) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_CustomerSatisfactionDetailed] Script Date: 9/3/2020 4:02:35 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_CustomerSatisfactionDetailed]( [Id] [decimal](30, 10) NOT NULL, [TicketId] [decimal](30, 10) NULL, [Score] [varchar](255) NULL, [Comment] [varchar](255) NULL, [Reason] [varchar](255) NULL, [AssigneeId] [decimal](30, 10) NULL, [GroupId] [decimal](30, 10) NULL, [RequesterId] [decimal](30, 10) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, [OrganizationId] [decimal](30, 10) NULL, [Assignee] [varchar](255) NULL, [Requester] [varchar](255) NULL, [Organization] [varchar](255) NULL, CONSTRAINT PK_CustCSAT_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_DailyAgentTickets] Script Date: 9/3/2020 4:02:35 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_DailyAgentTickets]( [AssignedAt] [datetime] NULL, [Ceré Rettig] [decimal](30, 10) NULL, [Aaron Olson] [decimal](30, 10) NULL, [Eric Elfline] [decimal](30, 10) NULL, [John Lin] [decimal](30, 10) NULL ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_GroupMemberships] Script Date: 9/3/2020 4:02:35 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_GroupMemberships]( [Id] [decimal](30, 10) NOT NULL, [UserId] [decimal](30, 10) NULL, [GroupId] [decimal](30, 10) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, CONSTRAINT PK_GroupMember_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_Groups] Script Date: 9/3/2020 4:02:36 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_Groups]( [Id] [decimal](30, 10) NOT NULL, [Name] [varchar](255) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, CONSTRAINT PK_Group_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_holidays] Script Date: 9/3/2020 4:02:36 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_holidays]( [Id] [decimal](30, 10) NOT NULL, [ScheduleId] [decimal](30, 10) NULL, [Name] [varchar](255) NULL, [StartDate] [datetime] NULL, [EndDate] [datetime] NULL, CONSTRAINT PK_Holiday_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_Organizations] Script Date: 9/3/2020 4:02:36 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_Organizations]( [Id] [decimal](30, 10) NOT NULL, [Name] [varchar](255) NULL, [GroupId] [decimal](30, 10) NULL, [ExternalId] [varchar](255) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [DomainNames] [varchar](255) NULL, [Details] [varchar](255) NULL, [Notes] [varchar](255) NULL, [Tags] [varchar](255) NULL, [Url] [varchar](255) NULL, [UserId] [decimal](30, 10) NULL, CONSTRAINT PK_Org_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_SatisfactionRatings] Script Date: 9/3/2020 4:02:36 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_SatisfactionRatings]( [Id] [decimal](30, 10) NOT NULL, [TicketId] [decimal](30, 10) NULL, [Score] [varchar](255) NULL, [Comment] [varchar](255) NULL, [Reason] [varchar](255) NULL, [AssigneeId] [decimal](30, 10) NULL, [GroupId] [decimal](30, 10) NULL, [RequesterId] [decimal](30, 10) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, CONSTRAINT PK_CSAT_Ratings_ID PRIMARY KEY (Id) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_TicketDetails] Script Date: 9/3/2020 4:02:37 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_TicketDetails]( [Name] [varchar](255) NULL, [Subject] [varchar](255) NULL, [Description] [varchar](255) NULL, [Type] [varchar](255) NULL, [Priority] [varchar](255) NULL, [Status] [varchar](255) NULL, [Recipient] [varchar](255) NULL, [DueAt] [datetime] NULL, [RequesterId] [decimal](30, 10) NULL, [SubmitterId] [decimal](30, 10) NULL, [AssigneeId] [decimal](30, 10) NULL, [OrganizationId_1] [decimal](30, 10) NULL, [GroupId_1] [decimal](30, 10) NULL, [CollaboratorIds] [varchar](255) NULL, [FollowerIds] [varchar](255) NULL, [ForumTopicId] [decimal](30, 10) NULL, [ProblemId] [decimal](30, 10) NULL, [ExternalId] [varchar](255) NULL, [TicketFormId] [decimal](30, 10) NULL, [BrandId] [decimal](30, 10) NULL, [Tags] [varchar](255) NULL, [ViaChannel] [varchar](255) NULL, [ViaSource] [varchar](255) NULL, [SatisfactionRating] [varchar](255) NULL, [SharingAgreementIds] [varchar](255) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, [Comment] [varchar](255) NULL, [TicketId] [decimal](30, 10) NOT NULL, [GroupStations] [decimal](30, 10) NULL, [AssigneeStations] [decimal](30, 10) NULL, [Reopens] [decimal](30, 10) NULL, [Replies] [decimal](30, 10) NULL, [AssigneeUpdatedAt] [datetime] NULL, [RequesterUpdatedAt] [datetime] NULL, [StatusUpdatedAt] [datetime] NULL, [InitiallyAssignedAt] [datetime] NULL, [AssignedAt] [datetime] NULL, [SolvedAt] [datetime] NULL, [LatestCommentAddedAt] [datetime] NULL, [FirstResolutionTime_CalendarTime] [decimal](30, 10) NULL, [FirstResolutionTime_BusinessTime] [decimal](30, 10) NULL, [ReplyTime_CalendarTime] [decimal](30, 10) NULL, [ReplyTime_BusinessTime] [decimal](30, 10) NULL, [FullResolutionTime_Calendar] [decimal](30, 10) NULL, [FullResolutionTime_Business] [decimal](30, 10) NULL, [AgentWaitTime_Calendar] [decimal](30, 10) NULL, [AgentWaitTime_Business] [decimal](30, 10) NULL, [RequesterWaitTime_Calendar] [decimal](30, 10) NULL, [RequesterWaitTime_Business] [decimal](30, 10) NULL, [Name_1] [varchar](255) NULL, [Name_2] [varchar](255) NULL, CONSTRAINT PK_TicketDetails_ID PRIMARY KEY (TicketId) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_TicketMetrics] Script Date: 9/3/2020 4:02:37 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_TicketMetrics]( [Id] [decimal](30, 10) NOT NULL, [TicketId] [decimal](30, 10) NULL, [GroupStations] [decimal](30, 10) NULL, [AssigneeStations] [decimal](30, 10) NULL, [Reopens] [decimal](30, 10) NULL, [Replies] [decimal](30, 10) NULL, [AssigneeUpdatedAt] [datetime] NULL, [RequesterUpdatedAt] [datetime] NULL, [StatusUpdatedAt] [datetime] NULL, [InitiallyAssignedAt] [datetime] NULL, [AssignedAt] [datetime] NULL, [SolvedAt] [datetime] NULL, [LatestCommentAddedAt] [datetime] NULL, [FirstResolutionTime_CalendarTime] [decimal](30, 10) NULL, [FirstResolutionTime_BusinessTime] [decimal](30, 10) NULL, [ReplyTime_CalendarTime] [decimal](30, 10) NULL, [ReplyTime_BusinessTime] [decimal](30, 10) NULL, [FullResolutionTime_Calendar] [decimal](30, 10) NULL, [FullResolutionTime_Business] [decimal](30, 10) NULL, [AgentWaitTime_Calendar] [decimal](30, 10) NULL, [AgentWaitTime_Business] [decimal](30, 10) NULL, [RequesterWaitTime_Calendar] [decimal](30, 10) NULL, [RequesterWaitTime_Business] [decimal](30, 10) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, CONSTRAINT PK_TicketMetrics_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_Tickets] Script Date: 9/3/2020 4:02:37 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_Tickets]( [Id] [decimal](30, 10) NOT NULL, [Subject] [varchar](255) NULL, [Description] [varchar](255) NULL, [Type] [varchar](255) NULL, [Priority] [varchar](255) NULL, [Status] [varchar](255) NULL, [Recipient] [varchar](255) NULL, [DueAt] [datetime] NULL, [RequesterId] [decimal](30, 10) NULL, [SubmitterId] [decimal](30, 10) NULL, [AssigneeId] [decimal](30, 10) NULL, [OrganizationId] [decimal](30, 10) NULL, [GroupId] [decimal](30, 10) NULL, [CollaboratorIds] [varchar](255) NULL, [FollowerIds] [varchar](255) NULL, [ForumTopicId] [decimal](30, 10) NULL, [ProblemId] [decimal](30, 10) NULL, [ExternalId] [varchar](255) NULL, [TicketFormId] [decimal](30, 10) NULL, [BrandId] [decimal](30, 10) NULL, [Tags] [varchar](255) NULL, [ViaChannel] [varchar](255) NULL, [ViaSource] [varchar](255) NULL, [SatisfactionRating] [varchar](255) NULL, [SharingAgreementIds] [varchar](255) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [Url] [varchar](255) NULL, [Comment] [varchar](255) NULL, CONSTRAINT PK_Tickets_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO /****** Object: Table [dbo].[ZD_Users] Script Date: 9/3/2020 4:02:37 PM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[ZD_Users]( [Id] [decimal](30, 10) NOT NULL, [Email] [varchar](255) NULL, [Name] [varchar](255) NULL, [Role] [varchar](255) NULL, [OrganizationId] [decimal](30, 10) NULL, [Alias] [varchar](255) NULL, [CreatedAt] [datetime] NULL, [UpdatedAt] [datetime] NULL, [CustomRoleId] [decimal](30, 10) NULL, [RoleType] [varchar](255) NULL, [DefaultGroupId] [decimal](30, 10) NULL, [Details] [varchar](255) NULL, [ExternalId] [varchar](255) NULL, [LastLoginAt] [datetime] NULL, [Locale] [varchar](255) NULL, [LocaleId] [decimal](30, 10) NULL, [Notes] [varchar](255) NULL, [Phone] [varchar](255) NULL, [Photo] [varchar](255) NULL, [PhotoThumbnails] [varchar](255) NULL, [Signature] [varchar](255) NULL, [Tags] [varchar](255) NULL, [TicketRestriction] [varchar](255) NULL, [TimeZone] [varchar](255) NULL, [Url] [varchar](255) NULL, [Organization] [varchar](255) NULL, [GroupId] [varchar](255) NULL, [PermissionSet] [varchar](255) NULL, [Contact Status] [varchar](255) NULL, [Contact Owner] [varchar](255) NULL, [Type] [varchar](255) NULL, CONSTRAINT PK_Users_ID PRIMARY KEY (ID) ) ON [PRIMARY] GO