USE [GunzDB]
GO
/****** Object: Table [dbo].[Character] Script Date: 05/21/2011 10:48:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Character](
[CID] [int] IDENTITY(1,1) NOT NULL,
[AID] [int] NOT NULL,
[Name] [varchar](24) NOT NULL,
[Level] [smallint] NOT NULL,
[Sex] [tinyint] NOT NULL,
[CharNum] [smallint] NOT NULL,
[Hair] [tinyint] NULL,
[Face] [tinyint] NULL,
[XP] [int] NOT NULL,
[BP] [int] NOT NULL,
[HP] [smallint] NULL,
[AP] [smallint] NULL,
[FR] [int] NULL,
[CR] [int] NULL,
[ER] [int] NULL,
[WR] [int] NULL,
[head_slot] [int] NULL,
[chest_slot] [int] NULL,
[hands_slot] [int] NULL,
[legs_slot] [int] NULL,
[feet_slot] [int] NULL,
[fingerl_slot] [int] NULL,
[fingerr_slot] [int] NULL,
[melee_slot] [int] NULL,
[primary_slot] [int] NULL,
[secondary_slot] [int] NULL,
[custom1_slot] [int] NULL,
[custom2_slot] [int] NULL,
[avatar_slot] [int] NULL,
[community1_slot] [int] NULL,
[community2_slot] [int] NULL,
[longbuff1_slot] [int] NULL,
[longbuff2_slot] [int] NULL,
[RegDate] [datetime] NULL,
[LastTime] [datetime] NULL,
[PlayTime] [int] NULL,
[GameCount] [int] NULL,
[KillCount] [int] NULL,
[DeathCount] [int] NULL,
[DeleteFlag] [tinyint] NULL,
[DeleteName] [varchar](24) NULL,
[head_itemid] [int] NULL,
[chest_itemid] [int] NULL,
[hands_itemid] [int] NULL,
[legs_itemid] [int] NULL,
[feet_itemid] [int] NULL,
[fingerl_itemid] [int] NULL,
[fingerr_itemid] [int] NULL,
[melee_itemid] [int] NULL,
[primary_itemid] [int] NULL,
[secondary_itemid] [int] NULL,
[custom1_itemid] [int] NULL,
[custom2_itemid] [int] NULL,
[QuestItemInfo] [binary](292) NULL,
[hide] [int] NULL,
[Views] [int] NOT NULL CONSTRAINT [DF_Character_Views] DEFAULT ((0)),
[Ranking] [int] NULL,
CONSTRAINT [Character_PK] PRIMARY KEY CLUSTERED
(
[CID] ASC
)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
ALTER TABLE [dbo].[Character] WITH CHECK ADD CONSTRAINT [Account_Character_FK1] FOREIGN KEY([AID])
REFERENCES [dbo].[Account] ([AID])
GO
ALTER TABLE [dbo].[Character] CHECK CONSTRAINT [Account_Character_FK1]