
CREATE TABLE [dbo].[blOrders](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[order_id] [int] NULL,
	[shop_order_id] [int] NULL,
	[external_order_id] [nvarchar](50) NULL,
	[order_source] [varchar](20) NULL,
	[order_source_id] [int] NULL,
	[order_source_info] [nvarchar](200) NULL,
	[order_status_id] [int] NULL,
	[date_add] [int] NULL,
	[date_confirmed] [int] NULL,
	[date_in_status] [int] NULL,
	[confirmed] [bit] NULL,
	[user_login] [varchar](100) NULL,
	[currency] [char](3) NULL,
	[payment_method] [nvarchar](100) NULL,
	[payment_method_cod] [bit] NULL,
	[payment_done] [float] NULL,
	[user_comments] [varchar](1000) NULL,
	[admin_comments] [varchar](200) NULL,
	[email] [varchar](150) NULL,
	[phone] [varchar](100) NULL,
	[delivery_method] [varchar](100) NULL,
	[delivery_price] [float] NULL,
	[delivery_package_module] [varchar](12) NULL,
	[delivery_package_nr] [varchar](40) NULL,
	[delivery_fullname] [varchar](100) NULL,
	[delivery_company] [varchar](100) NULL,
	[delivery_address] [varchar](100) NULL,
	[delivery_postcode] [varchar](100) NULL,
	[delivery_city] [varchar](100) NULL,
	[delivery_country] [varchar](20) NULL,
	[delivery_country_code] [char](2) NULL,
	[delivery_point_id] [varchar](40) NULL,
	[delivery_point_name] [varchar](100) NULL,
	[delivery_point_address] [varchar](100) NULL,
	[delivery_point_postcode] [varchar](100) NULL,
	[delivery_point_city] [varchar](100) NULL,
	[invoice_fullname] [varchar](200) NULL,
	[invoice_company] [varchar](200) NULL,
	[invoice_nip] [varchar](100) NULL,
	[invoice_address] [varchar](250) NULL,
	[invoice_postcode] [varchar](20) NULL,
	[invoice_city] [varchar](100) NULL,
	[invoice_country] [varchar](20) NULL,
	[invoice_country_code] [char](2) NULL,
	[want_invoice] [bit] NULL,
	[extra_field_1] [varchar](50) NULL,
	[extra_field_2] [varchar](50) NULL,
	[order_page] [nvarchar](150) NULL,
	[pick_state] [int] NULL,
	[pack_state] [int] NULL,
	[ErpId] [int] NULL,
	[TS] [datetime] NULL,
	[SyncId] [int] NULL,
 CONSTRAINT [PK_blOrders] 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


