/****** Object:  Table [dbo].[Menu]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Menu](
	[MenuName] [nvarchar](100) NULL,
	[FieldName] [nvarchar](40) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_Menu_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[Menu] ON
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Supervisor', N'Supervisor', 1)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Reservation function access', N'BookingListMenu', 2)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock receive', N'StockReceiveMenu', 3)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Sales history inquiry', N'InquirySalesHistoryMenu', 4)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'V.I.P. function access', N'VIPInformationMenu', 5)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Inquiry sales related reports', N'SalesReportMenu', 6)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Sales statistics report', N'SalesStatisticsReportMenu', 7)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock report', N'StockReportMenu', 8)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Purchase summary report', N'StockReceiveReportMenu', 9)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Supplier info. access', N'SupplierInformationListMenu', 10)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Expenses description setup', N'ExpensesDescriptionSetUpMenu', 11)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Expenses management access', N'ExpensesDataEntryMenu', 12)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Expenses report', N'ExpensesReportMenu', 13)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Payment receive report', N'ReceiptsReportMenu', 14)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Payment report', N'PaymentsReportMenu', 15)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Profile setup', N'ProfileSetupMenu', 17)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Local system configuration', N'PrinterSetupMenu', 18)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Menu category setup', N'CategorySetupMenu', 19)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Menu item setup', N'MenuSetupMenu', 20)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Payment method setup', N'PaymentsMethodSetupMenu', 21)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Supplier info. setup', N'SupplierInformationSetupMenu', 22)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Sales statistics chart', N'StatisticsChartMenu', 23)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Daily report inquiry (local machine only)', N'DailyReportMenu', 24)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Open drawer (no sale)', N'OpenCashDrawerMenu', 25)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Condition setup (tax invoice)', N'InvoiceConditionSetupMenu', 26)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Condition setup (booking slip)', N'BookingFormConditionSetupMenu', 27)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Database backup', N'DatabaseBackupMenu', 28)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Database restore', N'DatabaseRestoreMenu', 29)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Table info. setup', N'TableInformationSetupMenu', 30)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Attendance report', N'AttendanceReportMenu', 31)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Receive payment', N'PaymentAuthority', 32)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Print tax invoice', N'PrintInvoiceAuthority', 33)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Print job list', N'PrintJobListAuthority', 34)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Void saved item', N'VoidItemAuthority', 35)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock purchase', N'PurchaseOrderMenu', 36)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock purchase payable', N'PurchasePayableMenu', 37)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Discount allowed', N'AuthoriseDiscount', 38)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'POS window exit', N'AuthoriseCloseWindow', 39)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'POS - Table Service', N'TableOrderMenu', 40)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'POS - Quick Service', N'PointOfSalesMenu', 41)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Daily report (all machines)', N'CheckDailyReport', 42)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Sales refund', N'AuthoriseRefund', 43)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'User management', N'UserManager', 44)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Edit fully paid order', N'AllowEditOrder', 45)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Print daily report', N'PrintDailyReport', 46)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Attendance record edit', N'EditAttendanceRecord', 47)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock adjustment', N'StockAdjustmentMenu', 48)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock adjustment report', N'StockAdjustmentReportMenu', 49)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'POS - Phone Order', N'PhoneOrderMenu', 50)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Cash pay out', N'CashPayOutMenu', 51)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Cash float in / out', N'CashFloatMenu', 52)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Delivery driver assign', N'AssignDriverAuthorised', 53)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Receive deposit', N'DepositMenu', 54)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Wastage info. input', N'WastageMenu', 55)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Wastage report', N'WastageReportMenu', 56)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Cancel hold order', N'AuthrisedCancelHoldOrder', 57)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Manually enter discount rate', N'ManuallyEnterDiscountRate', 58)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Edit received payment', N'EditOrderPayment', 59)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Overwrite sales quantity (saved items)', N'AuthorizedChangeQty', 60)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Overwirte sales price (saved items)', N'AuthorizedChangePrice', 61)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Cash declaration list', N'CashDeclarationReportMenu', 62)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Delete V.I.P. record', N'DeleteVIPRecord', 63)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Control buttons setup', N'ControlButtonSetup', 64)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Discount rates setup', N'DiscountRateSetup', 65)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Item void reason description setup', N'VoidItemDescriptionSetup', 66)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'EFTPOS utility access', N'EFTPOSUtility', 67)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Change Menu Status (Sold Out)', N'ChangeMenuStatus', 68)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock take', N'StockTakeMenu', 69)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Stock take report', N'StockTakeReportMenu', 70)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'User group setup', N'UserGroupSetupAuthorized', 71)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Manually upload member reward and redeem points', N'UploadMembersRewardsMenu', 72)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Settings Portal Menu', N'SettingsPortalMenu', 73)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Zii-TO Table Lock Menu', N'ZiiTOTableLockMenu', 74)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Business activity statement', N'GSTPayableReportMenu', 75)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Zii Online Order Cancel', N'ZiiOnlineOrderCancel', 76)
INSERT [dbo].[Menu] ([MenuName], [FieldName], [PId]) VALUES (N'Override sales price', N'OverrideSalesPrice', 77)
SET IDENTITY_INSERT [dbo].[Menu] OFF
/****** Object:  Table [dbo].[MealPackage]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MealPackage](
	[Condition] [smallint] NULL,
	[ID] [smallint] NULL,
	[PriceSelect] [smallint] NULL,
	[ItemCode] [nvarchar](4) NULL,
	[QTY] [int] NULL,
	[Price] [float] NULL,
	[IDNo] [smallint] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_MealPackage_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[MachineID]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MachineID](
	[MachineID] [nvarchar](15) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[DefaultCheckListPrinter] [int] NOT NULL,
	[DefaultDrawerNo] [nvarchar](4) NULL,
	[Description] [nvarchar](50) NULL,
	[DefaultPrinter] [int] NOT NULL,
	[ClientUniqueId] [nvarchar](100) NULL,
	[Disabled] [bit] NOT NULL,
	[CreateAt] [datetime] NOT NULL,
	[BindAt] [datetime] NULL,
	[EnableEftposProduce] [int] NOT NULL,
	[DefaultKitchenScreen] [int] NOT NULL,
	[MachineType] [int] NOT NULL,
	[IpAddress] [nvarchar](50) NULL,
	[FixedJobListPrinter] [int] NOT NULL,
 CONSTRAINT [PK_MachineID_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[MachineID] ON
INSERT [dbo].[MachineID] ([MachineID], [PId], [DefaultCheckListPrinter], [DefaultDrawerNo], [Description], [DefaultPrinter], [ClientUniqueId], [Disabled], [CreateAt], [BindAt], [EnableEftposProduce], [DefaultKitchenScreen], [MachineType], [IpAddress], [FixedJobListPrinter]) VALUES (N'POS1', 1, 1, N'1', N'', 1, NULL, 0, CAST(0x0000AD5100F0000E AS DateTime), NULL, 0, 0, 0, NULL, 0)
SET IDENTITY_INSERT [dbo].[MachineID] OFF
/****** Object:  Table [dbo].[LoyaltyPoints]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[LoyaltyPoints](
	[OrderNo] [nvarchar](10) NULL,
	[OrderDate] [datetime] NULL,
	[VIPNo] [int] NULL,
	[RewardPoints] [float] NULL,
	[RedeemPoints] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_LoyaltyPoints_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[KitchenScreen]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[KitchenScreen](
	[OrderNo] [nvarchar](10) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Qty] [float] NULL,
	[PriceSelect] [int] NULL,
	[Condition] [int] NULL,
	[SpecialOrder] [nvarchar](255) NULL,
	[Finished] [bit] NULL,
	[KitchenScreenNumber1] [bit] NULL,
	[KitchenScreenNumber2] [bit] NULL,
	[KitchenScreenNumber3] [bit] NULL,
	[KitchenScreenNumber4] [bit] NULL,
	[KitchenScreenNumber5] [bit] NULL,
	[KitchenScreenNumber6] [bit] NULL,
	[KitchenScreenNumber7] [bit] NULL,
	[KitchenScreenNumber8] [bit] NULL,
	[KitchenScreenNumber9] [bit] NULL,
	[KitchenScreenNumber10] [bit] NULL,
	[KitchenScreenNumber11] [bit] NULL,
	[KitchenScreenNumber12] [bit] NULL,
	[SentDateTime] [datetime] NULL,
	[Resend] [bit] NULL,
	[ID] [int] NULL,
	[Locked] [bit] NULL,
	[DoneDateTime] [datetime] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[DoneQty] [decimal](18, 4) NOT NULL,
	[DonePrintedQty] [decimal](18, 4) NOT NULL,
	[ShouldNotifyTime] [datetime] NULL,
 CONSTRAINT [PK_KitchenScreen_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[KitchenDoneActivity]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[KitchenDoneActivity](
	[BuzId] [bigint] NOT NULL,
	[OrderNo] [nvarchar](10) NOT NULL,
	[ItemCode] [nvarchar](8) NOT NULL,
	[ID] [int] NOT NULL,
	[DoneQty] [decimal](18, 4) NOT NULL,
	[MachineID] [nvarchar](15) NOT NULL,
	[DoneDateTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[ItemGroupTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ItemGroupTable](
	[GroupName] [nvarchar](25) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_ItemGroupTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[ItemGroupTable] ON
INSERT [dbo].[ItemGroupTable] ([GroupName], [PId]) VALUES (N'DRINK', 1)
INSERT [dbo].[ItemGroupTable] ([GroupName], [PId]) VALUES (N'FOOD', 2)
INSERT [dbo].[ItemGroupTable] ([GroupName], [PId]) VALUES (N'OTHERS', 3)
SET IDENTITY_INSERT [dbo].[ItemGroupTable] OFF
/****** Object:  Table [dbo].[IPPermission]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IPPermission](
	[PId] [int] IDENTITY(1,1) NOT NULL,
	[IP] [nvarchar](20) NULL,
	[Enabled] [bit] NULL,
	[DefaultPrinter] [int] NULL,
 CONSTRAINT [PK_IPPermission] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[InstructionLinkGroup]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InstructionLinkGroup](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ItemCode] [nvarchar](10) NOT NULL,
	[Kind] [int] NOT NULL,
	[SubGroupCode] [nvarchar](20) NULL,
	[SingleChoice] [bit] NOT NULL,
	[MinNumberOfChoice] [int] NOT NULL,
	[MaxNumberOfChoice] [int] NOT NULL,
 CONSTRAINT [PK_InstructionLinkGroup] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[InstructionLink]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InstructionLink](
	[Code] [nvarchar](4) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Kind] [int] NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[Condition] [smallint] NULL,
	[ID] [int] NULL,
	[MaximunCharge] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[MultiPrice] [bit] NOT NULL,
	[IsDefault] [bit] NOT NULL,
 CONSTRAINT [PK_InstructionLink_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[InitialTrackingVersion]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InitialTrackingVersion](
	[BuzId] [bigint] NOT NULL,
	[TableName] [nvarchar](32) NOT NULL,
	[Version] [nvarchar](16) NOT NULL,
	[Status] [int] NOT NULL,
	[InitedAt] [datetime] NULL,
	[CreatedAt] [datetime] NOT NULL,
	[UpdatedAt] [datetime] NOT NULL,
 CONSTRAINT [ix_initialtrackingversion_buzid] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[IngredientsTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[IngredientsTable](
	[ItemCode] [nvarchar](4) NULL,
	[Ingredients] [nvarchar](255) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_IngredientsTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[HolidayTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[HolidayTable](
	[Holiday] [datetime] NULL,
	[Description] [nvarchar](25) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_HolidayTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[HoldItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[HoldItem](
	[HoldNo] [int] NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[Discount] [float] NULL,
	[Condition] [int] NULL,
	[PriceSelect] [int] NULL,
	[ID] [int] NULL,
	[SpecialOrder] [nvarchar](255) NULL,
	[Printed] [bit] NULL,
	[CheckListPrinted] [bit] NULL,
	[OriginalPrice] [float] NULL,
	[VoidFlag] [bit] NULL,
	[RedeemItem] [bit] NULL,
	[ManuallyEnterWeight] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_HoldItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[HoldHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[HoldHead](
	[HoldNo] [int] NULL,
	[HoldDate] [datetime] NULL,
	[DiscountKind] [int] NULL,
	[DiscountPercent] [float] NULL,
	[DiscountDollar] [float] NULL,
	[MachineID] [nvarchar](15) NULL,
	[OpName] [nvarchar](15) NULL,
	[CustomerName] [nvarchar](25) NULL,
	[Telephone] [nvarchar](15) NULL,
	[DueTime] [datetime] NULL,
	[GSTStatus] [bit] NULL,
	[DiscountOperator] [nvarchar](15) NULL,
	[MemberID] [nvarchar](20) NULL,
	[VIPNo] [int] NULL,
	[CurrentPoints] [float] NULL,
	[CustomerAddress] [nvarchar](100) NULL,
	[AwardEffective] [bit] NULL,
	[PresetDiscountCode] [nvarchar](3) NULL,
	[VoucherID] [nvarchar](20) NULL,
	[VoucherAmount] [float] NULL,
	[Notes] [nvarchar](255) NULL,
	[IsEatIn] [bit] NULL,
	[PagerNo] [nvarchar](10) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[OnlineOrderId] [nvarchar](15) NULL,
 CONSTRAINT [PK_HoldHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[GiftCardSales]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[GiftCardSales](
	[GiftCardID] [nvarchar](20) NULL,
	[CardAmount] [float] NULL,
	[SalesDate] [datetime] NULL,
	[ExpireDate] [datetime] NULL,
	[PaidAmount] [float] NULL,
	[Change] [float] NULL,
	[PaymentMethod] [nvarchar](25) NULL,
	[OpName] [nvarchar](15) NULL,
	[MachineID] [nvarchar](15) NULL,
	[Uploaded] [bit] NULL,
	[Surcharge] [float] NULL,
	[EFTPOSNote] [nvarchar](50) NULL,
	[Discount] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_GiftCardSales_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[Expenses]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Expenses](
	[AccountNo] [nvarchar](4) NULL,
	[AcctDate] [datetime] NULL,
	[InvoiceNo] [nvarchar](10) NULL,
	[InvoiceDate] [datetime] NULL,
	[Memorandum] [nvarchar](100) NULL,
	[Amount] [float] NULL,
	[GST] [float] NULL,
	[PaidAmount] [float] NULL,
	[SupplierCode] [nvarchar](15) NULL,
	[SerialNo] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_Expenses_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[ExpDetail]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ExpDetail](
	[Description] [nvarchar](50) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[GST] [float] NULL,
	[SerialNo] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_ExpDetail_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[ExpAcct]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ExpAcct](
	[Transfer] [bit] NOT NULL,
	[AcctDate] [datetime] NULL,
	[PaidAmount] [float] NULL,
	[Notes] [nvarchar](25) NULL,
	[ID] [smallint] NULL,
	[PayBy] [nvarchar](25) NULL,
	[OpName] [nvarchar](15) NULL,
	[SerialNo] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_ExpAcct_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[EftTransactionActive]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EftTransactionActive](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[Result] [nvarchar](50) NULL,
	[CardType] [nvarchar](50) NULL,
	[CustomerReceipt] [text] NULL,
	[TransactionId] [nvarchar](50) NULL,
	[BaseAmount] [decimal](20, 2) NOT NULL,
	[TransactionAmount] [decimal](20, 2) NOT NULL,
	[MachineID] [nvarchar](15) NULL,
	[CreateAt] [datetime] NOT NULL,
	[TipAmount] [int] NOT NULL,
	[EftEnvironment] [int] NOT NULL,
	[Surcharge] [decimal](20, 2) NOT NULL,
	[MerchantReceipt] [text] NULL,
	[PayStatus] [int] NOT NULL,
	[EFTPOSType] [int] NOT NULL,
	[ResultText] [nvarchar](100) NULL,
	[IsRefund] [int] NOT NULL,
	[OrderNo] [nvarchar](10) NULL,
	[LinklySessionId] [nvarchar](50) NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_EftTransactionActive] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_efttransactionactive_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[EftSettlement]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EftSettlement](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[MachineID] [nvarchar](50) NULL,
	[EFTPOSType] [int] NULL,
	[MerchantReceipt] [text] NULL,
	[PeriodStartTime] [datetime] NULL,
	[PeriodEndTime] [datetime] NULL,
	[SettlementTime] [datetime] NULL,
	[TransactionRange] [nvarchar](50) NULL,
	[TerminalId] [nvarchar](50) NULL,
	[TotalCount] [int] NOT NULL,
	[TotalValue] [decimal](20, 2) NOT NULL,
	[AcquirerTXCount] [int] NOT NULL,
	[AcquirerTXValue] [decimal](20, 2) NOT NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_EftSettlement] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_eftsettlement_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[EftMerReceipt]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EftMerReceipt](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[MerchantReceipt] [text] NULL,
	[SignatureRequired] [bit] NOT NULL,
	[TransactionId] [nvarchar](50) NULL,
	[MachineID] [nvarchar](50) NULL,
	[CreateAt] [datetime] NOT NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_EftMerReceipt] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_eftmerreceipt_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[EftMachinePair]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EftMachinePair](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[MachineID] [nvarchar](15) NOT NULL,
	[TerminalID] [int] NULL,
	[IntegrationKey] [nvarchar](50) NULL,
	[CreateAt] [datetime] NOT NULL,
	[IntegratedReceipt] [bit] NOT NULL,
	[IntegratedSurcharge] [bit] NOT NULL,
	[EFTPOSType] [int] NOT NULL,
	[EftEnvironment] [int] NOT NULL,
	[SerialNumber] [nvarchar](50) NULL,
	[SecretsEncKey] [nvarchar](200) NULL,
	[SecretsHmacKey] [nvarchar](200) NULL,
	[EftPosAddress] [nvarchar](50) NULL,
	[LinklyPosId] [nvarchar](50) NULL,
	[LinklyPosVendorId] [nvarchar](50) NULL,
	[Username] [nvarchar](20) NULL,
	[Password] [nvarchar](200) NULL,
	[MerID] [int] NULL,
	[EftPort] [int] NULL,
	[StationId] [nvarchar](50) NULL,
	[TenantCode] [nvarchar](50) NULL,
	[TenantName] [nvarchar](50) NULL,
 CONSTRAINT [PK_EftMachinePair] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[EftLog]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[EftLog](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[LogKey] [nvarchar](50) NOT NULL,
	[MachineID] [nvarchar](15) NOT NULL,
	[LogText] [text] NULL,
	[CreateAt] [datetime] NOT NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_EftLog] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_eftlog_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[DrawerOpenRecordTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DrawerOpenRecordTable](
	[OpenDateTime] [datetime] NULL,
	[MachineID] [nvarchar](15) NULL,
	[OpName] [nvarchar](15) NULL,
	[Reasons] [nvarchar](15) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_DrawerOpenRecordTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[draweropenrecords]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[draweropenrecords](
	[BuzId] [bigint] NOT NULL,
	[OpenDateTime] [datetime] NULL,
	[MachineID] [nvarchar](15) NULL,
	[OpName] [nvarchar](15) NULL,
	[Reasons] [nvarchar](15) NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[DrawerDevice]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DrawerDevice](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[DrawerNo] [nvarchar](4) NOT NULL,
	[ConnectToNo] [int] NOT NULL,
	[Speed] [int] NOT NULL,
	[PinModel] [int] NOT NULL,
	[CheckStatus] [int] NOT NULL,
	[DrawerMode] [int] NOT NULL,
	[Enabled] [bit] NOT NULL,
	[Description] [nvarchar](50) NULL,
 CONSTRAINT [PK_DrawerDevice] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[DrawerDevice] ON
INSERT [dbo].[DrawerDevice] ([PId], [DrawerNo], [ConnectToNo], [Speed], [PinModel], [CheckStatus], [DrawerMode], [Enabled], [Description]) VALUES (1, N'1', 1, 5, 0, 0, 1, 1, N'')
SET IDENTITY_INSERT [dbo].[DrawerDevice] OFF
/****** Object:  Table [dbo].[DiscountSchema]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DiscountSchema](
	[SchemaCode] [nvarchar](20) NOT NULL,
	[SchemaName] [nvarchar](50) NOT NULL,
	[Rate] [decimal](10, 2) NOT NULL,
	[Kind] [int] NOT NULL,
	[Active] [bit] NOT NULL,
	[CreateBy] [nvarchar](50) NULL,
	[CreateAt] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[DiscountRateTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DiscountRateTable](
	[Code] [nvarchar](3) NULL,
	[Description] [nvarchar](25) NULL,
	[DiscountRate] [float] NULL,
	[DiscountKind] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_DiscountRateTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[DepositTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DepositTable](
	[VIPNo] [int] NULL,
	[DepositDate] [datetime] NULL,
	[Amount] [float] NULL,
	[PaymentMethod] [nvarchar](25) NULL,
	[Notes] [nvarchar](50) NULL,
	[MachineID] [nvarchar](15) NULL,
	[OpName] [nvarchar](15) NULL,
	[ID] [int] NULL,
	[MemberID] [nvarchar](20) NULL,
	[CustomerName] [nvarchar](30) NULL,
	[EFTPOSNote] [nvarchar](50) NULL,
	[Surcharge] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_DepositTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[DBVersion]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[DBVersion](
	[DVersion] [decimal](20, 2) NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_DBVersion_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[DBVersion] ON
INSERT [dbo].[DBVersion] ([DVersion], [PId]) VALUES (CAST(100.00 AS Decimal(20, 2)), 1)
SET IDENTITY_INSERT [dbo].[DBVersion] OFF
/****** Object:  Table [dbo].[course]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[course](
	[CourseCode] [nvarchar](20) NOT NULL,
	[Description1] [nvarchar](50) NOT NULL,
	[Description2] [nvarchar](50) NULL,
	[OrderIndex] [int] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_course_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_Course_Code] UNIQUE NONCLUSTERED 
(
	[CourseCode] 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].[CommandControl]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CommandControl](
	[BuzId] [bigint] NOT NULL,
	[CommandType] [int] NOT NULL,
	[Command] [nvarchar](200) NULL,
	[Version] [nvarchar](20) NULL,
	[StopFlag] [bit] NOT NULL,
	[CreatedAt] [datetime] NOT NULL,
	[UpdatedAt] [datetime] NOT NULL,
 CONSTRAINT [ix_cc_buzid] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[Chart]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Chart](
	[AccountNo] [nvarchar](4) NULL,
	[Description] [nvarchar](50) NULL,
	[LevelFlag] [smallint] NULL,
	[Detail] [bit] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_Chart] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[ChannelPaymentActivity]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ChannelPaymentActivity](
	[OrderNo] [nvarchar](32) NULL,
	[OrderVersion] [nvarchar](32) NULL,
	[TableNo] [nvarchar](10) NULL,
	[OpName] [nvarchar](16) NULL,
	[MachineID] [nvarchar](16) NULL,
	[Surcharge] [decimal](20, 2) NULL,
	[Tips] [decimal](10, 4) NULL,
	[Amount] [decimal](20, 2) NULL,
	[RealAmount] [decimal](20, 2) NULL,
	[Currency] [nvarchar](8) NULL,
	[Channel] [nvarchar](16) NULL,
	[PaymentTime] [datetime] NULL,
	[ChannelReturnCode] [nvarchar](16) NULL,
	[ChannelOrderId] [nvarchar](32) NULL,
	[CodeUrl] [nvarchar](128) NULL,
	[Rate] [decimal](10, 4) NULL,
	[CustomerInfo] [nvarchar](128) NULL,
	[SuccessTime] [nvarchar](32) NULL,
	[Status] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[IDNo] [int] NOT NULL,
	[LinkToDevice] [int] NULL,
	[SessionId] [nvarchar](50) NULL,
	[BuzId] [bigint] NOT NULL,
	[LinkRecvIDNo] [int] NOT NULL,
	[LinkBuzId] [bigint] NOT NULL,
	[Notes] [nvarchar](100) NULL,
	[RefundGst] [decimal](20, 2) NOT NULL,
 CONSTRAINT [PK_ChannelPaymentRecord_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_channelpaymentactivity_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[WastageItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[WastageItem](
	[WastageNo] [int] NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[PriceSelect] [int] NULL,
	[ID] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_WastageItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[WastageHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[WastageHead](
	[WastageNo] [int] NULL,
	[WastageDate] [datetime] NULL,
	[OpName] [nvarchar](15) NULL,
	[Amount] [float] NULL,
	[Notes] [nvarchar](255) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_WastageHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[VoidReasonTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[VoidReasonTable](
	[Code] [nvarchar](2) NULL,
	[Description] [nvarchar](20) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_VoidReasonTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[VIPTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[VIPTable](
	[PId] [int] IDENTITY(1,1) NOT NULL,
	[VIPName] [nvarchar](30) NULL,
	[Company] [nvarchar](40) NULL,
	[Telephone] [nvarchar](15) NULL,
	[Fax] [nvarchar](15) NULL,
	[Mobile] [nvarchar](15) NULL,
	[EMail] [nvarchar](40) NULL,
	[Address] [nvarchar](100) NULL,
	[VIPNo] [int] NULL,
	[CreateDate] [datetime] NULL,
	[Discount] [float] NULL,
	[Notes] [nvarchar](255) NULL,
	[BirthDay] [datetime] NULL,
	[Suburb] [nvarchar](25) NULL,
	[State] [nvarchar](5) NULL,
	[PostCode] [nvarchar](6) NULL,
	[SerialNo] [nvarchar](16) NULL,
	[MapReference] [nvarchar](15) NULL,
	[CreditLimit] [float] NULL,
	[Number] [nvarchar](10) NULL,
	[NearWhere] [nvarchar](50) NULL,
	[IsActive] [bit] NULL,
 CONSTRAINT [PK_VIPTable] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[Version]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Version](
	[Version] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_Version_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[UserGroupTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[UserGroupTable](
	[GroupName] [nvarchar](20) NULL,
	[FieldName] [nvarchar](50) NULL,
	[Authorized] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_UserGroupTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[TyroReport]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TyroReport](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ReportCode] [nvarchar](50) NOT NULL,
	[ReconcilDate] [nvarchar](50) NOT NULL,
	[TerminalID] [int] NOT NULL,
	[ReportType] [nvarchar](20) NOT NULL,
	[Result] [nvarchar](50) NOT NULL,
	[ReportFormat] [nvarchar](10) NOT NULL,
	[ReportData] [text] NULL,
	[CreateAt] [datetime] NOT NULL,
	[MerID] [int] NULL,
 CONSTRAINT [PK_TyroReport] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[TyroReconcilTransaction]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TyroReconcilTransaction](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[TerminalBusinessDay] [nvarchar](10) NULL,
	[TerminalID] [int] NULL,
	[Amount] [decimal](20, 2) NULL,
	[CardType] [nvarchar](50) NULL,
	[MerchantReference] [nvarchar](50) NULL,
	[LocalDateTime] [nvarchar](50) NULL,
	[TransType] [nvarchar](50) NULL,
	[TyroReference] [nvarchar](50) NULL,
	[ReconcilResult] [int] NOT NULL,
	[ReconcilNote] [nvarchar](50) NULL,
	[CreateAt] [datetime] NOT NULL,
	[UpdateAt] [datetime] NOT NULL,
	[MerID] [int] NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_TyroReconcilTransaction] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_tyroreconciltransaction_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[TyroReconciliation]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TyroReconciliation](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[TerminalID] [int] NULL,
	[Total] [decimal](18, 0) NULL,
	[TerminalBusinessDay] [nvarchar](10) NULL,
	[CreateAt] [datetime] NOT NULL,
	[MerID] [int] NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_TyroReconciliation] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_tyroreconciliation_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[TrackingSync]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TrackingSync](
	[BuzId] [bigint] NOT NULL,
	[TableName] [nvarchar](128) NOT NULL,
	[TableId] [nvarchar](64) NOT NULL,
	[TableParentId] [nvarchar](64) NULL,
	[DataId] [nvarchar](4000) NULL,
	[DataParentId] [nvarchar](64) NULL,
	[OperateType] [smallint] NOT NULL,
	[OperateAt] [datetime] NOT NULL,
	[RowData] [text] NULL,
	[CommitStatus] [smallint] NOT NULL,
	[CommitAt] [datetime] NULL,
	[FailCount] [int] NOT NULL,
	[FailMessage] [nvarchar](128) NULL,
	[CreateAt] [datetime] NOT NULL,
	[RowsData] [ntext] NULL,
 CONSTRAINT [PK_TrackingSync] PRIMARY KEY CLUSTERED 
(
	[BuzId] 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].[TrackingSource]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TrackingSource](
	[BuzId] [bigint] NOT NULL,
	[TableName] [nvarchar](128) NOT NULL,
	[TableId] [nvarchar](64) NOT NULL,
	[TableParentId] [nvarchar](64) NULL,
	[DataId] [nvarchar](4000) NULL,
	[DataParentId] [nvarchar](64) NULL,
	[OperateType] [smallint] NOT NULL,
	[OperateAt] [datetime] NOT NULL,
	[SyncStatus] [smallint] NOT NULL,
	[SyncAt] [datetime] NULL,
	[FailCount] [int] NOT NULL,
	[FailMessage] [nvarchar](128) NULL,
 CONSTRAINT [PK_TrackingSource] PRIMARY KEY CLUSTERED 
(
	[BuzId] 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
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739432104869888, N'menu', N'FieldName', N'', N'OverrideSalesPrice', NULL, 0, CAST(0x0000AEBB014840BB AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739863975575552, N'profile', N'BuzId', N'', N'1', NULL, 1, CAST(0x0000AEBB0148B969 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739864059461632, N'sysparameter', N'ParamCode', N'', N'PRINTED_BARCODE_START_WITH_TWO_ENABLE', NULL, 0, CAST(0x0000AEBB0148B96F AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739864072044544, N'sysparameter', N'ParamCode', N'', N'PRINTED_BARCODE_START_WITH_ZERO_TWO_ENABLE', NULL, 0, CAST(0x0000AEBB0148B970 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739864076238848, N'sysparameter', N'ParamCode', N'', N'PRINTED_BARCODE_START_WITH_TWO_OPTION', NULL, 0, CAST(0x0000AEBB0148B971 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739864080433152, N'sysparameter', N'ParamCode', N'', N'PRINTED_BARCODE_START_WITH_ZERO_TWO_OPTION', NULL, 0, CAST(0x0000AEBB0148B971 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739864105598976, N'sysparameter', N'ParamCode', N'', N'BALANCE_TIME_ENABLED', NULL, 1, CAST(0x0000AEBB0148B973 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947270258688, N'sysparameter', N'ParamCode', N'', N'ASSIGN_DINING_TIME_ENABLED,ASSIGN_DINE_IN_TIME_ENABLED,ASSIGN_TAKE_AWAY_TIME_ENABLED,ASSIGN_QUICK_SALE_TIME_ENABLED,ASSIGN_DELIVERY_TIME_ENABLED,ASSIGN_PICK_UP_TIME_ENABLED,DUETIME_POP_POSITION', NULL, 2, CAST(0x0000AEBB0148D0AF AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947274452992, N'sysparameter', N'ParamCode', N'', N'ASSIGN_DINING_TIME_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0AF AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947278647296, N'sysparameter', N'ParamCode', N'', N'ASSIGN_DINE_IN_TIME_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B0 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947282841600, N'sysparameter', N'ParamCode', N'', N'ASSIGN_TAKE_AWAY_TIME_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B0 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947287035904, N'sysparameter', N'ParamCode', N'', N'ASSIGN_QUICK_SALE_TIME_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B0 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947291230208, N'sysparameter', N'ParamCode', N'', N'ASSIGN_DELIVERY_TIME_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B1 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947295424512, N'sysparameter', N'ParamCode', N'', N'ASSIGN_PICK_UP_TIME_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B1 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947299618816, N'sysparameter', N'ParamCode', N'', N'DUETIME_POP_POSITION', NULL, 0, CAST(0x0000AEBB0148D0B1 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947308007424, N'sysparameter', N'ParamCode', N'', N'HOLD_ENABLED,DISHES_PREPARE_TIMES,DINE_IN_HOLD_ENABLED,TAKE_AWAY_HOLD_ENABLED,QUICK_SALE_HOLD_ENABLED,DELIVERY_HOLD_ENABLED,PICK_UP_HOLD_ENABLED', NULL, 2, CAST(0x0000AEBB0148D0B2 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947312201728, N'sysparameter', N'ParamCode', N'', N'HOLD_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B2 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947316396032, N'sysparameter', N'ParamCode', N'', N'DISHES_PREPARE_TIMES', NULL, 0, CAST(0x0000AEBB0148D0B2 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947320590336, N'sysparameter', N'ParamCode', N'', N'DINE_IN_HOLD_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B3 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947320590337, N'sysparameter', N'ParamCode', N'', N'TAKE_AWAY_HOLD_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B3 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947324784640, N'sysparameter', N'ParamCode', N'', N'QUICK_SALE_HOLD_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B3 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947328978944, N'sysparameter', N'ParamCode', N'', N'DELIVERY_HOLD_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B3 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947333173248, N'sysparameter', N'ParamCode', N'', N'PICK_UP_HOLD_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B4 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947345756160, N'sysparameter', N'ParamCode', N'', N'PERSON_NECESSARY_ENABLED', NULL, 2, CAST(0x0000AEBB0148D0B5 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947349950464, N'sysparameter', N'ParamCode', N'', N'PERSON_NECESSARY_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B5 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947366727680, N'sysparameter', N'ParamCode', N'', N'AUTO_TO_CHECKOUT_ENABLED,CHECKOUT_PATTERN_01,CHECKOUT_PATTERN_02,FAST_PAY_ENABLED', NULL, 2, CAST(0x0000AEBB0148D0B6 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947370921984, N'sysparameter', N'ParamCode', N'', N'AUTO_TO_CHECKOUT_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B6 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947370921985, N'sysparameter', N'ParamCode', N'', N'CHECKOUT_PATTERN_01', NULL, 0, CAST(0x0000AEBB0148D0B6 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947375116288, N'sysparameter', N'ParamCode', N'', N'CHECKOUT_PATTERN_02', NULL, 0, CAST(0x0000AEBB0148D0B7 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059739947379310592, N'sysparameter', N'ParamCode', N'', N'FAST_PAY_ENABLED', NULL, 0, CAST(0x0000AEBB0148D0B7 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059740657403674624, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01499718 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059740712529412096, N'profile', N'BuzId', N'', N'1', NULL, 1, CAST(0x0000AEBB0149A67F AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059740712537800704, N'sysparameter', N'ParamCode', N'', N'NotPrintVoidItemOnBill', NULL, 0, CAST(0x0000AEBB0149A67F AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059740959691358208, N'profile', N'BuzId', N'', N'1', NULL, 1, CAST(0x0000AEBB0149EB8D AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059740959729106944, N'printcondition', N'BuzId', N'', N'1', NULL, 0, CAST(0x0000AEBB0149EB90 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059741915606794240, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB014AF6A1 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059743173889605632, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB014C5631 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059744432218554368, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB014DB5C3 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059745690530725888, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB014F1555 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059746948771594240, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015074E2 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059748207230566400, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB0151D47D AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059749465358188544, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01533402 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059750723624222720, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01549390 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059751981932199936, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB0155F321 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059753240353423360, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015752BA AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059754498476851200, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB0158B23F AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059755757837598720, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015A121B AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059757015008919552, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015B715B AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059758273304313856, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015CD0EB AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059759531629068288, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015E307E AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059760789907685376, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB015F900D AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059762048224051200, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB0160EF9E AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059763306552999936, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01624F31 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059764564764508160, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB0163AEBC AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059765823068291072, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01650E4C AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059767081376268288, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01666DDD AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059768339667468288, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB0167CD6D AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059769598029971456, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB01692D03 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059770856405057536, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB016A8C99 AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059772114511708160, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBB016BEC1C AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059804561643257856, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBC0003D3BB AS DateTime), 0, NULL, 0, NULL)
INSERT [dbo].[TrackingSource] ([BuzId], [TableName], [TableId], [TableParentId], [DataId], [DataParentId], [OperateType], [OperateAt], [SyncStatus], [SyncAt], [FailCount], [FailMessage]) VALUES (4059804830129045504, N'sysparameter', N'ParamCode', N'', N'QUARTZ_ACTIVE_RECORD', NULL, 1, CAST(0x0000AEBC00041EBF AS DateTime), 0, NULL, 0, NULL)
/****** Object:  Table [dbo].[TeamsOrder]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TeamsOrder](
	[TeamNo] [nvarchar](32) NOT NULL,
	[TeamName] [nvarchar](50) NOT NULL,
	[Status] [int] NOT NULL,
	[Type] [int] NOT NULL,
	[OperatedAt] [datetime] NOT NULL
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[TableSet]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TableSet](
	[Status] [int] NULL,
	[TableNo] [nvarchar](10) NULL,
	[Seats] [smallint] NULL,
	[FontName] [nvarchar](50) NULL,
	[FontSize] [int] NULL,
	[FontBold] [bit] NOT NULL,
	[FontItalic] [bit] NOT NULL,
	[FontUnderline] [bit] NOT NULL,
	[FontStrikeout] [bit] NOT NULL,
	[ButtonShape] [int] NULL,
	[ButtonWidth] [int] NULL,
	[ButtonHeight] [int] NULL,
	[ButtonX] [int] NULL,
	[ButtonY] [int] NULL,
	[PropertyFlag] [bit] NOT NULL,
	[Description] [nvarchar](20) NULL,
	[PageFlag] [int] NULL,
	[PDAPosition] [int] NULL,
	[MinimumChargePerTable] [float] NULL,
	[ServiceStatus] [int] NULL,
	[IPAddress] [nvarchar](15) NULL,
	[SelfOrderStatus] [bit] NULL,
	[TerminalConnected] [bit] NULL,
	[TableLockerName] [nvarchar](50) NULL,
	[OnlineOrderTable] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ZiiTOTableLockName] [nvarchar](50) NULL,
	[TeamNo] [nvarchar](32) NULL,
	[LockUpdateTime] [datetime] NULL,
	[TeamLocalTime] [datetime] NULL,
 CONSTRAINT [PK_TableSet_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[TableSet] ON
INSERT [dbo].[TableSet] ([Status], [TableNo], [Seats], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [ButtonShape], [ButtonWidth], [ButtonHeight], [ButtonX], [ButtonY], [PropertyFlag], [Description], [PageFlag], [PDAPosition], [MinimumChargePerTable], [ServiceStatus], [IPAddress], [SelfOrderStatus], [TerminalConnected], [TableLockerName], [OnlineOrderTable], [PId], [ZiiTOTableLockName], [TeamNo], [LockUpdateTime], [TeamLocalTime]) VALUES (0, N'1', 3, NULL, 0, 0, 0, 0, 0, 2, 50, 50, 120, 40, 1, N'1', 0, 0, 0, 0, NULL, 0, 0, NULL, 0, 1, NULL, NULL, NULL, NULL)
INSERT [dbo].[TableSet] ([Status], [TableNo], [Seats], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [ButtonShape], [ButtonWidth], [ButtonHeight], [ButtonX], [ButtonY], [PropertyFlag], [Description], [PageFlag], [PDAPosition], [MinimumChargePerTable], [ServiceStatus], [IPAddress], [SelfOrderStatus], [TerminalConnected], [TableLockerName], [OnlineOrderTable], [PId], [ZiiTOTableLockName], [TeamNo], [LockUpdateTime], [TeamLocalTime]) VALUES (0, N'2', 4, NULL, 0, 0, 0, 0, 0, 2, 50, 50, 190, 40, 1, N'2', 0, 0, 0, 0, NULL, 0, 0, NULL, 0, 2, NULL, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[TableSet] OFF
/****** Object:  Table [dbo].[TablePage]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[TablePage](
	[PageNo] [int] NULL,
	[Description] [nvarchar](20) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_TablePage_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[TablePage] ON
INSERT [dbo].[TablePage] ([PageNo], [Description], [PId]) VALUES (0, N'Default', 1)
SET IDENTITY_INSERT [dbo].[TablePage] OFF
/****** Object:  Table [dbo].[sysparameter]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[sysparameter](
	[ParamCode] [nvarchar](50) NOT NULL,
	[ParamValue] [nvarchar](512) NULL,
	[ParamValueEx] [nvarchar](512) NULL,
	[ParamType] [int] NOT NULL,
	[Notes] [nvarchar](50) NULL,
	[OrderIndex] [int] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_sysparameter_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_sysparameter_paramcode] UNIQUE NONCLUSTERED 
(
	[ParamCode] 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
SET IDENTITY_INSERT [dbo].[sysparameter] ON
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'MULTI_LANG_INDEX1', N'en', NULL, 3, NULL, 0, 1)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ZIITO_EACH_ITEM_BALANCE_ENABLED', N'true', N'', 9, N'', 0, 2)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'TABLE_TIME_LIMIT_ENABLED', N'true', N'', 6, N'', 0, 3)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'TABLE_TIME_LIMIT', N'90', N'', 6, N'', 0, 4)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'KDS_DISCOLOR_ENABLED', N'false', N'', 8, N'', 0, 13)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'FIRST_ALERT_START_PHASES', N'', N'', 8, N'', 0, 14)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'SECOND_ALERT_START_PHASES', N'', N'', 8, N'', 0, 15)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'THIRD_ALERT_START_PHASES', N'', N'', 8, N'', 0, 16)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'tr_orderh_online_data_trigger_modify', N'false', N'', 0, N'', 0, 135)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'RoyalPayPartnerCode', NULL, NULL, 2, NULL, 0, 150)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'RoyalPayCredentialCode', NULL, NULL, 2, NULL, 0, 151)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ATTENDANCE_ENABLED', N'false', N'', 12, N'', 0, 153)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'RELATE_DEPUTY_ENABLED', N'false', N'', 12, N'', 0, 154)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'INPUT_TABLE_NO_ENABLED', N'false', N'', 13, N'', 0, 155)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'LOCK_SCREEN_TIME_ENABLE', N'true', N'', 14, N'', 0, 156)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'LOCK_SCREEN_TIME', N'5', N'', 14, N'', 0, 157)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'SET_DEFAULT_FEEDLINE', N'0', N'', 0, N'', 0, 159)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'QUARTZ_ACTIVE_RECORD', N'2022-06-22 00:15:00', N'', 17, N'', 0, 160)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_MEMBER_IMAGE1_CODE', N'', N'', 15, N'', 0, 163)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_MEMBER_IMAGE2_CODE', N'', N'', 15, N'', 0, 164)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_MEMBER_IMAGE3_CODE', N'', N'', 15, N'', 0, 165)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_MEMBER_IMAGE4_CODE', N'', N'', 15, N'', 0, 166)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_JOIN_MEMBER_IMAGE1_CODE', N'', N'', 16, N'', 0, 167)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_JOIN_MEMBER_IMAGE2_CODE', N'', N'', 16, N'', 0, 168)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_JOIN_MEMBER_IMAGE3_CODE', N'', N'', 16, N'', 0, 169)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CRM_JOIN_MEMBER_IMAGE4_CODE', N'', N'', 16, N'', 0, 170)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'backup_db_script_tables', N'course,drawerdevice,itemgrouptable,machineid,payment,picturemeta,presetnote,printcondition,printerdevice,printerdeviceitem,profile,holidaytable,sysparameter,tablepage,tableset,accessmenu,menu,usergrouptable,ingredientstable,instructionlink,instructionlinkgroup,category,menugrouptable,menuitem,menuItemrelation,presetnotegroup,subitemgroup,submenulinkdetail,submenulinkhead', NULL, 0, N'Backup Scripts', 0, 171)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'KDS_ORDER_TIME_SORT_ENABLED', N'false', N'', 8, N'', 0, 172)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'KDS_DININ_TIME', N'0', N'', 8, N'', 0, 173)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'KDS_TAKEAWAY_TIME', N'0', N'', 8, N'', 0, 174)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'KDS_QUICK_SALE_TIME', N'0', N'', 8, N'', 0, 175)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ORDER_CACHED_WHEN_LOCK_SCREEN', N'false', N'', 14, N'', 0, 176)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'SEND_TO_KITCHEN_TIPS_ENABLED', N'false', N'', 14, N'', 0, 177)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'COUNTER_PAYMENT_ENABLED', N'false', NULL, 13, NULL, 33, 178)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'DISCOUNT_ENABLED', N'false', N'', 14, N'', 0, 197)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'BALANCE_TIME_ENABLED', N'true', NULL, 19, NULL, 0, 199)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'PRINTED_BARCODE_START_WITH_TWO_ENABLE', N'false', NULL, 19, NULL, 0, 200)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'PRINTED_BARCODE_START_WITH_ZERO_TWO_ENABLE', N'false', NULL, 19, NULL, 0, 201)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'PRINTED_BARCODE_START_WITH_TWO_OPTION', N'0', NULL, 19, NULL, 0, 202)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'PRINTED_BARCODE_START_WITH_ZERO_TWO_OPTION', N'0', NULL, 19, NULL, 0, 203)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ASSIGN_DINING_TIME_ENABLED', N'false', N'', 10, N'', 0, 204)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ASSIGN_DINE_IN_TIME_ENABLED', N'false', N'', 10, N'', 0, 205)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ASSIGN_TAKE_AWAY_TIME_ENABLED', N'false', N'', 10, N'', 0, 206)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ASSIGN_QUICK_SALE_TIME_ENABLED', N'false', N'', 10, N'', 0, 207)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ASSIGN_DELIVERY_TIME_ENABLED', N'true', N'', 10, N'', 0, 208)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'ASSIGN_PICK_UP_TIME_ENABLED', N'true', N'', 10, N'', 0, 209)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'DUETIME_POP_POSITION', N'0', N'', 10, N'', 0, 210)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'HOLD_ENABLED', N'false', N'', 5, N'', 0, 211)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'DISHES_PREPARE_TIMES', N'10', N'', 5, N'', 0, 212)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'DINE_IN_HOLD_ENABLED', N'false', N'', 5, N'', 0, 213)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'TAKE_AWAY_HOLD_ENABLED', N'false', N'', 5, N'', 0, 214)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'QUICK_SALE_HOLD_ENABLED', N'false', N'', 5, N'', 0, 215)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'DELIVERY_HOLD_ENABLED', N'true', N'', 5, N'', 0, 216)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'PICK_UP_HOLD_ENABLED', N'true', N'', 5, N'', 0, 217)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'PERSON_NECESSARY_ENABLED', N'false', N'', 7, N'', 0, 218)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'AUTO_TO_CHECKOUT_ENABLED', N'true', N'', 11, N'', 0, 219)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CHECKOUT_PATTERN_01', N'true', N'', 11, N'', 0, 220)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'CHECKOUT_PATTERN_02', N'false', N'', 11, N'', 0, 221)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'FAST_PAY_ENABLED', N'false', N'', 11, N'', 0, 222)
INSERT [dbo].[sysparameter] ([ParamCode], [ParamValue], [ParamValueEx], [ParamType], [Notes], [OrderIndex], [PId]) VALUES (N'NotPrintVoidItemOnBill', N'false', NULL, 18, NULL, 0, 223)
SET IDENTITY_INSERT [dbo].[sysparameter] OFF
/****** Object:  Table [dbo].[SysLog]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[SysLog](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[LogDate] [datetime] NOT NULL,
	[Thread] [varchar](255) NOT NULL,
	[LogLevel] [varchar](20) NOT NULL,
	[Logger] [varchar](255) NOT NULL,
	[LogMessage] [varchar](4000) NOT NULL,
 CONSTRAINT [PK_SysLog] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[SyncTableLog]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SyncTableLog](
	[id] [bigint] IDENTITY(1,1) NOT NULL,
	[TableName] [nvarchar](100) NOT NULL,
	[TriggerName] [nvarchar](100) NULL,
	[KeyName] [nvarchar](50) NULL,
	[SyncStatus] [int] NOT NULL,
	[TableKeyInfo] [nvarchar](50) NULL,
	[OperateType] [nvarchar](50) NULL,
	[OperateAt] [datetime] NOT NULL,
	[SyncAt] [datetime] NULL,
	[IsInitialData] [int] NOT NULL,
	[FailCount] [int] NOT NULL,
	[Msg] [nvarchar](100) NULL,
 CONSTRAINT [PK_SyncTableItem] 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].[SyncDataTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SyncDataTable](
	[TableName] [nvarchar](50) NOT NULL,
	[DataReadyTime] [datetime] NULL,
	[SyncInitTime] [datetime] NULL,
	[Status] [int] NULL,
 CONSTRAINT [PK_SyncDataTable] 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].[SyncChangeDataTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SyncChangeDataTable](
	[BuzId] [bigint] IDENTITY(1,1) NOT NULL,
	[TableName] [nvarchar](100) NULL,
	[TableBusNo] [nvarchar](50) NULL,
	[BusType] [smallint] NULL,
	[Status] [smallint] NULL,
	[OptionType] [nvarchar](10) NULL,
	[CreateAt] [datetime] NULL,
	[ExtensionJson] [ntext] NULL,
 CONSTRAINT [PK_SysChangeDataTable_BuzId_SS] PRIMARY KEY CLUSTERED 
(
	[BuzId] 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].[SupplierMemo]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SupplierMemo](
	[SupplierCode] [nvarchar](15) NULL,
	[Memo] [nvarchar](200) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_SupplierMemo_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[Supplier]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Supplier](
	[PostCode] [nvarchar](6) NULL,
	[RegistNo] [nvarchar](15) NULL,
	[State] [nvarchar](5) NULL,
	[Suburb] [nvarchar](25) NULL,
	[SupplierCode] [nvarchar](15) NULL,
	[SupplierName] [nvarchar](40) NULL,
	[Contact] [nvarchar](15) NULL,
	[Telephone] [nvarchar](15) NULL,
	[Fax] [nvarchar](15) NULL,
	[LimitCredit] [float] NULL,
	[DueDay] [smallint] NULL,
	[Address] [nvarchar](60) NULL,
	[Active] [bit] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_Supplier_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[SubMenuLinkHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SubMenuLinkHead](
	[ItemCode] [nvarchar](4) NULL,
	[SubCategory] [bit] NULL,
	[AutoShowSubMenu] [bit] NULL,
	[NumberOfChoice] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[MinNumberOfChoice] [int] NOT NULL,
 CONSTRAINT [PK_SubMenuLinkHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[SubMenuLinkDetail]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SubMenuLinkDetail](
	[ItemCode] [nvarchar](4) NULL,
	[SubMenuCode] [nvarchar](4) NULL,
	[ChoiceItem] [bit] NULL,
	[SalesPrice] [float] NULL,
	[Instruction] [bit] NULL,
	[MaximunCharge] [bit] NULL,
	[SalesQty] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[OrderIndex] [int] NOT NULL,
	[MultiPrice] [bit] NOT NULL,
	[IsDefault] [bit] NOT NULL,
	[DefaultPriceKind] [int] NOT NULL,
 CONSTRAINT [PK_SubMenuLinkDetail_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[SubItemGroup]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SubItemGroup](
	[SubGroupCode] [nvarchar](20) NOT NULL,
	[SubGroupName1] [nvarchar](50) NOT NULL,
	[SubGroupName2] [nvarchar](50) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[SubGroupName3] [nvarchar](50) NULL,
	[SubGroupName4] [nvarchar](50) NULL,
 CONSTRAINT [PK_SubItemGroup_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StreetTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StreetTable](
	[Street] [nvarchar](100) NULL,
	[Suburb] [nvarchar](25) NULL,
	[MapReference] [nvarchar](10) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StreetTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StockTakeItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StockTakeItem](
	[StockTakeNo] [nvarchar](10) NULL,
	[StockItemCode] [nvarchar](8) NULL,
	[Qty] [float] NULL,
	[Units] [float] NULL,
	[Price] [float] NULL,
	[SysQty] [float] NULL,
	[ID] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StockTakeItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StockTakeHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StockTakeHead](
	[StockTakeNo] [nvarchar](10) NULL,
	[StockTakeDate] [datetime] NULL,
	[Notes] [nvarchar](255) NULL,
	[OpName] [nvarchar](15) NULL,
	[Amount] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StockTakeHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StockTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StockTable](
	[AlertQty] [float] NULL,
	[Code] [nvarchar](8) NULL,
	[Description] [nvarchar](100) NULL,
	[Measure] [float] NULL,
	[GSTRate] [float] NULL,
	[MeasureKind] [smallint] NULL,
	[LastOrderPrice] [float] NULL,
	[Live] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StockTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StockLinkTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StockLinkTable](
	[Code] [nvarchar](8) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[PriceSelect] [int] NULL,
	[Measure] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StockLinkTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StockI]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StockI](
	[Code] [nvarchar](8) NULL,
	[ReceiveNo] [nvarchar](8) NULL,
	[Qty] [float] NULL,
	[ID] [int] NULL,
	[Price] [float] NULL,
	[GSTRate] [float] NULL,
	[Kind] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StockI_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[StockH]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[StockH](
	[ReceiveNo] [nvarchar](8) NULL,
	[ReceiveDate] [datetime] NULL,
	[Notes] [nvarchar](255) NULL,
	[OpName] [nvarchar](15) NULL,
	[SupplierCode] [nvarchar](15) NULL,
	[PurchaseNo] [nvarchar](8) NULL,
	[GSTStatus] [bit] NOT NULL,
	[Amount] [float] NULL,
	[GST] [float] NULL,
	[PaidAmount] [float] NULL,
	[InvoiceNo] [nvarchar](10) NULL,
	[Kind] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_StockH_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[specialdaytable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[specialdaytable](
	[SpecialStartDate] [nvarchar](50) NOT NULL,
	[SpecialEndDate] [nvarchar](50) NOT NULL,
	[Active] [bit] NOT NULL,
	[Description1] [nvarchar](50) NULL,
	[Description2] [nvarchar](50) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_specialdaytable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_specialdaytable_date] UNIQUE NONCLUSTERED 
(
	[SpecialStartDate] ASC,
	[SpecialEndDate] 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].[SequenceID]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SequenceID](
	[SequenceId] [nvarchar](50) NOT NULL,
	[ItemCode] [nvarchar](50) NULL,
	[NowNumber] [bigint] NOT NULL,
 CONSTRAINT [ix_sequenceid_branid] UNIQUE NONCLUSTERED 
(
	[SequenceId] ASC,
	[ItemCode] 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
INSERT [dbo].[SequenceID] ([SequenceId], [ItemCode], [NowNumber]) VALUES (N'PAY_OUT', N'', 0)
INSERT [dbo].[SequenceID] ([SequenceId], [ItemCode], [NowNumber]) VALUES (N'CASH_DECLARATION', N'', 0)
INSERT [dbo].[SequenceID] ([SequenceId], [ItemCode], [NowNumber]) VALUES (N'CASH_FLOAT', N'', 0)
INSERT [dbo].[SequenceID] ([SequenceId], [ItemCode], [NowNumber]) VALUES (N'DEPOSIT', N'', 0)
/****** Object:  Table [dbo].[SelfOrderingEvents]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SelfOrderingEvents](
	[TableNo] [nvarchar](10) NULL,
	[Events] [nvarchar](1) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_SelfOrderingEvents_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[SecondDisplayParams]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[SecondDisplayParams](
	[SDBorderColor] [int] NULL,
	[SDGradientStartColor] [int] NULL,
	[SDGradientEndColor] [int] NULL,
	[SDGradientDirection] [int] NULL,
	[FirstLineMessageFontColor] [int] NULL,
	[SecondLineMessageFontColor] [int] NULL,
	[SDStringGridFixedRowColor] [int] NULL,
	[SDTotalFontColor] [int] NULL,
	[SDStringGridFixedFontColor] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_SecondDisplayParams_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[RecvAcct]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[RecvAcct](
	[Transfer] [bit] NOT NULL,
	[OrderNo] [nvarchar](10) NULL,
	[AccountDate] [datetime] NULL,
	[PaidAmount] [float] NULL,
	[Payby] [nvarchar](25) NULL,
	[IDNo] [int] NULL,
	[OpName] [nvarchar](32) NULL,
	[MachineID] [nvarchar](15) NULL,
	[DepositID] [int] NULL,
	[GiftCardBalance] [float] NULL,
	[GiftCardExpireDate] [datetime] NULL,
	[Notes] [nvarchar](50) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[Surcharge] [decimal](20, 2) NOT NULL,
	[Tips] [decimal](20, 2) NOT NULL,
	[PaymentFlag] [int] NOT NULL,
	[GiftCardCode] [nvarchar](32) NULL,
	[RelatedRecvID] [int] NOT NULL,
	[PaymentActivityBuzId] [nvarchar](30) NULL,
 CONSTRAINT [PK_RecvAcct_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[PurchaseItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PurchaseItem](
	[Code] [nvarchar](8) NULL,
	[PurchaseNo] [nvarchar](8) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[GSTRate] [float] NULL,
	[ArrivedQty] [float] NULL,
	[ID] [smallint] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_PurchaseItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[PurchaseHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PurchaseHead](
	[SupplierCode] [nvarchar](15) NULL,
	[PurchaseDate] [datetime] NULL,
	[PurchaseNo] [nvarchar](8) NULL,
	[ReceiveNo] [nvarchar](8) NULL,
	[Cancel] [bit] NOT NULL,
	[GSTStatus] [bit] NOT NULL,
	[Notes] [nvarchar](200) NULL,
	[Delivery] [bit] NOT NULL,
	[DeliveryAddress] [nvarchar](150) NULL,
	[OpName] [nvarchar](15) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_PurchaseHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[Profile]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Profile](
	[BeginTime] [datetime] NULL,
	[CheckPassword] [bit] NOT NULL,
	[EndTime] [datetime] NULL,
	[MainCategoryLine] [int] NULL,
	[MainMenuLine] [int] NULL,
	[NotAllowModify] [bit] NOT NULL,
	[POSCategoryLine] [int] NULL,
	[POSMenuLine] [int] NULL,
	[CompanyName] [nvarchar](40) NULL,
	[Telephone] [nvarchar](15) NULL,
	[Fax] [nvarchar](15) NULL,
	[ABN] [nvarchar](15) NULL,
	[Address] [nvarchar](100) NULL,
	[Initial] [nvarchar](1) NULL,
	[ButtonLayOut] [int] NULL,
	[ServiceChargeRate] [float] NULL,
	[TableTracking] [bit] NOT NULL,
	[PersonCount] [bit] NOT NULL,
	[CheckTableStatus] [bit] NOT NULL,
	[PrintBillNo] [bit] NOT NULL,
	[RoundingFlag] [smallint] NULL,
	[ForceVIPDiscount] [bit] NOT NULL,
	[AutoOpenTill] [bit] NOT NULL,
	[AutoPrintJobList] [bit] NOT NULL,
	[PrintServiceOnJobList] [bit] NOT NULL,
	[PrintPersonsOnJobList] [bit] NOT NULL,
	[PrintPriceOnJobList] [bit] NOT NULL,
	[PrintTimeOnInvoice] [bit] NOT NULL,
	[HappyHour] [bit] NOT NULL,
	[HappyHourStartTime] [datetime] NULL,
	[HappyHourEndTime] [datetime] NULL,
	[ShowTaxOnSalesSection] [bit] NOT NULL,
	[POSJobList] [bit] NOT NULL,
	[POSOrderList] [bit] NOT NULL,
	[POSInvoice] [bit] NOT NULL,
	[PrintPickupSlip] [bit] NOT NULL,
	[PrintCategoryColor] [int] NULL,
	[OrderListDescription] [int] NULL,
	[InvoiceDescription] [int] NULL,
	[PrintBillCategory] [int] NULL,
	[PrintInvoiceCategory] [int] NULL,
	[VIPDefaultSearch] [int] NULL,
	[AutoPrintPhoneOrderJobList] [bit] NOT NULL,
	[AutoInstructionSelection] [bit] NOT NULL,
	[PrintTableNo] [bit] NOT NULL,
	[PrintDateOnDailyReport] [bit] NOT NULL,
	[AutoPrintBill] [bit] NOT NULL,
	[AutoPrintInvoice] [bit] NOT NULL,
	[AutoPriceWindow] [bit] NOT NULL,
	[PrintZeroPriceItemOnInvoice] [bit] NOT NULL,
	[AutoPopVoidReason] [bit] NULL,
	[ManuallyEnterTableNumber] [bit] NULL,
	[PrintInvoiceNo] [bit] NULL,
	[AutoSaveOrder] [bit] NULL,
	[ScaleBarcode] [int] NULL,
	[PrintGoWithInstruction] [bit] NULL,
	[PrintOpNameOnJobList] [bit] NULL,
	[AutoPrintMergedOrder] [bit] NULL,
	[AutoPrintJobListForHoldOrder] [bit] NULL,
	[AutoSurcharge] [bit] NULL,
	[SurchargeStartTime] [datetime] NULL,
	[SurchargeEndTime] [datetime] NULL,
	[HappyHourStartTime1] [datetime] NULL,
	[HappyHourEndTime1] [datetime] NULL,
	[HappyHourStartTime2] [datetime] NULL,
	[HappyHourEndTime2] [datetime] NULL,
	[HappyHourStartTime3] [datetime] NULL,
	[HappyHourEndTime3] [datetime] NULL,
	[HappyHourStartTime4] [datetime] NULL,
	[HappyHourEndTime4] [datetime] NULL,
	[HappyHourStartTime5] [datetime] NULL,
	[HappyHourEndTime5] [datetime] NULL,
	[HappyHourStartTime6] [datetime] NULL,
	[HappyHourEndTime6] [datetime] NULL,
	[SurchargeName] [nvarchar](25) NULL,
	[OtherCharge] [bit] NULL,
	[OtherChargeName] [nvarchar](25) NULL,
	[OtherChargeRate] [float] NULL,
	[PriceIncludesGST] [bit] NULL,
	[DefaultGSTRate] [float] NULL,
	[DefaultVIPState] [nvarchar](5) NULL,
	[PrintIngredientsOnJobList] [bit] NULL,
	[MaxDiscountPercentage] [float] NULL,
	[MaxDollarDiscount] [float] NULL,
	[JobListFontSize] [int] NULL,
	[DefaultBackupPath] [nvarchar](255) NULL,
	[ShowPrintInvoiceWindow] [bit] NULL,
	[ChangeQtyWithCondiment] [bit] NULL,
	[CompulsoryEnterCustomerName] [bit] NULL,
	[AutoPrintCheckList] [bit] NULL,
	[PrintOrderNoOnJobList] [bit] NULL,
	[AutoBackup] [bit] NULL,
	[BackupTime] [int] NULL,
	[PhoneOrderMenuLine] [int] NULL,
	[PhoneOrderCategoryLine] [int] NULL,
	[ManuallyPrintJobList] [bit] NULL,
	[PhoneOrderJobListFormat] [int] NULL,
	[BackupFrequency] [int] NULL,
	[BackupOnceTime] [datetime] NULL,
	[DiscountRateEnterMode] [int] NULL,
	[ShowNegativeQty] [bit] NULL,
	[PrintOrderNoOnTaxInvoice] [bit] NULL,
	[CheckListFormat] [int] NULL,
	[AutoLogout] [bit] NULL,
	[AutoLogoutTimeOut] [int] NULL,
	[PrintRedColorQtyOnJobList] [bit] NULL,
	[MinimumChargeKind] [int] NULL,
	[OnlyOpenDrawerForCashPayment] [bit] NULL,
	[MinimumChargeItemCode] [nvarchar](4) NULL,
	[MinimumChargePerPerson] [float] NULL,
	[PrintDiscountRateOnBill] [bit] NULL,
	[OnlyPrintSimpleFormatDailyReport] [bit] NULL,
	[OnlyPrintLastTwoDigitalOrderNo] [bit] NULL,
	[CheckPrinterStatus] [bit] NULL,
	[AutoPrintBillWhenPhoneOrderSaved] [bit] NULL,
	[AutoAddDeliveryChargeForPhoneOrder] [bit] NULL,
	[DeliveryChargeItemCode] [nvarchar](4) NULL,
	[PrintZeroQtyItemsOnJobList] [bit] NULL,
	[JobListFormatForPrinter1] [int] NULL,
	[JobListFormatForPrinter2] [int] NULL,
	[JobListFormatForPrinter3] [int] NULL,
	[JobListFormatForPrinter4] [int] NULL,
	[JobListFormatForPrinter5] [int] NULL,
	[JobListFormatForPrinter6] [int] NULL,
	[JobListFormatForPrinter7] [int] NULL,
	[JobListFormatForPrinter8] [int] NULL,
	[JobListFormatForPrinter9] [int] NULL,
	[JobListFormatForPrinter10] [int] NULL,
	[JobListFormatForPrinter11] [int] NULL,
	[JobListFormatForPrinter12] [int] NULL,
	[SecondDisplayDescription] [int] NULL,
	[ForceCashDeclaration] [bit] NULL,
	[SubMenuStyle] [int] NULL,
	[RemindVIPBirthday] [bit] NULL,
	[PrintOrderDateOnJobList] [bit] NULL,
	[AutoWeightScalableItem] [bit] NULL,
	[CheckListDescription] [int] NULL,
	[JobListRelateFormat] [int] NULL,
	[TableServiceJobListFormat] [int] NULL,
	[QuickServiceJobListFormat] [int] NULL,
	[PrintCustomerNameOnJobList] [bit] NULL,
	[DoNotPrintVoidItemsOnJobList] [bit] NULL,
	[PrintTableNumberChoice] [int] NULL,
	[EnableWeekendPriceFunction] [bit] NULL,
	[WeekendPriceStartDay] [int] NULL,
	[WeekendPriceEndDay] [int] NULL,
	[SelfOrderConsole] [bit] NULL,
	[KeepCancelSales] [bit] NULL,
	[PrintSpellInstructionOnBill] [bit] NULL,
	[PrintServicePeopleNameOnInvoice] [bit] NULL,
	[PrintTotalOnCheckList] [bit] NULL,
	[PrintCustomerDetailOnInvoice] [bit] NULL,
	[DefaultPhoneOrderKind] [int] NULL,
	[CustomerNameEnterKeypad] [int] NULL,
	[PrintItemInRedForJobList] [bit] NULL,
	[InstructionItemsPrintToOwnPrinters] [bit] NULL,
	[PrintVoidItemOnDailyReport] [bit] NULL,
	[PrintGroupSalesOnDailyReport] [bit] NULL,
	[PrintNonSalesOpenDrawerOnDailyReport] [bit] NULL,
	[EnableEatInTakeAwayFunction] [bit] NULL,
	[AutoSetPhoneOrderDueTime] [bit] NULL,
	[DefaultPhoneOrderDueTime] [int] NULL,
	[AutoIssueVoucher] [bit] NULL,
	[VoucherSalesAmount] [float] NULL,
	[VoucherDescription] [nvarchar](256) NULL,
	[PromotionDiscountTerm] [int] NULL,
	[SubMenuSortBy] [int] NULL,
	[LoyaltyReward] [bit] NULL,
	[RewardPointsRate] [float] NULL,
	[RedeemPointsRate] [float] NULL,
	[ConnectionKind] [int] NULL,
	[URL] [nvarchar](100) NULL,
	[RewardsKind] [int] NULL,
	[EnablePagerFunction] [bit] NULL,
	[ElapseTimeKind] [int] NULL,
	[DoNotPrintVoidItemOnInvoice] [bit] NULL,
	[KeypadButtonLinks] [int] NULL,
	[OnlyPrintNewItemOnCheckList] [bit] NULL,
	[PrintReprintSymbolOnJobList] [bit] NULL,
	[PrintOrderNumberOnInvoiceTop] [bit] NULL,
	[PrintOrderNumberOnBillTop] [bit] NULL,
	[DefaultServiceKind] [int] NULL,
	[ForceSelectPaymentMethod] [bit] NULL,
	[BookingTableStatusKind] [int] NULL,
	[PrintAmountOnPickupSlip] [bit] NULL,
	[EnterCustomerIDForHoldOrder] [bit] NULL,
	[PrintConsolidatedItemsOnJobList] [bit] NULL,
	[PrintTableMergeInformation] [bit] NULL,
	[PrintSeatNumberOnJobList] [bit] NULL,
	[PrintGratuityFillInSpaceOnBill] [bit] NULL,
	[PrintSmallFontForInstructionItemOnJobList] [bit] NULL,
	[PrintJobListAfterEachPayment] [bit] NULL,
	[AutoPrintAttendanceSlip] [bit] NULL,
	[DefaultStockItemSearch] [int] NULL,
	[ForceToOpenLockedTable] [bit] NULL,
	[ForceOpenLockedTableWithComfirmInfo] [bit] NULL,
	[JobListDescriptionforPrinter1] [int] NULL,
	[JobListDescriptionforPrinter2] [int] NULL,
	[JobListDescriptionforPrinter3] [int] NULL,
	[JobListDescriptionforPrinter4] [int] NULL,
	[JobListDescriptionforPrinter5] [int] NULL,
	[JobListDescriptionforPrinter6] [int] NULL,
	[JobListDescriptionforPrinter7] [int] NULL,
	[JobListDescriptionforPrinter8] [int] NULL,
	[JobListDescriptionforPrinter9] [int] NULL,
	[JobListDescriptionforPrinter10] [int] NULL,
	[JobListDescriptionforPrinter11] [int] NULL,
	[JobListDescriptionforPrinter12] [int] NULL,
	[JobListSecondDescription1] [int] NULL,
	[JobListSecondDescription2] [int] NULL,
	[JobListSecondDescription3] [int] NULL,
	[JobListSecondDescription4] [int] NULL,
	[JobListSecondDescription5] [int] NULL,
	[JobListSecondDescription6] [int] NULL,
	[JobListSecondDescription7] [int] NULL,
	[JobListSecondDescription8] [int] NULL,
	[JobListSecondDescription9] [int] NULL,
	[JobListSecondDescription10] [int] NULL,
	[JobListSecondDescription11] [int] NULL,
	[JobListSecondDescription12] [int] NULL,
	[UseOriginalItemPrice] [bit] NULL,
	[SaturdayWageRate] [float] NULL,
	[SundayWageRate] [float] NULL,
	[PublicHolidayWageRate] [float] NULL,
	[ShowSeatNumberAsSpellInstruction] [bit] NULL,
	[ForceSelectTakeAwayOrEatIn] [bit] NULL,
	[DefaultCreditCardSurchargeRate] [float] NULL,
	[PrintPaymentDetail] [bit] NULL,
	[JobListTimeFormat] [int] NULL,
	[ShowMemberIDOnOrderScreen] [bit] NULL,
	[OnlyShowMemberFirstName] [bit] NULL,
	[CheckVoucherIDViaInternet] [bit] NULL,
	[GiftcardExpireDays] [int] NULL,
	[AutoPrintParkingVoucher] [bit] NULL,
	[ResetMenuButtonForNewOrder] [bit] NULL,
	[ChioceMenuGroupForiMenu] [bit] NULL,
	[NotConsolidateForEachItemOnDifferentDockect] [bit] NULL,
	[EnablePresetNotes] [bit] NULL,
	[NotesAtJobListPosition] [int] NULL,
	[ShowNotesOnOrderForm] [bit] NULL,
	[CalculateOtherChargeKind] [int] NULL,
	[SmallButtonForQuickSales] [bit] NULL,
	[PaymentChangeForwardToTips] [bit] NULL,
	[PrintCreditCardPaymentOption] [bit] NULL,
	[EFTPOSPaymentSurchargeApplyToTips] [bit] NULL,
	[ShowElapseTime] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[DineInPriorityCheckout] [bit] NOT NULL,
	[SupportMultiLanguage] [bit] NOT NULL,
	[EnableDineIn] [bit] NOT NULL,
	[EnableTakeAway] [bit] NOT NULL,
	[EnableQuickService] [bit] NOT NULL,
	[LinkEFTPOSType] [int] NOT NULL,
	[AutoSendJobListToScreen] [int] NOT NULL,
	[KitchenScreenReminderTime] [int] NOT NULL,
	[BuzId] [bigint] NOT NULL,
	[EnableQuickCheckOut] [bit] NOT NULL,
	[EnableSpecialDay] [bit] NOT NULL,
	[BookingAccessKind] [int] NULL,
	[EnableDelivery] [bit] NOT NULL,
	[EnablePickUp] [bit] NOT NULL,
	[OrderTypeFirstChoice] [bit] NOT NULL,
	[PrintCourseItemVerbally] [bit] NOT NULL,
	[PrintCourseAndSendIfNeed] [bit] NOT NULL,
	[PrintCourseWhenCalled] [bit] NOT NULL,
	[PrintConsolidatedItemsOnInvoiceBill] [int] NOT NULL,
	[TableTimeLimit] [int] NOT NULL,
	[PrintMembershipQrcodeOnBill] [bit] NOT NULL,
	[PrintMembershipDescriptionOnBill] [nvarchar](100) NULL,
	[OrderItemNoteEnabled] [bit] NOT NULL,
	[OrderNoteEnabled] [bit] NOT NULL,
	[PrintPickNoOnCheckList] [bit] NOT NULL,
	[PrintOnlineNoOnJobList] [bit] NOT NULL,
	[PrintOrderNoOnLableJobList] [bit] NOT NULL,
	[PrintOnlineNoOnInvoiceBill] [bit] NOT NULL,
	[PrintConsolidatedInstructionsOnJobList] [bit] NOT NULL,
	[PrintConsolidatedInstructionsOnInvoiceBill] [bit] NOT NULL,
	[NotConsolidateForEachInsOnDifferentDockect] [bit] NOT NULL,
 CONSTRAINT [PK_Profile_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_Profile_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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
SET IDENTITY_INSERT [dbo].[Profile] ON
INSERT [dbo].[Profile] ([BeginTime], [CheckPassword], [EndTime], [MainCategoryLine], [MainMenuLine], [NotAllowModify], [POSCategoryLine], [POSMenuLine], [CompanyName], [Telephone], [Fax], [ABN], [Address], [Initial], [ButtonLayOut], [ServiceChargeRate], [TableTracking], [PersonCount], [CheckTableStatus], [PrintBillNo], [RoundingFlag], [ForceVIPDiscount], [AutoOpenTill], [AutoPrintJobList], [PrintServiceOnJobList], [PrintPersonsOnJobList], [PrintPriceOnJobList], [PrintTimeOnInvoice], [HappyHour], [HappyHourStartTime], [HappyHourEndTime], [ShowTaxOnSalesSection], [POSJobList], [POSOrderList], [POSInvoice], [PrintPickupSlip], [PrintCategoryColor], [OrderListDescription], [InvoiceDescription], [PrintBillCategory], [PrintInvoiceCategory], [VIPDefaultSearch], [AutoPrintPhoneOrderJobList], [AutoInstructionSelection], [PrintTableNo], [PrintDateOnDailyReport], [AutoPrintBill], [AutoPrintInvoice], [AutoPriceWindow], [PrintZeroPriceItemOnInvoice], [AutoPopVoidReason], [ManuallyEnterTableNumber], [PrintInvoiceNo], [AutoSaveOrder], [ScaleBarcode], [PrintGoWithInstruction], [PrintOpNameOnJobList], [AutoPrintMergedOrder], [AutoPrintJobListForHoldOrder], [AutoSurcharge], [SurchargeStartTime], [SurchargeEndTime], [HappyHourStartTime1], [HappyHourEndTime1], [HappyHourStartTime2], [HappyHourEndTime2], [HappyHourStartTime3], [HappyHourEndTime3], [HappyHourStartTime4], [HappyHourEndTime4], [HappyHourStartTime5], [HappyHourEndTime5], [HappyHourStartTime6], [HappyHourEndTime6], [SurchargeName], [OtherCharge], [OtherChargeName], [OtherChargeRate], [PriceIncludesGST], [DefaultGSTRate], [DefaultVIPState], [PrintIngredientsOnJobList], [MaxDiscountPercentage], [MaxDollarDiscount], [JobListFontSize], [DefaultBackupPath], [ShowPrintInvoiceWindow], [ChangeQtyWithCondiment], [CompulsoryEnterCustomerName], [AutoPrintCheckList], [PrintOrderNoOnJobList], [AutoBackup], [BackupTime], [PhoneOrderMenuLine], [PhoneOrderCategoryLine], [ManuallyPrintJobList], [PhoneOrderJobListFormat], [BackupFrequency], [BackupOnceTime], [DiscountRateEnterMode], [ShowNegativeQty], [PrintOrderNoOnTaxInvoice], [CheckListFormat], [AutoLogout], [AutoLogoutTimeOut], [PrintRedColorQtyOnJobList], [MinimumChargeKind], [OnlyOpenDrawerForCashPayment], [MinimumChargeItemCode], [MinimumChargePerPerson], [PrintDiscountRateOnBill], [OnlyPrintSimpleFormatDailyReport], [OnlyPrintLastTwoDigitalOrderNo], [CheckPrinterStatus], [AutoPrintBillWhenPhoneOrderSaved], [AutoAddDeliveryChargeForPhoneOrder], [DeliveryChargeItemCode], [PrintZeroQtyItemsOnJobList], [JobListFormatForPrinter1], [JobListFormatForPrinter2], [JobListFormatForPrinter3], [JobListFormatForPrinter4], [JobListFormatForPrinter5], [JobListFormatForPrinter6], [JobListFormatForPrinter7], [JobListFormatForPrinter8], [JobListFormatForPrinter9], [JobListFormatForPrinter10], [JobListFormatForPrinter11], [JobListFormatForPrinter12], [SecondDisplayDescription], [ForceCashDeclaration], [SubMenuStyle], [RemindVIPBirthday], [PrintOrderDateOnJobList], [AutoWeightScalableItem], [CheckListDescription], [JobListRelateFormat], [TableServiceJobListFormat], [QuickServiceJobListFormat], [PrintCustomerNameOnJobList], [DoNotPrintVoidItemsOnJobList], [PrintTableNumberChoice], [EnableWeekendPriceFunction], [WeekendPriceStartDay], [WeekendPriceEndDay], [SelfOrderConsole], [KeepCancelSales], [PrintSpellInstructionOnBill], [PrintServicePeopleNameOnInvoice], [PrintTotalOnCheckList], [PrintCustomerDetailOnInvoice], [DefaultPhoneOrderKind], [CustomerNameEnterKeypad], [PrintItemInRedForJobList], [InstructionItemsPrintToOwnPrinters], [PrintVoidItemOnDailyReport], [PrintGroupSalesOnDailyReport], [PrintNonSalesOpenDrawerOnDailyReport], [EnableEatInTakeAwayFunction], [AutoSetPhoneOrderDueTime], [DefaultPhoneOrderDueTime], [AutoIssueVoucher], [VoucherSalesAmount], [VoucherDescription], [PromotionDiscountTerm], [SubMenuSortBy], [LoyaltyReward], [RewardPointsRate], [RedeemPointsRate], [ConnectionKind], [URL], [RewardsKind], [EnablePagerFunction], [ElapseTimeKind], [DoNotPrintVoidItemOnInvoice], [KeypadButtonLinks], [OnlyPrintNewItemOnCheckList], [PrintReprintSymbolOnJobList], [PrintOrderNumberOnInvoiceTop], [PrintOrderNumberOnBillTop], [DefaultServiceKind], [ForceSelectPaymentMethod], [BookingTableStatusKind], [PrintAmountOnPickupSlip], [EnterCustomerIDForHoldOrder], [PrintConsolidatedItemsOnJobList], [PrintTableMergeInformation], [PrintSeatNumberOnJobList], [PrintGratuityFillInSpaceOnBill], [PrintSmallFontForInstructionItemOnJobList], [PrintJobListAfterEachPayment], [AutoPrintAttendanceSlip], [DefaultStockItemSearch], [ForceToOpenLockedTable], [ForceOpenLockedTableWithComfirmInfo], [JobListDescriptionforPrinter1], [JobListDescriptionforPrinter2], [JobListDescriptionforPrinter3], [JobListDescriptionforPrinter4], [JobListDescriptionforPrinter5], [JobListDescriptionforPrinter6], [JobListDescriptionforPrinter7], [JobListDescriptionforPrinter8], [JobListDescriptionforPrinter9], [JobListDescriptionforPrinter10], [JobListDescriptionforPrinter11], [JobListDescriptionforPrinter12], [JobListSecondDescription1], [JobListSecondDescription2], [JobListSecondDescription3], [JobListSecondDescription4], [JobListSecondDescription5], [JobListSecondDescription6], [JobListSecondDescription7], [JobListSecondDescription8], [JobListSecondDescription9], [JobListSecondDescription10], [JobListSecondDescription11], [JobListSecondDescription12], [UseOriginalItemPrice], [SaturdayWageRate], [SundayWageRate], [PublicHolidayWageRate], [ShowSeatNumberAsSpellInstruction], [ForceSelectTakeAwayOrEatIn], [DefaultCreditCardSurchargeRate], [PrintPaymentDetail], [JobListTimeFormat], [ShowMemberIDOnOrderScreen], [OnlyShowMemberFirstName], [CheckVoucherIDViaInternet], [GiftcardExpireDays], [AutoPrintParkingVoucher], [ResetMenuButtonForNewOrder], [ChioceMenuGroupForiMenu], [NotConsolidateForEachItemOnDifferentDockect], [EnablePresetNotes], [NotesAtJobListPosition], [ShowNotesOnOrderForm], [CalculateOtherChargeKind], [SmallButtonForQuickSales], [PaymentChangeForwardToTips], [PrintCreditCardPaymentOption], [EFTPOSPaymentSurchargeApplyToTips], [ShowElapseTime], [PId], [DineInPriorityCheckout], [SupportMultiLanguage], [EnableDineIn], [EnableTakeAway], [EnableQuickService], [LinkEFTPOSType], [AutoSendJobListToScreen], [KitchenScreenReminderTime], [BuzId], [EnableQuickCheckOut], [EnableSpecialDay], [BookingAccessKind], [EnableDelivery], [EnablePickUp], [OrderTypeFirstChoice], [PrintCourseItemVerbally], [PrintCourseAndSendIfNeed], [PrintCourseWhenCalled], [PrintConsolidatedItemsOnInvoiceBill], [TableTimeLimit], [PrintMembershipQrcodeOnBill], [PrintMembershipDescriptionOnBill], [OrderItemNoteEnabled], [OrderNoteEnabled], [PrintPickNoOnCheckList], [PrintOnlineNoOnJobList], [PrintOrderNoOnLableJobList], [PrintOnlineNoOnInvoiceBill], [PrintConsolidatedInstructionsOnJobList], [PrintConsolidatedInstructionsOnInvoiceBill], [NotConsolidateForEachInsOnDifferentDockect]) VALUES (CAST(0x0000AEBB00000000 AS DateTime), 0, CAST(0x0000AEBB018B3BB0 AS DateTime), 3, 10, 0, 3, 10, N'ZIITECH PTY LTD', N'03 0000 0000', NULL, N'00000000000', N'49 Whitehorse Rd, Deepdene 3103', N'A', 1, 10, 0, 0, 0, 1, 2, 1, 0, 1, 1, 1, 0, 0, 0, CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 3, 1, 1, 1, 1, 0, CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), CAST(0x0000AEBB00000000 AS DateTime), CAST(0x0000AEBB018B3BB0 AS DateTime), N'Service Fee', 0, N'Other Charges', 0, 1, 10, N'VIC', 0, 10, 0, 1, N'C:\Users\ZiiTech\Desktop', 1, 0, 0, 0, 1, 1, 0, 10, 3, 0, 0, 1, CAST(0xFFFFFFFE00A4CB80 AS DateTime), 0, 1, 1, 1, 0, 0, 0, 0, 0, N'Z006', 20, 0, 1, 0, 0, 1, 0, NULL, 1, 0, 1, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 5, 6, 0, 1, 1, 1, 1, 1, 3, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, NULL, 0, 0, 1, 1, 10, 1, NULL, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.25, 1.5, 2, 0, 0, 0, 1, 0, 0, 0, 0, 90, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 31, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, N'', 1, 0, 1, 1, 0, 1, 0, 0, 0)
SET IDENTITY_INSERT [dbo].[Profile] OFF
/****** Object:  Table [dbo].[printjob]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[printjob](
	[JobId] [nvarchar](50) NOT NULL,
	[InvokeType] [int] NOT NULL,
	[JobKind] [int] NOT NULL,
	[BusinessNo] [nvarchar](50) NULL,
	[BusinessAttach] [nvarchar](4000) NULL,
	[PrintAll] [bit] NOT NULL,
	[IsReprint] [bit] NOT NULL,
	[MachineID] [nvarchar](50) NULL,
	[Copies] [int] NOT NULL,
	[OpName] [nvarchar](50) NULL,
	[CreateAt] [datetime] NOT NULL,
	[PrintResult] [int] NOT NULL,
	[UpdateAt] [datetime] NOT NULL,
	[PrintMessage] [nvarchar](200) NULL,
	[RetryTimes] [int] NOT NULL,
 CONSTRAINT [ix_printjob_jobid] UNIQUE NONCLUSTERED 
(
	[JobId] 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].[PrinterDeviceItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PrinterDeviceItem](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[PrinterNo] [int] NOT NULL,
	[ModelType] [nvarchar](50) NULL,
	[PortType] [nvarchar](50) NULL,
	[PortSetting] [nvarchar](50) NULL,
	[PrinterName] [nvarchar](50) NULL,
	[TableOrderJobListTitle] [nvarchar](50) NOT NULL,
	[QuickServiceJobListTitle] [nvarchar](50) NOT NULL,
	[PhoneOrderJobListTitle] [nvarchar](50) NOT NULL,
	[JobListDuplicate] [bit] NOT NULL,
	[GoWithMessage] [bit] NOT NULL,
	[SupportGraphic] [bit] NOT NULL,
	[Thermal] [bit] NOT NULL,
	[JobListCopies] [int] NOT NULL,
 CONSTRAINT [PK_PrinterDeviceItem] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[PrinterDeviceItem] ON
INSERT [dbo].[PrinterDeviceItem] ([PId], [PrinterNo], [ModelType], [PortType], [PortSetting], [PrinterName], [TableOrderJobListTitle], [QuickServiceJobListTitle], [PhoneOrderJobListTitle], [JobListDuplicate], [GoWithMessage], [SupportGraphic], [Thermal], [JobListCopies]) VALUES (1, 1, N'TP809', N'NET', N'127.0.0.1', NULL, N'JOB LIST', N'JOB LIST', N'JOB LIST', 0, 1, 0, 0, 1)
SET IDENTITY_INSERT [dbo].[PrinterDeviceItem] OFF
/****** Object:  Table [dbo].[PrinterDevice]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PrinterDevice](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[DefaultPrinterIDNo] [int] NULL,
	[MobileDefaultPrinterIDNo] [int] NULL,
	[CheckListPrinterIDNo] [int] NULL,
	[SupportChinese] [bit] NULL,
	[PrintLogoOnPOSPrinter] [bit] NULL,
	[FeedLinesBeforeCut] [int] NULL,
	[FeedLinesBeforePringJob] [int] NULL,
	[DefaultDrawerNo] [nvarchar](4) NULL,
	[IntegratedEFTReceipt] [bit] NOT NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_PrinterDevice] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_PrinterDevice_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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
SET IDENTITY_INSERT [dbo].[PrinterDevice] ON
INSERT [dbo].[PrinterDevice] ([PId], [DefaultPrinterIDNo], [MobileDefaultPrinterIDNo], [CheckListPrinterIDNo], [SupportChinese], [PrintLogoOnPOSPrinter], [FeedLinesBeforeCut], [FeedLinesBeforePringJob], [DefaultDrawerNo], [IntegratedEFTReceipt], [BuzId]) VALUES (1, 1, 0, 1, 1, 0, 0, 0, N'1   ', 0, 1)
SET IDENTITY_INSERT [dbo].[PrinterDevice] OFF
/****** Object:  Table [dbo].[PrintCondition]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PrintCondition](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[BillCondition] [nvarchar](255) NULL,
	[InvoiceCondition] [nvarchar](255) NULL,
	[BookingFormCondition] [nvarchar](255) NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_PrintCondition] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_PrintCondition_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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
SET IDENTITY_INSERT [dbo].[PrintCondition] ON
INSERT [dbo].[PrintCondition] ([PId], [BillCondition], [InvoiceCondition], [BookingFormCondition], [BuzId]) VALUES (1, NULL, NULL, NULL, 1)
SET IDENTITY_INSERT [dbo].[PrintCondition] OFF
/****** Object:  Table [dbo].[PresetNotes]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PresetNotes](
	[Code] [nvarchar](2) NOT NULL,
	[Notes] [nvarchar](80) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_PresetNotes_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[PresetNoteGroup]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PresetNoteGroup](
	[NoteGroupCode] [nvarchar](20) NULL,
	[NoteGroupName1] [nvarchar](50) NULL,
	[NoteGroupName2] [nvarchar](50) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[NoteGroupName3] [nvarchar](50) NULL,
	[NoteGroupName4] [nvarchar](50) NULL,
 CONSTRAINT [PK_PresetNoteGroup_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[PresetNote]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PresetNote](
	[BuzId] [bigint] NOT NULL,
	[Notes1] [nvarchar](50) NULL,
	[Notes2] [nvarchar](50) NULL,
	[Active] [bit] NOT NULL,
	[NoteGroupCode] [nvarchar](20) NULL,
	[OrderIndex] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[Notes3] [nvarchar](50) NULL,
	[Notes4] [nvarchar](50) NULL,
 CONSTRAINT [PK_PresetNote_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_PresetNote_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[PictureMeta]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PictureMeta](
	[MetaId] [nvarchar](50) NOT NULL,
	[MetaType] [int] NOT NULL,
	[PicturePath] [nvarchar](1000) NULL,
	[Disabled] [bit] NOT NULL,
	[SortCode] [nvarchar](50) NULL,
	[UpdateAt] [datetime] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[PictureCloudAddr] [nvarchar](1000) NULL,
PRIMARY KEY CLUSTERED 
(
	[PId] 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].[PayOutTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PayOutTable](
	[PaymentDate] [datetime] NULL,
	[Amount] [float] NULL,
	[OpName] [nvarchar](15) NULL,
	[Description] [nvarchar](200) NULL,
	[MachineID] [nvarchar](15) NULL,
	[ID] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_PayOutTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[Payment]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Payment](
	[ShowOnList] [bit] NOT NULL,
	[Payment] [nvarchar](25) NULL,
	[SurchargeRate] [float] NULL,
	[Code] [nvarchar](3) NULL,
	[EFTPOSPayment] [bit] NULL,
	[LinkToDevice] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[CounterPayment] [bit] NOT NULL,
	[SupportCasher] [bit] NOT NULL,
	[SupportSelfPad] [bit] NOT NULL,
	[OrderIndex] [int] NOT NULL,
	[SupportOrderingTerminal] [bit] NOT NULL,
 CONSTRAINT [PK_Payment_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[Payment] ON
INSERT [dbo].[Payment] ([ShowOnList], [Payment], [SurchargeRate], [Code], [EFTPOSPayment], [LinkToDevice], [PId], [CounterPayment], [SupportCasher], [SupportSelfPad], [OrderIndex], [SupportOrderingTerminal]) VALUES (1, N'CASH', 0, N'001', 0, 0, 1, 0, 1, 0, 0, 1)
INSERT [dbo].[Payment] ([ShowOnList], [Payment], [SurchargeRate], [Code], [EFTPOSPayment], [LinkToDevice], [PId], [CounterPayment], [SupportCasher], [SupportSelfPad], [OrderIndex], [SupportOrderingTerminal]) VALUES (1, N'EFTPOS', 0, N'002', 1, 0, 2, 0, 1, 1, 1, 1)
INSERT [dbo].[Payment] ([ShowOnList], [Payment], [SurchargeRate], [Code], [EFTPOSPayment], [LinkToDevice], [PId], [CounterPayment], [SupportCasher], [SupportSelfPad], [OrderIndex], [SupportOrderingTerminal]) VALUES (0, N'ROUNDING', 0, N'006', 1, 0, 5, 0, 1, 1, 2, 1)
SET IDENTITY_INSERT [dbo].[Payment] OFF
/****** Object:  Table [dbo].[PayAcct]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[PayAcct](
	[ReceiveNo] [nvarchar](8) NULL,
	[AccountDate] [datetime] NULL,
	[PaidAmount] [float] NULL,
	[PayBy] [nvarchar](25) NULL,
	[Notes] [nvarchar](25) NULL,
	[IDNo] [smallint] NULL,
	[Transfer] [bit] NOT NULL,
	[OpName] [nvarchar](15) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_PayAcct_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[OrganizationSetting]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrganizationSetting](
	[MerId] [nvarchar](50) NOT NULL,
	[BranId] [nvarchar](50) NOT NULL,
	[EncryptSystemToken] [nvarchar](255) NULL,
	[BranchZoneId] [nvarchar](50) NULL,
	[Live] [bit] NOT NULL,
	[LicenseCode] [text] NULL,
	[EnableServer] [bit] NOT NULL,
	[EnableOnlineOrder] [bit] NOT NULL,
	[EnableReservation] [bit] NOT NULL,
	[SysDeployModel] [int] NOT NULL,
 CONSTRAINT [ix_orgsetting_merId_branid] UNIQUE NONCLUSTERED 
(
	[MerId] ASC,
	[BranId] 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].[BookDetail]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BookDetail](
	[BookingNo] [nvarchar](8) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[PriceSelect] [smallint] NULL,
	[Condition] [smallint] NULL,
	[TaxRate] [float] NULL,
	[SpecialOrder] [nvarchar](255) NULL,
	[IDNo] [smallint] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_BookDetail_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[BankTransaction]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BankTransaction](
	[AccountNo] [nvarchar](20) NULL,
	[AcctDate] [datetime] NULL,
	[Credit] [float] NULL,
	[Debit] [float] NULL,
	[Reference] [nvarchar](20) NULL,
	[Notes] [nvarchar](60) NULL,
	[IDNo] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_BankTransaction_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[BankHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BankHead](
	[BankName] [nvarchar](30) NULL,
	[AccountNo] [nvarchar](20) NULL,
	[AccountName] [nvarchar](30) NULL,
	[CreateDate] [datetime] NULL,
	[OpeningBalance] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_BankHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[Attendance]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Attendance](
	[StaffName] [nvarchar](15) NULL,
	[LoginTime] [datetime] NULL,
	[LogoutTime] [datetime] NULL,
	[IDNo] [int] NULL,
	[updateAt] [timestamp] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[StaffCode] [nvarchar](50) NOT NULL,
	[BuzId] [bigint] NOT NULL,
	[Type] [int] NOT NULL,
	[TimeSheetBuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_Attendance_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[AccessMenu]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[AccessMenu](
	[AuthoriseCloseWindow] [bit] NOT NULL,
	[AuthoriseDiscount] [bit] NOT NULL,
	[BookingFormConditionSetupMenu] [bit] NOT NULL,
	[DailyReportMenu] [bit] NOT NULL,
	[DatabaseBackupMenu] [bit] NOT NULL,
	[DatabaseRestoreMenu] [bit] NOT NULL,
	[InvoiceConditionSetupMenu] [bit] NOT NULL,
	[OpenCashDrawerMenu] [bit] NOT NULL,
	[PaymentAuthority] [bit] NOT NULL,
	[PrintInvoiceAuthority] [bit] NOT NULL,
	[PrintJobListAuthority] [bit] NOT NULL,
	[TableInformationSetupMenu] [bit] NOT NULL,
	[StaffName] [nvarchar](15) NULL,
	[SecureCode] [nvarchar](16) NULL,
	[Supervisor] [bit] NOT NULL,
	[BookingListMenu] [bit] NOT NULL,
	[StockReceiveMenu] [bit] NOT NULL,
	[InquirySalesHistoryMenu] [bit] NOT NULL,
	[VIPInformationMenu] [bit] NOT NULL,
	[SalesReportMenu] [bit] NOT NULL,
	[SalesStatisticsReportMenu] [bit] NOT NULL,
	[StockReportMenu] [bit] NOT NULL,
	[StockReceiveReportMenu] [bit] NOT NULL,
	[StatisticsChartMenu] [bit] NOT NULL,
	[SupplierInformationListMenu] [bit] NOT NULL,
	[ExpensesDescriptionSetupMenu] [bit] NOT NULL,
	[ExpensesDataEntryMenu] [bit] NOT NULL,
	[ExpensesReportMenu] [bit] NOT NULL,
	[ReceiptsReportMenu] [bit] NOT NULL,
	[PaymentsReportMenu] [bit] NOT NULL,
	[GSTPayableReportMenu] [bit] NOT NULL,
	[ProfileSetupMenu] [bit] NOT NULL,
	[PrinterSetupMenu] [bit] NOT NULL,
	[CategorySetupMenu] [bit] NOT NULL,
	[MenuSetupMenu] [bit] NOT NULL,
	[PaymentsMethodSetupMenu] [bit] NOT NULL,
	[SupplierInformationSetupMenu] [bit] NOT NULL,
	[Birthday] [datetime] NULL,
	[Telephone] [nvarchar](15) NULL,
	[Mobile] [nvarchar](15) NULL,
	[Fax] [nvarchar](15) NULL,
	[Address] [nvarchar](100) NULL,
	[Rate] [float] NULL,
	[AttendanceReportMenu] [bit] NOT NULL,
	[VoidItemAuthority] [bit] NOT NULL,
	[PurchaseOrderMenu] [bit] NOT NULL,
	[PurchasePayableMenu] [bit] NOT NULL,
	[TableOrderMenu] [bit] NOT NULL,
	[PointOfSalesMenu] [bit] NOT NULL,
	[CheckDailyReport] [bit] NOT NULL,
	[AuthoriseRefund] [bit] NOT NULL,
	[UserManager] [bit] NOT NULL,
	[AllowEditOrder] [bit] NOT NULL,
	[PrintDailyReport] [bit] NULL,
	[DrawerPortNumber] [int] NULL,
	[DefaultDrawerPortNumber] [int] NULL,
	[EditAttendanceRecord] [bit] NULL,
	[StockAdjustmentMenu] [bit] NULL,
	[StockAdjustmentReportMenu] [bit] NULL,
	[PhoneOrderMenu] [bit] NULL,
	[CashPayOutMenu] [bit] NULL,
	[CashFloatMenu] [bit] NULL,
	[AssignDriverAuthorised] [bit] NULL,
	[DepositMenu] [bit] NULL,
	[WastageMenu] [bit] NULL,
	[WastageReportMenu] [bit] NULL,
	[AuthrisedCancelHoldOrder] [bit] NULL,
	[ManuallyEnterDiscountRate] [bit] NULL,
	[EditOrderPayment] [bit] NULL,
	[InquirySalesRelatedReportDays] [int] NULL,
	[CashDeclarationReportMenu] [bit] NULL,
	[AccountEnabled] [bit] NULL,
	[AuthorizedChangeQty] [bit] NULL,
	[AuthorizedChangePrice] [bit] NULL,
	[DeleteVIPRecord] [bit] NULL,
	[ControlButtonSetup] [bit] NULL,
	[DiscountRateSetup] [bit] NULL,
	[VoidItemDescriptionSetup] [bit] NULL,
	[EFTPOSUtility] [bit] NULL,
	[ChangeMenuStatus] [bit] NULL,
	[StockTakeMenu] [bit] NULL,
	[StockTakeReportMenu] [bit] NULL,
	[UserGroupSetupAuthorized] [bit] NULL,
	[UploadMembersRewardsMenu] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[SettingsPortalMenu] [bit] NOT NULL,
	[ZiiTOTableLockMenu] [bit] NOT NULL,
	[StaffCode] [nvarchar](50) NULL,
	[LastUpdatedTime] [datetime] NOT NULL,
	[FirstName] [nvarchar](32) NOT NULL,
	[LastName] [nvarchar](32) NOT NULL,
	[ZiiOnlineOrderCancel] [bit] NOT NULL,
	[OverrideSalesPrice] [bit] NOT NULL,
 CONSTRAINT [PK_AccessMenu_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[AccessMenu] ON
INSERT [dbo].[AccessMenu] ([AuthoriseCloseWindow], [AuthoriseDiscount], [BookingFormConditionSetupMenu], [DailyReportMenu], [DatabaseBackupMenu], [DatabaseRestoreMenu], [InvoiceConditionSetupMenu], [OpenCashDrawerMenu], [PaymentAuthority], [PrintInvoiceAuthority], [PrintJobListAuthority], [TableInformationSetupMenu], [StaffName], [SecureCode], [Supervisor], [BookingListMenu], [StockReceiveMenu], [InquirySalesHistoryMenu], [VIPInformationMenu], [SalesReportMenu], [SalesStatisticsReportMenu], [StockReportMenu], [StockReceiveReportMenu], [StatisticsChartMenu], [SupplierInformationListMenu], [ExpensesDescriptionSetupMenu], [ExpensesDataEntryMenu], [ExpensesReportMenu], [ReceiptsReportMenu], [PaymentsReportMenu], [GSTPayableReportMenu], [ProfileSetupMenu], [PrinterSetupMenu], [CategorySetupMenu], [MenuSetupMenu], [PaymentsMethodSetupMenu], [SupplierInformationSetupMenu], [Birthday], [Telephone], [Mobile], [Fax], [Address], [Rate], [AttendanceReportMenu], [VoidItemAuthority], [PurchaseOrderMenu], [PurchasePayableMenu], [TableOrderMenu], [PointOfSalesMenu], [CheckDailyReport], [AuthoriseRefund], [UserManager], [AllowEditOrder], [PrintDailyReport], [DrawerPortNumber], [DefaultDrawerPortNumber], [EditAttendanceRecord], [StockAdjustmentMenu], [StockAdjustmentReportMenu], [PhoneOrderMenu], [CashPayOutMenu], [CashFloatMenu], [AssignDriverAuthorised], [DepositMenu], [WastageMenu], [WastageReportMenu], [AuthrisedCancelHoldOrder], [ManuallyEnterDiscountRate], [EditOrderPayment], [InquirySalesRelatedReportDays], [CashDeclarationReportMenu], [AccountEnabled], [AuthorizedChangeQty], [AuthorizedChangePrice], [DeleteVIPRecord], [ControlButtonSetup], [DiscountRateSetup], [VoidItemDescriptionSetup], [EFTPOSUtility], [ChangeMenuStatus], [StockTakeMenu], [StockTakeReportMenu], [UserGroupSetupAuthorized], [UploadMembersRewardsMenu], [PId], [SettingsPortalMenu], [ZiiTOTableLockMenu], [StaffCode], [LastUpdatedTime], [FirstName], [LastName], [ZiiOnlineOrderCancel], [OverrideSalesPrice]) VALUES (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, N'SUPERVISOR', N'0000', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, CAST(0xFFFFFFFE00000000 AS DateTime), NULL, NULL, NULL, NULL, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 0, N'2387A2E9-4F50-4A30-8D9D-DF53B8E83F22', CAST(0x0000000000000000 AS DateTime), N'', N'', 0, 1)
SET IDENTITY_INSERT [dbo].[AccessMenu] OFF
/****** Object:  Table [dbo].[Category]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Category](
	[ButtonColor] [int] NULL,
	[Code] [nvarchar](3) NULL,
	[FontColor] [int] NULL,
	[ShowOnMainMenu] [bit] NOT NULL,
	[ShowOnPOSMenu] [bit] NOT NULL,
	[Category] [nvarchar](25) NULL,
	[FontName] [nvarchar](50) NULL,
	[FontSize] [int] NULL,
	[FontBold] [bit] NOT NULL,
	[FontItalic] [bit] NOT NULL,
	[FontUnderline] [bit] NOT NULL,
	[FontStrikeout] [bit] NOT NULL,
	[Category1] [nvarchar](25) NULL,
	[MenuGroupCode] [nvarchar](2) NULL,
	[ButtonColor1] [int] NULL,
	[FontName1] [nvarchar](50) NULL,
	[FontColor1] [int] NULL,
	[FontSize1] [int] NULL,
	[FontBold1] [bit] NULL,
	[FontItalic1] [bit] NULL,
	[FontUnderline1] [bit] NULL,
	[FontStrikeout1] [bit] NULL,
	[ShowOnPhoneOrderMenu] [bit] NULL,
	[Category2] [nvarchar](25) NULL,
	[Category3] [nvarchar](25) NULL,
	[Enable] [bit] NULL,
	[Notes] [nvarchar](20) NULL,
	[ShowOnSelfOrderMenu] [bit] NULL,
	[OnlineOrderCategory] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[OrderIndex] [int] NOT NULL,
	[CourseCode] [nvarchar](20) NULL,
	[ShowOnDineInMenu] [bit] NOT NULL,
	[ShowOnTakeawayMenu] [bit] NOT NULL,
	[ShowOnQuickSaleMenu] [bit] NOT NULL,
	[ShowOnDeliveryMenu] [bit] NOT NULL,
	[ShowOnPickupMenu] [bit] NOT NULL,
	[MinimumChoiceQty] [int] NOT NULL,
	[MaximumChoiceQty] [int] NOT NULL,
	[OnlineStatus] [bit] NOT NULL,
	[QRCodeStatus] [bit] NOT NULL,
	[BorderColor] [nvarchar](32) NULL,
	[OnlineDisplayName1] [nvarchar](100) NULL,
	[OnlineDisplayName2] [nvarchar](100) NULL,
 CONSTRAINT [PK_Category_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[Category] ON
INSERT [dbo].[Category] ([ButtonColor], [Code], [FontColor], [ShowOnMainMenu], [ShowOnPOSMenu], [Category], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Category1], [MenuGroupCode], [ButtonColor1], [FontName1], [FontColor1], [FontSize1], [FontBold1], [FontItalic1], [FontUnderline1], [FontStrikeout1], [ShowOnPhoneOrderMenu], [Category2], [Category3], [Enable], [Notes], [ShowOnSelfOrderMenu], [OnlineOrderCategory], [PId], [OrderIndex], [CourseCode], [ShowOnDineInMenu], [ShowOnTakeawayMenu], [ShowOnQuickSaleMenu], [ShowOnDeliveryMenu], [ShowOnPickupMenu], [MinimumChoiceQty], [MaximumChoiceQty], [OnlineStatus], [QRCodeStatus], [BorderColor], [OnlineDisplayName1], [OnlineDisplayName2]) VALUES (0, N'001', 0, 1, 1, N'Food', NULL, 0, 0, 0, 0, 0, N'', NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 1, N'', N'', 1, NULL, 1, 1, 1, 0, NULL, 1, 1, 1, 1, 1, 0, 0, 1, 1, N'', N'', N'')
INSERT [dbo].[Category] ([ButtonColor], [Code], [FontColor], [ShowOnMainMenu], [ShowOnPOSMenu], [Category], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Category1], [MenuGroupCode], [ButtonColor1], [FontName1], [FontColor1], [FontSize1], [FontBold1], [FontItalic1], [FontUnderline1], [FontStrikeout1], [ShowOnPhoneOrderMenu], [Category2], [Category3], [Enable], [Notes], [ShowOnSelfOrderMenu], [OnlineOrderCategory], [PId], [OrderIndex], [CourseCode], [ShowOnDineInMenu], [ShowOnTakeawayMenu], [ShowOnQuickSaleMenu], [ShowOnDeliveryMenu], [ShowOnPickupMenu], [MinimumChoiceQty], [MaximumChoiceQty], [OnlineStatus], [QRCodeStatus], [BorderColor], [OnlineDisplayName1], [OnlineDisplayName2]) VALUES (0, N'002', 0, 1, 1, N'Drink', NULL, 0, 0, 0, 0, 0, N'', NULL, 0, NULL, 0, 0, 0, 0, 0, 0, 1, N'', N'', 1, NULL, 1, 1, 2, 0, NULL, 1, 1, 1, 1, 1, 0, 0, 1, 1, N'', N'', N'')
SET IDENTITY_INSERT [dbo].[Category] OFF
/****** Object:  Table [dbo].[CashFloatTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CashFloatTable](
	[OpDate] [datetime] NULL,
	[CashIn] [float] NULL,
	[CashOut] [float] NULL,
	[OpName] [nvarchar](15) NULL,
	[MachineID] [nvarchar](15) NULL,
	[ID] [int] NULL,
	[Description] [nvarchar](200) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_CashFloatTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[CashDeclaration]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CashDeclaration](
	[StaffName] [nvarchar](15) NULL,
	[MachineID] [nvarchar](25) NULL,
	[StartDateTime] [datetime] NULL,
	[EndDateTime] [datetime] NULL,
	[Opening] [float] NULL,
	[HundredDollar] [int] NULL,
	[FiftyDollar] [int] NULL,
	[TwentyDollar] [int] NULL,
	[TenDollar] [int] NULL,
	[FiveDollar] [int] NULL,
	[TwoDollar] [int] NULL,
	[OneDollar] [int] NULL,
	[FiftyCent] [int] NULL,
	[TwentyCent] [int] NULL,
	[TenCent] [int] NULL,
	[FiveCent] [int] NULL,
	[TransactionDate] [datetime] NULL,
	[LastEditor] [nvarchar](15) NULL,
	[LastEditDate] [datetime] NULL,
	[IsOpening] [bit] NULL,
	[ID] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[Reason] [nvarchar](50) NULL,
 CONSTRAINT [PK_CashDeclaration_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[CancelSalesItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CancelSalesItem](
	[OrderNo] [nvarchar](10) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[PriceSelect] [int] NULL,
	[DiscountRate] [float] NULL,
	[Instruction] [int] NULL,
	[ID] [int] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[Condition] [smallint] NULL,
	[CategoryCode] [nvarchar](25) NOT NULL,
 CONSTRAINT [PK_CancelSalesItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[CancelSalesHead]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CancelSalesHead](
	[OrderNo] [nvarchar](10) NULL,
	[OrderDate] [datetime] NULL,
	[Operator] [nvarchar](15) NULL,
	[MachineID] [nvarchar](20) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[TableNo] [nvarchar](20) NULL,
	[BillKind] [int] NULL,
	[SourceKind] [int] NOT NULL,
	[CreateAt] [datetime] NULL,
	[SourceOrderType] [int] NOT NULL,
 CONSTRAINT [PK_CancelSalesHead_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[ButtonsTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ButtonsTable](
	[ButtonName] [nvarchar](255) NULL,
	[Position] [int] NULL,
	[ButtonSize] [int] NULL,
	[ButtonColor] [int] NULL,
	[Caption] [nvarchar](255) NULL,
	[FontName] [nvarchar](255) NULL,
	[FontSize] [int] NULL,
	[FontBold] [bit] NULL,
	[FontItalic] [bit] NULL,
	[FontUnderline] [bit] NULL,
	[FontStrikeout] [bit] NULL,
	[Event] [int] NULL,
	[Kind] [int] NULL,
	[CanRelocate] [bit] NULL,
	[Disable] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_ButtonsTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[ButtonsTable] ON
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'PayAsYouGoButton', 28, 0, 4, N'Pay As
You Go', N'Arial', 8, 1, 0, 0, 0, 28, 2, 1, 1, 1)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'DirectPrintInvoiceButton', 28, 0, 4, N'Print
Invoice', N'Arial', 8, 1, 0, 0, 0, 30, 2, 1, 1, 2)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'NumberPadButton', 0, 0, 2, N'Keypad', N'Arial', 8, 1, 0, 0, 0, NULL, 2, 0, 0, 3)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'MenuStatusButton', 0, 0, 2, N'Menu
Status', N'Arial', 8, 1, 0, 0, 0, NULL, 2, 0, 0, 4)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'NumberPadButton', 0, 0, 2, N'Keypad', N'Arial', 8, 1, 0, 0, 0, NULL, 3, 0, 0, 5)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'MenuStatusButton', 0, 0, 2, N'Menu
Status', N'Arial', 8, 1, 0, 0, 0, NULL, 3, 0, 0, 6)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'NumberPadButton', 0, 0, 2, N'Keypad', N'Arial', 8, 1, 0, 0, 0, NULL, 4, 0, 0, 7)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'DoNotPrintButton', 28, 0, 4, N'Do Not
Print', N'Arial', 8, 1, 0, 0, 0, 29, 2, 1, 1, 8)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'TableOrderButton', 24, 0, 4, N'Table
Order', N'Arial', 8, 1, 0, 0, 0, 25, 3, 1, 1, 9)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'RedeemPointButton', 24, 0, 2, N'Redeem
Points', N'Arial', 8, 1, 0, 0, 0, 26, 3, 1, 1, 10)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'PaymentButton', 24, 0, 2, N'Payment', N'Arial', 8, 1, 0, 0, 0, 23, 4, 1, 1, 11)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'NotesButton', 28, 0, 4, N'Notes', N'Arial', 8, 1, 0, 0, 0, 31, 2, 1, 1, 12)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'NotesButton', 24, 0, 2, N'Notes', N'Arial', 8, 1, 0, 0, 0, 27, 3, 1, 1, 13)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'NotesButton', 24, 0, 2, N'Notes', N'Arial', 8, 1, 0, 0, 0, 24, 4, 1, 1, 14)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'ReadDishesButton', 24, 0, 2, N'Read Dishes', N'Arial', 8, 1, 0, 0, 0, 28, 3, 1, 1, 15)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'CashDeclaretionButton', 25, 0, 2, N'Cash
Declaretion', N'Arial', 8, 1, 0, 0, 0, 29, 3, 1, 1, 16)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'CashDeclaretionButton', 25, 0, 2, N'Cash
Declaretion', N'Arial', 8, 1, 0, 0, 0, 24, 1, 1, 1, 17)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'CouponButton', 28, 0, 4, N'Coupon', N'Arial', 8, 1, 0, 0, 0, 32, 2, 1, 1, 18)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'CouponButton', 24, 0, 2, N'Coupon', N'Arial', 8, 1, 0, 0, 0, 30, 3, 1, 1, 19)
INSERT [dbo].[ButtonsTable] ([ButtonName], [Position], [ButtonSize], [ButtonColor], [Caption], [FontName], [FontSize], [FontBold], [FontItalic], [FontUnderline], [FontStrikeout], [Event], [Kind], [CanRelocate], [Disable], [PId]) VALUES (N'CouponButton', 24, 0, 2, N'Coupon', N'Arial', 8, 1, 0, 0, 0, 25, 4, 1, 1, 20)
SET IDENTITY_INSERT [dbo].[ButtonsTable] OFF
/****** Object:  Table [dbo].[OnlineOrderReceiver]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OnlineOrderReceiver](
	[BuzId] [bigint] NOT NULL,
	[OnlineOrderId] [nvarchar](50) NOT NULL,
	[OrderNo] [nvarchar](50) NOT NULL,
	[CreateAt] [datetime] NOT NULL,
 CONSTRAINT [PK_OnlineOrderReceiver] PRIMARY KEY CLUSTERED 
(
	[BuzId] 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].[messi]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[messi](
	[BuzId] [bigint] NOT NULL,
	[MessiType] [int] NOT NULL,
	[TableNo] [nvarchar](10) NULL,
	[OrderNo] [nvarchar](10) NULL,
	[Message] [nvarchar](200) NULL,
	[ReadFlag] [bit] NOT NULL,
	[MachineID] [nvarchar](15) NULL,
	[CreateAt] [datetime] NOT NULL,
	[UpdateAt] [datetime] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_messi_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [ix_messi_buzid] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[MenuItemRelation]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MenuItemRelation](
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ItemCode] [nvarchar](10) NOT NULL,
	[LinkItemCode] [nvarchar](10) NOT NULL,
	[RelateItemCode] [nvarchar](10) NOT NULL,
	[BuzId] [bigint] NOT NULL,
 CONSTRAINT [PK_MenuItemRelation] PRIMARY KEY CLUSTERED 
(
	[PId] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY],
 CONSTRAINT [IX_menuitemrelation_BuzId] UNIQUE NONCLUSTERED 
(
	[BuzId] 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].[MenuItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MenuItem](
	[BarCode] [nvarchar](30) NULL,
	[BarCode1] [nvarchar](30) NULL,
	[BarCode2] [nvarchar](30) NULL,
	[BarCode3] [nvarchar](30) NULL,
	[ButtonColor] [int] NULL,
	[FontColor] [int] NULL,
	[Instruction] [bit] NOT NULL,
	[Multiple] [bit] NOT NULL,
	[Price1] [float] NULL,
	[Price2] [float] NULL,
	[Price3] [float] NULL,
	[SubDescription] [nvarchar](10) NULL,
	[SubDescription1] [nvarchar](10) NULL,
	[SubDescription2] [nvarchar](10) NULL,
	[SubDescription3] [nvarchar](10) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Description1] [nvarchar](100) NULL,
	[Description2] [nvarchar](100) NULL,
	[Price] [float] NULL,
	[TaxRate] [float] NULL,
	[Category] [nvarchar](25) NULL,
	[Active] [bit] NOT NULL,
	[PrinterPort] [smallint] NULL,
	[FontName] [nvarchar](50) NULL,
	[FontSize] [int] NULL,
	[FontBold] [bit] NOT NULL,
	[FontItalic] [bit] NOT NULL,
	[FontUnderline] [bit] NOT NULL,
	[FontStrikeout] [bit] NOT NULL,
	[AllowDiscount] [bit] NOT NULL,
	[JobListColor] [smallint] NULL,
	[OpenPrice] [bit] NOT NULL,
	[PrinterPort1] [int] NULL,
	[PrinterPort2] [int] NULL,
	[HappyHourPrice1] [float] NULL,
	[HappyHourPrice2] [float] NULL,
	[HappyHourPrice3] [float] NULL,
	[HappyHourPrice4] [float] NULL,
	[DefaultQty] [float] NULL,
	[SubDescriptionSwap] [bit] NOT NULL,
	[MainPosition] [int] NULL,
	[POSPosition] [int] NULL,
	[KitchenScreenFontColor] [int] NULL,
	[PrinterPort3] [int] NULL,
	[ItemGroup] [nvarchar](25) NULL,
	[OnlyShowOnSubMenu] [bit] NULL,
	[ButtonColor1] [int] NULL,
	[FontName1] [nvarchar](50) NULL,
	[FontColor1] [int] NULL,
	[FontSize1] [int] NULL,
	[FontBold1] [bit] NULL,
	[FontItalic1] [bit] NULL,
	[FontUnderline1] [bit] NULL,
	[FontStrikeout1] [bit] NULL,
	[PhoneOrderPosition] [int] NULL,
	[AutoPopSpellInstructionKeyboard] [bit] NULL,
	[KitchenScreen1] [int] NULL,
	[KitchenScreen2] [int] NULL,
	[KitchenScreen3] [int] NULL,
	[KitchenScreen4] [int] NULL,
	[Scalable] [bit] NULL,
	[WeekendPrice] [float] NULL,
	[WeekendPrice1] [float] NULL,
	[WeekendPrice2] [float] NULL,
	[WeekendPrice3] [float] NULL,
	[PicturePath] [nvarchar](1000) NULL,
	[Description3] [nvarchar](100) NULL,
	[Description4] [nvarchar](100) NULL,
	[TimeChargeItem] [bit] NULL,
	[SoldOut] [bit] NULL,
	[PromotionItem] [bit] NULL,
	[CanBeRedeemItem] [bit] NULL,
	[TareWeight] [float] NULL,
	[Cost] [float] NULL,
	[Cost1] [float] NULL,
	[Cost2] [float] NULL,
	[Cost3] [float] NULL,
	[QuantityFollowByPeopleCount] [bit] NULL,
	[RedeemPoints] [float] NULL,
	[OnlineOrderItem] [bit] NULL,
	[OtherChargeItem] [bit] NULL,
	[WeightDivideMeasureAsQty] [bit] NULL,
	[MeasureWeight] [float] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ItemDescription1] [nvarchar](200) NULL,
	[ItemDescription2] [nvarchar](200) NULL,
	[PackagePrice] [decimal](20, 2) NOT NULL,
	[PackagePrice1] [decimal](20, 2) NOT NULL,
	[PackagePrice2] [decimal](20, 2) NOT NULL,
	[PackagePrice3] [decimal](20, 2) NOT NULL,
	[NoteGroupCode] [nvarchar](20) NULL,
	[BorderColor] [nvarchar](32) NULL,
	[PictureCloudAddr] [nvarchar](1000) NULL,
	[SubCategory] [bit] NOT NULL,
	[ItemDescription3] [nvarchar](200) NULL,
	[ItemDescription4] [nvarchar](200) NULL,
	[MaximumQty] [decimal](6, 2) NOT NULL,
	[TimeConsumingItem] [int] NOT NULL,
	[OnlineStatus] [bit] NOT NULL,
	[QRCodeStatus] [bit] NOT NULL,
	[OnlinePrice1] [decimal](20, 2) NOT NULL,
	[OnlinePrice2] [decimal](20, 2) NOT NULL,
	[OnlinePrice3] [decimal](20, 2) NOT NULL,
	[OnlinePrice4] [decimal](20, 2) NOT NULL,
	[OnlinePicturePath] [nvarchar](1000) NULL,
	[OnlinePictureCloudAddr] [nvarchar](1000) NULL,
	[OnlineDisplayName1] [nvarchar](100) NULL,
	[OnlineDisplayName2] [nvarchar](100) NULL,
	[SoldOutUpdateTime] [datetime] NULL,
	[StockControl] [bit] NOT NULL,
	[StockQty] [decimal](20, 4) NOT NULL,
	[DVersion] [decimal](20, 2) NOT NULL,
 CONSTRAINT [PK_MenuItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[MenuGroupTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MenuGroupTable](
	[Code] [nvarchar](2) NULL,
	[Description] [nvarchar](20) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ApplyToZiiTO] [bit] NOT NULL,
	[ApplyToKiosk] [bit] NOT NULL,
	[ApplyToOnline] [bit] NOT NULL,
	[ApplyToQRCode] [bit] NOT NULL,
 CONSTRAINT [PK_MenuGroupTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[MenuGroupTable] ON
INSERT [dbo].[MenuGroupTable] ([Code], [Description], [PId], [ApplyToZiiTO], [ApplyToKiosk], [ApplyToOnline], [ApplyToQRCode]) VALUES (N'00', N'Default', 1, 1, 1, 1, 1)
SET IDENTITY_INSERT [dbo].[MenuGroupTable] OFF
/****** Object:  Table [dbo].[MenuGroupLinkCategory]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MenuGroupLinkCategory](
	[MenuGroupCode] [nvarchar](8) NOT NULL,
	[CategoryCode] [nvarchar](8) NOT NULL,
	[CreatedAt] [datetime] NOT NULL,
	[UpdatedAt] [datetime] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[OrderIndex] [int] NOT NULL,
 CONSTRAINT [PK_MenuGroupLinkCategory_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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
SET IDENTITY_INSERT [dbo].[MenuGroupLinkCategory] ON
INSERT [dbo].[MenuGroupLinkCategory] ([MenuGroupCode], [CategoryCode], [CreatedAt], [UpdatedAt], [PId], [OrderIndex]) VALUES (N'00', N'001', CAST(0x0000AE6001247FFC AS DateTime), CAST(0x0000AE6001247FFC AS DateTime), 1, 0)
INSERT [dbo].[MenuGroupLinkCategory] ([MenuGroupCode], [CategoryCode], [CreatedAt], [UpdatedAt], [PId], [OrderIndex]) VALUES (N'00', N'002', CAST(0x0000AE600124B88D AS DateTime), CAST(0x0000AE600124B88D AS DateTime), 3, 0)
SET IDENTITY_INSERT [dbo].[MenuGroupLinkCategory] OFF
/****** Object:  Table [dbo].[MenuGroupTimes]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MenuGroupTimes](
	[BuzId] [bigint] NOT NULL,
	[TimeName] [nvarchar](30) NOT NULL,
	[StartTime] [nvarchar](16) NOT NULL,
	[EndTime] [nvarchar](16) NOT NULL,
	[MenuGroupCode] [nvarchar](16) NOT NULL,
	[CreatedAt] [datetime] NOT NULL,
	[UpdatedAt] [datetime] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_MenuGroupTimes_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[BookTable]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[BookTable](
	[Kind] [smallint] NULL,
	[RecordDate] [datetime] NULL,
	[CustomerName] [nvarchar](30) NULL,
	[Company] [nvarchar](40) NULL,
	[Telephone] [nvarchar](15) NULL,
	[Fax] [nvarchar](15) NULL,
	[Mobile] [nvarchar](15) NULL,
	[Address] [nvarchar](60) NULL,
	[Persons] [int] NULL,
	[TableNo] [nvarchar](50) NULL,
	[BookingDate] [datetime] NULL,
	[Notes] [nvarchar](255) NULL,
	[BookingNo] [nvarchar](8) NULL,
	[VIPNo] [int] NULL,
	[Arrived] [bit] NOT NULL,
	[OpName] [nvarchar](15) NULL,
	[ExpireTime] [datetime] NULL,
	[MemberID] [nvarchar](20) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[ThirdBusId] [nvarchar](50) NULL,
	[Prepaid] [decimal](20, 2) NULL,
 CONSTRAINT [PK_BookTable_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[OrderI]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderI](
	[Condition] [smallint] NULL,
	[PaidQty] [float] NULL,
	[PriceSelect] [smallint] NULL,
	[Seat] [smallint] NULL,
	[OrderNo] [nvarchar](10) NULL,
	[ItemCode] [nvarchar](4) NULL,
	[Qty] [float] NULL,
	[Price] [float] NULL,
	[Discount] [float] NULL,
	[TaxRate] [float] NULL,
	[IDNo] [smallint] NULL,
	[PrintFlag] [bit] NOT NULL,
	[SentToKitchen] [bit] NOT NULL,
	[VoidReason] [nvarchar](2) NULL,
	[SpecialOrder] [nvarchar](255) NULL,
	[CheckListPrinted] [bit] NULL,
	[VoidFlag] [bit] NULL,
	[OrderOperator] [nvarchar](15) NULL,
	[OriginalPrice] [float] NULL,
	[PresetDiscountCode] [nvarchar](3) NULL,
	[OriginalQty] [float] NULL,
	[RedeemItem] [bit] NULL,
	[ManuallyEnterWeight] [bit] NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[RedeemPoints] [float] NULL,
	[PackagePrice] [decimal](20, 2) NOT NULL,
	[SeatNumber] [nvarchar](20) NULL,
	[CourseCode] [nvarchar](20) NULL,
	[CourseSendFlag] [bit] NOT NULL,
	[OtherChargeItem] [bit] NOT NULL,
	[OrderIndex] [int] NOT NULL,
	[OnlineItemId] [nvarchar](50) NULL,
	[CreateAt] [datetime] NULL,
	[BatchNumber] [nvarchar](20) NULL,
	[ParentItemCode] [nvarchar](50) NULL,
	[ParentSerialNo] [nvarchar](50) NULL,
	[SerialNo] [nvarchar](50) NULL,
	[SourceSerialNo] [nvarchar](50) NULL,
	[BuzUpdateAt] [datetime] NULL,
	[CoursePrintFlag] [bit] NOT NULL,
	[ServiceName] [nvarchar](16) NULL,
	[ServiceCode] [nvarchar](50) NULL,
	[CategoryCode] [nvarchar](25) NOT NULL,
 CONSTRAINT [PK_OrderI_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[OrderH]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderH](
	[BookingNo] [nvarchar](8) NULL,
	[Credit] [bit] NOT NULL,
	[OrderPrinted] [bit] NOT NULL,
	[Tips] [float] NULL,
	[OrderDate] [datetime] NULL,
	[OrderNo] [nvarchar](10) NULL,
	[Persons] [int] NULL,
	[TableNo] [nvarchar](10) NULL,
	[ServicePerson] [nvarchar](15) NULL,
	[Amount] [float] NULL,
	[GST] [float] NULL,
	[PaidAmount] [float] NULL,
	[InvoiceNo] [nvarchar](11) NULL,
	[VIPNo] [int] NULL,
	[OpName] [nvarchar](15) NULL,
	[ServiceCharge] [float] NULL,
	[ServiceChargeRate] [float] NULL,
	[Surcharge] [float] NULL,
	[MachineID] [nvarchar](15) NULL,
	[BillKind] [int] NULL,
	[DollarDiscount] [float] NULL,
	[DueTime] [datetime] NULL,
	[DiscountKind] [int] NULL,
	[Delivery] [bit] NULL,
	[OtherCharge] [float] NULL,
	[OtherChargeRate] [float] NULL,
	[PriceIncludesGST] [bit] NULL,
	[CurrentGSTRate] [float] NULL,
	[SplitBill] [bit] NULL,
	[CustomerName] [nvarchar](30) NULL,
	[DiscountOperator] [nvarchar](15) NULL,
	[MemberID] [nvarchar](20) NULL,
	[CurrentPoints] [float] NULL,
	[CustomerAddress] [nvarchar](100) NULL,
	[CustomerTelephone] [nvarchar](15) NULL,
	[PointsUploaded] [bit] NULL,
	[AwardEffective] [bit] NULL,
	[PresetDiscountCode] [nvarchar](3) NULL,
	[VoucherID] [nvarchar](20) NULL,
	[VoucherAmount] [float] NULL,
	[VoucherDiscount] [float] NULL,
	[RedeemPoints] [float] NULL,
	[TotalRedeemPoints] [float] NULL,
	[SelfOrderMenuGroup] [nvarchar](2) NULL,
	[Notes] [nvarchar](255) NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[SourceType] [int] NOT NULL,
	[SourceKind] [int] NOT NULL,
	[PackageCharge] [decimal](20, 2) NOT NULL,
	[CheckoutCompleteTime] [datetime] NULL,
	[DeliveryFee] [decimal](20, 2) NOT NULL,
	[PayAfterDinner] [bit] NOT NULL,
	[OnlineOrderId] [nvarchar](15) NULL,
	[BuzUpdateAt] [datetime] NULL,
	[EndDueTime] [datetime] NULL,
	[HoldTime] [datetime] NULL,
	[SourceOrderType] [int] NOT NULL,
	[TeamNo] [nvarchar](32) NULL,
	[TeamTables] [nvarchar](32) NULL,
	[PayMode] [int] NOT NULL,
 CONSTRAINT [PK_OrderH_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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].[CategoryMenuItem]    Script Date: 06/22/2022 00:18:50 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CategoryMenuItem](
	[Category] [nvarchar](25) NOT NULL,
	[ItemCode] [nvarchar](16) NOT NULL,
	[CreatedAt] [datetime] NOT NULL,
	[UpdatedAt] [datetime] NOT NULL,
	[PId] [bigint] IDENTITY(1,1) NOT NULL,
	[OrderIndex] [int] NOT NULL,
 CONSTRAINT [PK_CategoryMenuItem_PId_SS] PRIMARY KEY CLUSTERED 
(
	[PId] 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:  Default [DF__MachineID__Defau__08A03ED0]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  CONSTRAINT [DF__MachineID__Defau__08A03ED0]  DEFAULT ((0)) FOR [DefaultCheckListPrinter]
GO
/****** Object:  Default [DF__MachineID__Defau__09946309]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  CONSTRAINT [DF__MachineID__Defau__09946309]  DEFAULT ((0)) FOR [DefaultPrinter]
GO
/****** Object:  Default [DF__MachineID__Disab__2EC5E7B8]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  CONSTRAINT [DF__MachineID__Disab__2EC5E7B8]  DEFAULT ((0)) FOR [Disabled]
GO
/****** Object:  Default [DF_MachineID_CreateAt]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  CONSTRAINT [DF_MachineID_CreateAt]  DEFAULT (getdate()) FOR [CreateAt]
GO
/****** Object:  Default [DF__MachineID__BindA__1D7B6025]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  DEFAULT (getdate()) FOR [BindAt]
GO
/****** Object:  Default [DF__MachineID__Enabl__1E6F845E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  DEFAULT ((0)) FOR [EnableEftposProduce]
GO
/****** Object:  Default [DF__MachineID__Defau__1F63A897]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  DEFAULT ((0)) FOR [DefaultKitchenScreen]
GO
/****** Object:  Default [DF__MachineID__Machi__2057CCD0]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  DEFAULT ((0)) FOR [MachineType]
GO
/****** Object:  Default [DF__MachineID__Fixed__214BF109]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MachineID] ADD  DEFAULT ((0)) FOR [FixedJobListPrinter]
GO
/****** Object:  Default [DF__KitchenDo__BuzId__13F1F5EB]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[KitchenDoneActivity] ADD  DEFAULT ((0)) FOR [BuzId]
GO
/****** Object:  Default [DF__KitchenDo__Order__14E61A24]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[KitchenDoneActivity] ADD  DEFAULT ('') FOR [OrderNo]
GO
/****** Object:  Default [DF__KitchenDo__ItemC__15DA3E5D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[KitchenDoneActivity] ADD  DEFAULT ('') FOR [ItemCode]
GO
/****** Object:  Default [DF__KitchenDoneA__ID__16CE6296]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[KitchenDoneActivity] ADD  DEFAULT ((0)) FOR [ID]
GO
/****** Object:  Default [DF__KitchenDo__Machi__17C286CF]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[KitchenDoneActivity] ADD  DEFAULT ('') FOR [MachineID]
GO
/****** Object:  Default [DF__KitchenDo__DoneD__18B6AB08]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[KitchenDoneActivity] ADD  DEFAULT (getdate()) FOR [DoneDateTime]
GO
/****** Object:  Default [DF_InstructionLinkGroup_SingleChoice]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InstructionLinkGroup] ADD  CONSTRAINT [DF_InstructionLinkGroup_SingleChoice]  DEFAULT ((0)) FOR [SingleChoice]
GO
/****** Object:  Default [DF__Instructi__MinNu__1209AD79]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InstructionLinkGroup] ADD  DEFAULT ((0)) FOR [MinNumberOfChoice]
GO
/****** Object:  Default [DF__Instructi__MaxNu__12FDD1B2]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InstructionLinkGroup] ADD  DEFAULT ((0)) FOR [MaxNumberOfChoice]
GO
/****** Object:  Default [DF__Instructi__Multi__0F2D40CE]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InstructionLink] ADD  DEFAULT ((0)) FOR [MultiPrice]
GO
/****** Object:  Default [DF__Instructi__IsDef__10216507]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InstructionLink] ADD  DEFAULT ((0)) FOR [IsDefault]
GO
/****** Object:  Default [DF__InitialTr__Table__0C50D423]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InitialTrackingVersion] ADD  DEFAULT ('') FOR [TableName]
GO
/****** Object:  Default [DF__InitialTr__Versi__0D44F85C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InitialTrackingVersion] ADD  DEFAULT ('') FOR [Version]
GO
/****** Object:  Default [DF__InitialTr__Statu__0E391C95]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[InitialTrackingVersion] ADD  DEFAULT ('0') FOR [Status]
GO
/****** Object:  Default [DF__EftTransa__BaseA__05A3D694]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((0)) FOR [BaseAmount]
GO
/****** Object:  Default [DF__EftTransa__Trans__0697FACD]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((0)) FOR [TransactionAmount]
GO
/****** Object:  Default [DF__EftTransa__TipAm__078C1F06]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((0)) FOR [TipAmount]
GO
/****** Object:  Default [DF__EftTransa__Surch__0880433F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((0)) FOR [Surcharge]
GO
/****** Object:  Default [DF__EftTransa__PaySt__09746778]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((0)) FOR [PayStatus]
GO
/****** Object:  Default [DF__EftTransa__IsRef__0A688BB1]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((0)) FOR [IsRefund]
GO
/****** Object:  Default [DF__EftTransa__BuzId__0B5CAFEA]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftTransactionActive] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__EftSettle__Total__00DF2177]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftSettlement] ADD  DEFAULT ((0)) FOR [TotalCount]
GO
/****** Object:  Default [DF__EftSettle__Total__01D345B0]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftSettlement] ADD  DEFAULT ((0)) FOR [TotalValue]
GO
/****** Object:  Default [DF__EftSettle__Acqui__02C769E9]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftSettlement] ADD  DEFAULT ((0)) FOR [AcquirerTXCount]
GO
/****** Object:  Default [DF__EftSettle__Acqui__03BB8E22]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftSettlement] ADD  DEFAULT ((0)) FOR [AcquirerTXValue]
GO
/****** Object:  Default [DF__EftSettle__BuzId__04AFB25B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftSettlement] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__EftMerRec__BuzId__7FEAFD3E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftMerReceipt] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__EftMachin__Integ__7D0E9093]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftMachinePair] ADD  DEFAULT ((0)) FOR [IntegratedReceipt]
GO
/****** Object:  Default [DF__EftMachin__Integ__7E02B4CC]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftMachinePair] ADD  DEFAULT ((0)) FOR [IntegratedSurcharge]
GO
/****** Object:  Default [DF__EftMachin__EftEn__7EF6D905]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftMachinePair] ADD  DEFAULT ((0)) FOR [EftEnvironment]
GO
/****** Object:  Default [DF__EftLog__BuzId__7C1A6C5A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[EftLog] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__DiscountS__Schem__28B808A7]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DiscountSchema] ADD  DEFAULT ('') FOR [SchemaCode]
GO
/****** Object:  Default [DF__DiscountS__Schem__29AC2CE0]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DiscountSchema] ADD  DEFAULT ('') FOR [SchemaName]
GO
/****** Object:  Default [DF__DiscountSc__Rate__2AA05119]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DiscountSchema] ADD  DEFAULT ((0)) FOR [Rate]
GO
/****** Object:  Default [DF__DiscountSc__Kind__2B947552]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DiscountSchema] ADD  DEFAULT ((0)) FOR [Kind]
GO
/****** Object:  Default [DF__DiscountS__Activ__2C88998B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DiscountSchema] ADD  DEFAULT ((0)) FOR [Active]
GO
/****** Object:  Default [DF__DiscountS__Creat__2D7CBDC4]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DiscountSchema] ADD  DEFAULT (getdate()) FOR [CreateAt]
GO
/****** Object:  Default [DF__DBVersion__DVers__7B264821]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[DBVersion] ADD  DEFAULT ((1.0)) FOR [DVersion]
GO
/****** Object:  Default [DF__course__OrderInd__7A3223E8]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[course] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF__CommandCo__Comma__7849DB76]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CommandControl] ADD  DEFAULT ((0)) FOR [CommandType]
GO
/****** Object:  Default [DF__CommandCo__StopF__793DFFAF]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CommandControl] ADD  DEFAULT ((0)) FOR [StopFlag]
GO
/****** Object:  Default [DF_ChannelPaymentActivity_IDNo]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[ChannelPaymentActivity] ADD  CONSTRAINT [DF_ChannelPaymentActivity_IDNo]  DEFAULT ((0)) FOR [IDNo]
GO
/****** Object:  Default [DF__ChannelPa__BuzId__756D6ECB]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[ChannelPaymentActivity] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__ChannelPa__LinkR__76619304]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[ChannelPaymentActivity] ADD  DEFAULT ((0)) FOR [LinkRecvIDNo]
GO
/****** Object:  Default [DF__ChannelPa__LinkB__7755B73D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[ChannelPaymentActivity] ADD  DEFAULT ((0)) FOR [LinkBuzId]
GO
/****** Object:  Default [DF__ChannelPa__Refun__24E777C3]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[ChannelPaymentActivity] ADD  DEFAULT ((0)) FOR [RefundGst]
GO
/****** Object:  Default [DF__TyroRecon__Recon__1975C517]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TyroReconcilTransaction] ADD  DEFAULT ((0)) FOR [ReconcilResult]
GO
/****** Object:  Default [DF__TyroRecon__BuzId__1A69E950]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TyroReconcilTransaction] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__TyroRecon__BuzId__1881A0DE]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TyroReconciliation] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__TrackingS__Commi__1699586C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TrackingSync] ADD  DEFAULT ((0)) FOR [CommitStatus]
GO
/****** Object:  Default [DF__TrackingS__FailC__178D7CA5]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TrackingSync] ADD  DEFAULT ((0)) FOR [FailCount]
GO
/****** Object:  Default [DF__TrackingS__SyncS__14B10FFA]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TrackingSource] ADD  DEFAULT ((0)) FOR [SyncStatus]
GO
/****** Object:  Default [DF__TrackingS__FailC__15A53433]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TrackingSource] ADD  DEFAULT ((0)) FOR [FailCount]
GO
/****** Object:  Default [DF__TeamsOrde__TeamN__0FEC5ADD]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TeamsOrder] ADD  DEFAULT ('') FOR [TeamNo]
GO
/****** Object:  Default [DF__TeamsOrde__TeamN__10E07F16]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TeamsOrder] ADD  DEFAULT ('') FOR [TeamName]
GO
/****** Object:  Default [DF__TeamsOrde__Statu__11D4A34F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TeamsOrder] ADD  DEFAULT ((0)) FOR [Status]
GO
/****** Object:  Default [DF__TeamsOrder__Type__12C8C788]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TeamsOrder] ADD  DEFAULT ((0)) FOR [Type]
GO
/****** Object:  Default [DF__TeamsOrde__Opera__13BCEBC1]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[TeamsOrder] ADD  DEFAULT (getdate()) FOR [OperatedAt]
GO
/****** Object:  Default [DF__sysparame__Param__0E04126B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[sysparameter] ADD  DEFAULT ((0)) FOR [ParamType]
GO
/****** Object:  Default [DF__sysparame__Order__0EF836A4]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[sysparameter] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF_SyncTableItem_SyncStatus]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SyncTableLog] ADD  CONSTRAINT [DF_SyncTableItem_SyncStatus]  DEFAULT ((0)) FOR [SyncStatus]
GO
/****** Object:  Default [DF_SyncTableLog_IsInitialData]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SyncTableLog] ADD  CONSTRAINT [DF_SyncTableLog_IsInitialData]  DEFAULT ((0)) FOR [IsInitialData]
GO
/****** Object:  Default [DF__SyncTable__FailC__0D0FEE32]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SyncTableLog] ADD  DEFAULT ((0)) FOR [FailCount]
GO
/****** Object:  Default [DF__SubMenuLi__MinNu__0A338187]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SubMenuLinkHead] ADD  DEFAULT ((0)) FOR [MinNumberOfChoice]
GO
/****** Object:  Default [DF__SubMenuLi__Order__0662F0A3]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SubMenuLinkDetail] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF__SubMenuLi__Multi__075714DC]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SubMenuLinkDetail] ADD  DEFAULT ((0)) FOR [MultiPrice]
GO
/****** Object:  Default [DF__SubMenuLi__IsDef__084B3915]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SubMenuLinkDetail] ADD  DEFAULT ((0)) FOR [IsDefault]
GO
/****** Object:  Default [DF__SubMenuLi__Defau__093F5D4E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SubMenuLinkDetail] ADD  DEFAULT ((0)) FOR [DefaultPriceKind]
GO
/****** Object:  Default [DF__specialda__Activ__056ECC6A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[specialdaytable] ADD  DEFAULT ((0)) FOR [Active]
GO
/****** Object:  Default [DF__SequenceI__Seque__038683F8]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SequenceID] ADD  DEFAULT ('') FOR [SequenceId]
GO
/****** Object:  Default [DF__SequenceI__NowNu__047AA831]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[SequenceID] ADD  DEFAULT ((0)) FOR [NowNumber]
GO
/****** Object:  Default [DF__RecvAcct__Surcha__7FB5F314]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[RecvAcct] ADD  DEFAULT ((0)) FOR [Surcharge]
GO
/****** Object:  Default [DF__RecvAcct__Tips__00AA174D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[RecvAcct] ADD  DEFAULT ((0)) FOR [Tips]
GO
/****** Object:  Default [DF__RecvAcct__Paymen__019E3B86]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[RecvAcct] ADD  DEFAULT ((0)) FOR [PaymentFlag]
GO
/****** Object:  Default [DF__RecvAcct__Relate__02925FBF]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[RecvAcct] ADD  DEFAULT ((0)) FOR [RelatedRecvID]
GO
/****** Object:  Default [DF_Profile_URL]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  CONSTRAINT [DF_Profile_URL]  DEFAULT ('') FOR [URL]
GO
/****** Object:  Default [DF_Profile_CheckVoucherIDViaInternet]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  CONSTRAINT [DF_Profile_CheckVoucherIDViaInternet]  DEFAULT ((0)) FOR [CheckVoucherIDViaInternet]
GO
/****** Object:  Default [DF_Profile_GiftcardExpireDays]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  CONSTRAINT [DF_Profile_GiftcardExpireDays]  DEFAULT ((0)) FOR [GiftcardExpireDays]
GO
/****** Object:  Default [DF__Profile__DineInP__66EA454A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [DineInPriorityCheckout]
GO
/****** Object:  Default [DF__Profile__Support__67DE6983]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [SupportMultiLanguage]
GO
/****** Object:  Default [DF__Profile__EnableD__68D28DBC]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [EnableDineIn]
GO
/****** Object:  Default [DF__Profile__EnableT__69C6B1F5]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [EnableTakeAway]
GO
/****** Object:  Default [DF__Profile__EnableQ__6ABAD62E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [EnableQuickService]
GO
/****** Object:  Default [DF__Profile__LinkEFT__6BAEFA67]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [LinkEFTPOSType]
GO
/****** Object:  Default [DF__Profile__AutoSen__6CA31EA0]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [AutoSendJobListToScreen]
GO
/****** Object:  Default [DF__Profile__Kitchen__6D9742D9]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [KitchenScreenReminderTime]
GO
/****** Object:  Default [DF__Profile__BuzId__6E8B6712]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__Profile__EnableQ__6F7F8B4B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [EnableQuickCheckOut]
GO
/****** Object:  Default [DF__Profile__EnableS__7073AF84]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [EnableSpecialDay]
GO
/****** Object:  Default [DF__Profile__EnableD__7167D3BD]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [EnableDelivery]
GO
/****** Object:  Default [DF__Profile__EnableP__725BF7F6]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [EnablePickUp]
GO
/****** Object:  Default [DF__Profile__OrderTy__73501C2F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [OrderTypeFirstChoice]
GO
/****** Object:  Default [DF__Profile__PrintCo__74444068]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintCourseItemVerbally]
GO
/****** Object:  Default [DF__Profile__PrintCo__753864A1]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintCourseAndSendIfNeed]
GO
/****** Object:  Default [DF__Profile__PrintCo__762C88DA]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [PrintCourseWhenCalled]
GO
/****** Object:  Default [DF__Profile__PrintCo__7720AD13]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintConsolidatedItemsOnInvoiceBill]
GO
/****** Object:  Default [DF__Profile__TableTi__7814D14C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [TableTimeLimit]
GO
/****** Object:  Default [DF__Profile__PrintMe__7908F585]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintMembershipQrcodeOnBill]
GO
/****** Object:  Default [DF__Profile__OrderIt__79FD19BE]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [OrderItemNoteEnabled]
GO
/****** Object:  Default [DF__Profile__OrderNo__7AF13DF7]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [OrderNoteEnabled]
GO
/****** Object:  Default [DF__Profile__PrintPi__7BE56230]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintPickNoOnCheckList]
GO
/****** Object:  Default [DF__Profile__PrintOn__7CD98669]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [PrintOnlineNoOnJobList]
GO
/****** Object:  Default [DF__Profile__PrintOr__7DCDAAA2]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintOrderNoOnLableJobList]
GO
/****** Object:  Default [DF__Profile__PrintOn__7EC1CEDB]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((1)) FOR [PrintOnlineNoOnInvoiceBill]
GO
/****** Object:  Default [DF__Profile__PrintCo__220B0B18]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintConsolidatedInstructionsOnJobList]
GO
/****** Object:  Default [DF__Profile__PrintCo__22FF2F51]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [PrintConsolidatedInstructionsOnInvoiceBill]
GO
/****** Object:  Default [DF__Profile__NotCons__23F3538A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Profile] ADD  DEFAULT ((0)) FOR [NotConsolidateForEachInsOnDifferentDockect]
GO
/****** Object:  Default [DF__printjob__PrintA__5F492382]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[printjob] ADD  DEFAULT ((0)) FOR [PrintAll]
GO
/****** Object:  Default [DF__printjob__IsRepr__603D47BB]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[printjob] ADD  DEFAULT ((0)) FOR [IsReprint]
GO
/****** Object:  Default [DF__printjob__Copies__61316BF4]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[printjob] ADD  DEFAULT ((1)) FOR [Copies]
GO
/****** Object:  Default [DF__printjob__PrintR__6225902D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[printjob] ADD  DEFAULT ((0)) FOR [PrintResult]
GO
/****** Object:  Default [DF__printjob__RetryT__6319B466]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[printjob] ADD  DEFAULT ((0)) FOR [RetryTimes]
GO
/****** Object:  Default [DF__PrinterDe__JobLi__5E54FF49]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PrinterDeviceItem] ADD  DEFAULT ((1)) FOR [JobListCopies]
GO
/****** Object:  Default [DF__PrinterDe__Integ__5C6CB6D7]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PrinterDevice] ADD  DEFAULT ((0)) FOR [IntegratedEFTReceipt]
GO
/****** Object:  Default [DF__PrinterDe__BuzId__5D60DB10]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PrinterDevice] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__PrintCond__BuzId__5B78929E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PrintCondition] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF_PresetNote_Active]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PresetNote] ADD  CONSTRAINT [DF_PresetNote_Active]  DEFAULT ((0)) FOR [Active]
GO
/****** Object:  Default [DF_PresetNote_OrderIndex]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PresetNote] ADD  CONSTRAINT [DF_PresetNote_OrderIndex]  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF_PictureMeta_Disabled]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PictureMeta] ADD  CONSTRAINT [DF_PictureMeta_Disabled]  DEFAULT ((0)) FOR [Disabled]
GO
/****** Object:  Default [DF__PictureMe__Updat__589C25F3]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[PictureMeta] ADD  DEFAULT (getdate()) FOR [UpdateAt]
GO
/****** Object:  Default [DF__Payment__Counter__52E34C9D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Payment] ADD  DEFAULT ((0)) FOR [CounterPayment]
GO
/****** Object:  Default [DF__Payment__Support__53D770D6]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Payment] ADD  DEFAULT ((1)) FOR [SupportCasher]
GO
/****** Object:  Default [DF__Payment__Support__54CB950F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Payment] ADD  DEFAULT ((1)) FOR [SupportSelfPad]
GO
/****** Object:  Default [DF__Payment__OrderIn__55BFB948]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Payment] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF__Payment__Support__56B3DD81]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Payment] ADD  DEFAULT ((1)) FOR [SupportOrderingTerminal]
GO
/****** Object:  Default [DF__Organizati__Live__4E1E9780]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrganizationSetting] ADD  DEFAULT ((1)) FOR [Live]
GO
/****** Object:  Default [DF__Organizat__Enabl__4F12BBB9]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrganizationSetting] ADD  DEFAULT ((0)) FOR [EnableServer]
GO
/****** Object:  Default [DF__Organizat__Enabl__5006DFF2]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrganizationSetting] ADD  DEFAULT ((0)) FOR [EnableOnlineOrder]
GO
/****** Object:  Default [DF__Organizat__Enabl__50FB042B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrganizationSetting] ADD  DEFAULT ((0)) FOR [EnableReservation]
GO
/****** Object:  Default [DF__Organizat__SysDe__51EF2864]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrganizationSetting] ADD  DEFAULT ((0)) FOR [SysDeployModel]
GO
/****** Object:  Default [DF__Attendanc__Staff__5E8A0973]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Attendance] ADD  DEFAULT (newid()) FOR [StaffCode]
GO
/****** Object:  Default [DF__Attendanc__BuzId__5F7E2DAC]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Attendance] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__Attendance__Type__607251E5]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Attendance] ADD  DEFAULT ((0)) FOR [Type]
GO
/****** Object:  Default [DF__Attendanc__TimeS__6166761E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Attendance] ADD  DEFAULT ((0)) FOR [TimeSheetBuzId]
GO
/****** Object:  Default [DF_AccessMenu_GSTPayableReportMenu]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  CONSTRAINT [DF_AccessMenu_GSTPayableReportMenu]  DEFAULT ((0)) FOR [GSTPayableReportMenu]
GO
/****** Object:  Default [DF__AccessMen__Setti__58D1301D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ((0)) FOR [SettingsPortalMenu]
GO
/****** Object:  Default [DF__AccessMen__ZiiTO__59C55456]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ((0)) FOR [ZiiTOTableLockMenu]
GO
/****** Object:  Default [DF__AccessMen__LastU__5AB9788F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ((0)) FOR [LastUpdatedTime]
GO
/****** Object:  Default [DF__AccessMen__First__5BAD9CC8]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ('') FOR [FirstName]
GO
/****** Object:  Default [DF__AccessMen__LastN__5CA1C101]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ('') FOR [LastName]
GO
/****** Object:  Default [DF__AccessMen__ZiiOn__5D95E53A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ((0)) FOR [ZiiOnlineOrderCancel]
GO
/****** Object:  Default [DF__AccessMen__Overr__26CFC035]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[AccessMenu] ADD  DEFAULT ((1)) FOR [OverrideSalesPrice]
GO
/****** Object:  Default [DF__Category__OrderI__662B2B3B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF__Category__ShowOn__671F4F74]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((1)) FOR [ShowOnDineInMenu]
GO
/****** Object:  Default [DF__Category__ShowOn__681373AD]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((1)) FOR [ShowOnTakeawayMenu]
GO
/****** Object:  Default [DF__Category__ShowOn__690797E6]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((1)) FOR [ShowOnQuickSaleMenu]
GO
/****** Object:  Default [DF__Category__ShowOn__69FBBC1F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((1)) FOR [ShowOnDeliveryMenu]
GO
/****** Object:  Default [DF__Category__ShowOn__6AEFE058]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((1)) FOR [ShowOnPickupMenu]
GO
/****** Object:  Default [DF__Category__Minimu__6BE40491]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((0)) FOR [MinimumChoiceQty]
GO
/****** Object:  Default [DF__Category__Maximu__6CD828CA]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((0)) FOR [MaximumChoiceQty]
GO
/****** Object:  Default [DF__Category__Online__6DCC4D03]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((0)) FOR [OnlineStatus]
GO
/****** Object:  Default [DF__Category__QRCode__6EC0713C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[Category] ADD  DEFAULT ((0)) FOR [QRCodeStatus]
GO
/****** Object:  Default [DF__CancelSal__Categ__65370702]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CancelSalesItem] ADD  DEFAULT ('') FOR [CategoryCode]
GO
/****** Object:  Default [DF__CancelSal__Sourc__634EBE90]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CancelSalesHead] ADD  DEFAULT ((0)) FOR [SourceKind]
GO
/****** Object:  Default [DF__CancelSal__Sourc__6442E2C9]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CancelSalesHead] ADD  DEFAULT ((0)) FOR [SourceOrderType]
GO
/****** Object:  Default [DF__OnlineOrd__BuzId__41B8C09B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OnlineOrderReceiver] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__messi__ReadFlag__40C49C62]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[messi] ADD  DEFAULT ((0)) FOR [ReadFlag]
GO
/****** Object:  Default [DF__MenuItemR__BuzId__3FD07829]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItemRelation] ADD  DEFAULT ((1)) FOR [BuzId]
GO
/****** Object:  Default [DF__MenuItem__Packag__308E3499]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [PackagePrice]
GO
/****** Object:  Default [DF__MenuItem__Packag__318258D2]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [PackagePrice1]
GO
/****** Object:  Default [DF__MenuItem__Packag__32767D0B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [PackagePrice2]
GO
/****** Object:  Default [DF__MenuItem__Packag__336AA144]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [PackagePrice3]
GO
/****** Object:  Default [DF__MenuItem__SubCat__345EC57D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [SubCategory]
GO
/****** Object:  Default [DF__MenuItem__Maximu__3552E9B6]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [MaximumQty]
GO
/****** Object:  Default [DF__MenuItem__TimeCo__36470DEF]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [TimeConsumingItem]
GO
/****** Object:  Default [DF__MenuItem__Online__373B3228]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [OnlineStatus]
GO
/****** Object:  Default [DF__MenuItem__QRCode__382F5661]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [QRCodeStatus]
GO
/****** Object:  Default [DF__MenuItem__Online__39237A9A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [OnlinePrice1]
GO
/****** Object:  Default [DF__MenuItem__Online__3A179ED3]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [OnlinePrice2]
GO
/****** Object:  Default [DF__MenuItem__Online__3B0BC30C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [OnlinePrice3]
GO
/****** Object:  Default [DF__MenuItem__Online__3BFFE745]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [OnlinePrice4]
GO
/****** Object:  Default [DF__MenuItem__StockC__3CF40B7E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [StockControl]
GO
/****** Object:  Default [DF__MenuItem__StockQ__3DE82FB7]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [StockQty]
GO
/****** Object:  Default [DF__MenuItem__DVersi__3EDC53F0]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuItem] ADD  DEFAULT ((0)) FOR [DVersion]
GO
/****** Object:  Default [DF__MenuGroup__Apply__2704CA5F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTable] ADD  DEFAULT ((1)) FOR [ApplyToZiiTO]
GO
/****** Object:  Default [DF__MenuGroup__Apply__27F8EE98]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTable] ADD  DEFAULT ((1)) FOR [ApplyToKiosk]
GO
/****** Object:  Default [DF__MenuGroup__Apply__28ED12D1]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTable] ADD  DEFAULT ((1)) FOR [ApplyToOnline]
GO
/****** Object:  Default [DF__MenuGroup__Apply__29E1370A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTable] ADD  DEFAULT ((1)) FOR [ApplyToQRCode]
GO
/****** Object:  Default [DF__MenuGroup__MenuG__22401542]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupLinkCategory] ADD  DEFAULT ('') FOR [MenuGroupCode]
GO
/****** Object:  Default [DF__MenuGroup__Categ__2334397B]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupLinkCategory] ADD  DEFAULT ('') FOR [CategoryCode]
GO
/****** Object:  Default [DF__MenuGroup__Creat__24285DB4]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupLinkCategory] ADD  DEFAULT (getdate()) FOR [CreatedAt]
GO
/****** Object:  Default [DF__MenuGroup__Updat__251C81ED]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupLinkCategory] ADD  DEFAULT (getdate()) FOR [UpdatedAt]
GO
/****** Object:  Default [DF__MenuGroup__Order__2610A626]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupLinkCategory] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF__MenuGroup__TimeN__2AD55B43]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTimes] ADD  DEFAULT ('') FOR [TimeName]
GO
/****** Object:  Default [DF__MenuGroup__Start__2BC97F7C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTimes] ADD  DEFAULT ('') FOR [StartTime]
GO
/****** Object:  Default [DF__MenuGroup__EndTi__2CBDA3B5]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTimes] ADD  DEFAULT ('') FOR [EndTime]
GO
/****** Object:  Default [DF__MenuGroup__MenuG__2DB1C7EE]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTimes] ADD  DEFAULT ('') FOR [MenuGroupCode]
GO
/****** Object:  Default [DF__MenuGroup__Creat__2EA5EC27]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTimes] ADD  DEFAULT (getdate()) FOR [CreatedAt]
GO
/****** Object:  Default [DF__MenuGroup__Updat__2F9A1060]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[MenuGroupTimes] ADD  DEFAULT (getdate()) FOR [UpdatedAt]
GO
/****** Object:  Default [DF__BookTable__Prepa__625A9A57]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[BookTable] ADD  DEFAULT ((0)) FOR [Prepaid]
GO
/****** Object:  Default [DF__OrderI__PackageP__4865BE2A]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderI] ADD  DEFAULT ((0)) FOR [PackagePrice]
GO
/****** Object:  Default [DF__OrderI__CourseSe__4959E263]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderI] ADD  DEFAULT ((0)) FOR [CourseSendFlag]
GO
/****** Object:  Default [DF__OrderI__OtherCha__4A4E069C]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderI] ADD  DEFAULT ((0)) FOR [OtherChargeItem]
GO
/****** Object:  Default [DF__OrderI__OrderInd__4B422AD5]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderI] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
/****** Object:  Default [DF__OrderI__CoursePr__4C364F0E]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderI] ADD  DEFAULT ((0)) FOR [CoursePrintFlag]
GO
/****** Object:  Default [DF__OrderI__Category__4D2A7347]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderI] ADD  DEFAULT ('') FOR [CategoryCode]
GO
/****** Object:  Default [DF__OrderH__SourceTy__42ACE4D4]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [SourceType]
GO
/****** Object:  Default [DF__OrderH__SourceKi__43A1090D]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [SourceKind]
GO
/****** Object:  Default [DF__OrderH__PackageC__44952D46]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [PackageCharge]
GO
/****** Object:  Default [DF__OrderH__Delivery__4589517F]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [DeliveryFee]
GO
/****** Object:  Default [DF__OrderH__PayAfter__467D75B8]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [PayAfterDinner]
GO
/****** Object:  Default [DF__OrderH__SourceOr__477199F1]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [SourceOrderType]
GO
/****** Object:  Default [DF__OrderH__PayMode__25DB9BFC]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[OrderH] ADD  DEFAULT ((0)) FOR [PayMode]
GO
/****** Object:  Default [DF__CategoryM__Categ__6FB49575]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CategoryMenuItem] ADD  DEFAULT ('') FOR [Category]
GO
/****** Object:  Default [DF__CategoryM__ItemC__70A8B9AE]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CategoryMenuItem] ADD  DEFAULT ('') FOR [ItemCode]
GO
/****** Object:  Default [DF__CategoryM__Creat__719CDDE7]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CategoryMenuItem] ADD  DEFAULT (getdate()) FOR [CreatedAt]
GO
/****** Object:  Default [DF__CategoryM__Updat__72910220]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CategoryMenuItem] ADD  DEFAULT (getdate()) FOR [UpdatedAt]
GO
/****** Object:  Default [DF__CategoryM__Order__73852659]    Script Date: 06/22/2022 00:18:50 ******/
ALTER TABLE [dbo].[CategoryMenuItem] ADD  DEFAULT ((0)) FOR [OrderIndex]
GO
