--
-- Структура таблицы `USERS`
--
create table `users` (
`id` int(11) not null,
`sn` varchar(20) default null,
`nick` varchar(255) default null,
`localnick` varchar(255) default null,
`fname` varchar(255) default null,
`lname` varchar(255) default null,
`email` varchar(255) default null,
`city` varchar(255) default null,
`homepage` varchar(255) default null,
`gender` int(11) default null,
`birthyear` int(11) default null,
`birthmonth` int(11) default null,
`birthday` int(11) default null,
`age` int(11) default null,
`country` int(11) default null,
`language` int(11) default null,
`state` int(11) default null,
`basesn` varchar(20) default null,
`createtime` timestamp not null default current_timestamp on update current_timestamp,
`room` int(11) default null,
`lastkick` timestamp not null default '0000-00-00 00:00:00',
`lastclosed` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
`SP` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
`ball` INT( 11 ) NULL,
`viev` INT( 11 ) NULL,
`odegd` varchar(255) default null,
`giv` varchar(255) default null,
`auto` varchar(255) default null,
`dom` varchar(255) default null,
primary key (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `ads`
--
CREATE TABLE `ads` (
`id` int(11) NOT NULL auto_increment,
`txt` text NOT NULL,
`enable` int(1) NOT NULL default '1',
`note` text,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `ads_log`
--
CREATE TABLE `ads_log` (
`ads_id` int(11) NOT NULL,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`uin` varchar(20) NOT NULL
);
-- --------------------------------------------------------
--
-- Структура таблицы `aneks`
--
CREATE TABLE `aneks` (
`id` int(11) NOT NULL,
`text` text NOT NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `aneks_tmp`
--
CREATE TABLE `aneks_tmp` (
`id` int(11) NOT NULL auto_increment,
`text` text,
`uin` varchar(20) default NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `events`
--
CREATE TABLE `events` (
`id` bigint(20) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(11) default NULL,
`user_sn` varchar(50) default NULL,
`type` varchar(10) default NULL,
`user_id2` int(11) default NULL,
`user_sn2` varchar(50) default NULL,
`msg` text,
PRIMARY KEY (`id`)
) ;
-- --------------------------------------------------------
--
-- Структура таблицы `invites`
--
CREATE TABLE `invites` (
`id` int(11) NOT NULL,
`user_id` int(11) default NULL,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`invite` varchar(20) default NULL,
`new_user` int(11) default NULL,
`create_time` timestamp NOT NULL default '0000-00-00 00:00:00',
`note` text,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `log`
--
CREATE TABLE `log` (
`id` bigint(20) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(11) default NULL,
`user_sn` varchar(50) default NULL,
`type` varchar(10) default NULL,
`msg` text,
`room` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `sms_log`
--
CREATE TABLE `sms_log` (
`id` int(11) NOT NULL auto_increment,
`num` varchar(10) default NULL,
`operator` varchar(20) default NULL,
`user_id` varchar(20) default NULL,
`cost` float NOT NULL default '0',
`msg` varchar(170) default NULL,
PRIMARY KEY (`id`)
);
-- --------------------------------------------------------
--
-- Структура таблицы `user_props`
--
CREATE TABLE `user_props` (
`user_id` int(11) NOT NULL,
`name` varchar(50) default NULL,
`val` varchar(50) default NULL
);
-- --------------------------------------------------------
--
-- Структура таблицы `rooms`
--
CREATE TABLE `rooms` (
`id` int(11) NOT NULL,
`name` varchar(100) NOT NULL,
`topic` varchar(255) NOT NULL,
`pass` varchar(20) NOT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `info` (
`id` bigint(20) NOT NULL auto_increment,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`user_id` int(11) default NULL,
`user_sn` varchar(50) default NULL,
`type` varchar(10) default NULL,
`user_id2` int(11) default NULL,
`user_sn2` varchar(50) default NULL,
`msg` text,
PRIMARY KEY (`id`)
);
CREATE TABLE `bash` (
`id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
`citata` text COLLATE utf8_unicode_ci NOT NULL ,
`title` text COLLATE utf8_unicode_ci,
PRIMARY KEY ( `id` )
);
CREATE TABLE `victorina` (
`id` int(11) NOT NULL,
`question` varchar(255) NOT NULL,
`answer` varchar(255) NOT NULL
);
CREATE TABLE `frends` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`frend_id` int(11) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ;
CREATE TABLE `demand` (
`id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`frend_id` int(11) NOT NULL,
`type` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ;