--同行表
Create  TABLE shop_base(
	[userId] bigint primary key,
	[taobaoID] varchar(64),
	[creditGrade] tinyint,
	[shopName] varchar(255),
	[shopId] bigint,
	[industry] integer,
	[industryCn] varchar(32),
	[isB2C] tinyint,
	[shopType] varchar(16),
	[area] varchar(64),
	[online] smallint,
	[goodsList] varchar(800),
	[goodsAmount] integer,
	[shopUrl] varchar(255),
	[logoUrl] varchar(255),
	[classId] integer,
	[check] tinyint default 0);

--同行类别
Create Table shop_class(
	[classId] integer primary key,
	[className] varchar(32),
	[showIndex] integer);

--代码字段对照表
Create  TABLE customer_base(
	[userId] bigint primary key,
	[taobaoID] varchar(64),
	[userLink] varchar(255),
	[creditGrade] tinyint,
	[creditCores] integer,
	[online] smallint,
	[vipGrade] tinyint,
	[rateTime] varchar(32),
	[rateCash] double,
	[rateGoods] varchar(255),
	[shopName] varchar(64),
	[shopId] varchar(32),
	[shopType] varchar(16),
	[classId] integer,
	[check] tinyint default 0);

--买家类别
Create Table customer_class(
	[classId] integer primary key,
	[className] varchar(32),
	[showIndex] integer);

--买家交易记录
Create  TABLE customer_trade(
	[recordId] bigint primary key,
	[userId] bigint,
	[taobaoID] varchar(64),
	[creditGrade] tinyint,
	[creditCores] integer,
	[vipGrade] tinyint,
	[online] smallint,
	[rateTime] varchar(32),
	[rateCash] double,
	[goodsId] bigint,
	[auctionTitle] varchar(255),
	[auctionSku] varchar(64),
	[auctionLink] varchar(255),
	[rateResult] integer,
	[rateContent] varchar(255),
	[shopName] varchar(64),
	[shopUrl] varchar(255),
	[shopId] varchar(32),
	[industry] integer,
	[industryCn] varchar(32),
	[shopTaobaoID] varchar(64));

--消息
Create  TABLE msg_user(
	[msgId] varchar(32) NOT NULL,
	[msgType] smallint NOT NULL,
	[author] varchar(64),
	[content] text,
	[msgTime] varchar(32), 
	Primary Key(msgId,msgType));

--创建账号信息
Create TABLE sys_user(
	[id] varchar(64) PRIMARY KEY,
	[name] varchar(32),
	[pass] varchar(32),
	[email] varchar(64),
	[wwId] varchar(32),	
	[pay] smallint,
	[wwPass] varchar(32),
	[state] smallint);
