-- fusentest.fs_user definition

CREATE TABLE `fs_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `face_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'facebook的userid',
  `sub` bigint(20) NOT NULL DEFAULT '0' COMMENT 'google的sub',
  `first_name` varchar(64) DEFAULT NULL COMMENT 'FirstName',
  `last_name` varchar(64) DEFAULT NULL COMMENT 'LastName',
  `username` varchar(255) DEFAULT NULL COMMENT '用户名',
  `company` varchar(64) DEFAULT NULL COMMENT '公司名称',
  `mobile` varchar(16) DEFAULT NULL COMMENT '手机号码',
  `auth_key` varchar(32) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `verification_token` varchar(255) DEFAULT NULL,
  `password_reset_token` varchar(255) DEFAULT NULL,
  `email` varchar(255) NOT NULL COMMENT '邮箱',
  `type` tinyint(1) NOT NULL COMMENT '1普通餐厅 2连锁餐厅',
  `status` tinyint(3) unsigned DEFAULT '1' COMMENT '1正常 0不正常',
  `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除 1删除',
  `created_at` int(11) NOT NULL DEFAULT '0' COMMENT '添加时间',
  `updated_at` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `is_order_status_email` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态改变时是否接收邮件',
  `is_email_advertisement` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否接收邮件广告',
  `is_order_status_phone` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态改变是是否接收电话',
  `is_phone_advertisement` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否接收短信广告',
  `is_open_render` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否打开个性化渲染(1:开启,0:关闭)',
  `is_thousand_face` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已经存在千人千面(1:存在,0:不存在)',
  `is_low_rendering` tinyint(1) unsigned zerofill NOT NULL DEFAULT '0' COMMENT '是否开启低渲染模型渲染',
  `is_remove_bg` tinyint(1) NOT NULL DEFAULT '1' COMMENT '用户上传logo是否去除背景',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `email` (`email`) USING BTREE,
  UNIQUE KEY `username` (`username`) USING BTREE,
  UNIQUE KEY `password_reset_token` (`password_reset_token`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户表';