| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- create table if not exists `ac_account`
- (
- id bigint unsigned primary key not null,
- realname varchar(100) comment '姓名',
- mobile varchar(30) comment '手机号',
- email varchar(100) comment '邮箱',
- avatar_url varchar(300) comment '头像',
- sex int default 0 comment '性别'
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='个人账户';
- create table if not exists `ac_company`
- (
- id bigint unsigned primary key not null,
- name varchar(300) comment '名称',
- secret_key varchar(64) comment '私钥'
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公司';
- create table if not exists `ac_account_company`
- (
- account_id bigint unsigned comment '账户ID',
- company_id bigint unsigned comment '公司ID'
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='公司账户绑定';
- create table if not exists `ac_device_info`
- (
- account_id bigint unsigned comment '账户ID',
- version varchar(20) comment '客户端发行版本,例如1.0.0',
- model varchar(30) comment '设备型号',
- os int comment '系统',
- os_version varchar(20) comment '系统版本,例如7.1',
- longitude double comment '经度',
- latitude double comment '纬度',
- location varchar(300) comment '位置',
- lang varchar(10) comment '语言',
- login_time datetime comment '登录时间',
- channel_id varchar(100) comment '消息通道ID'
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备信息';
- create table if not exists `ac_login_log`
- (
- id bigint unsigned primary key not null auto_increment,
- account_id bigint unsigned comment '账户ID',
- version varchar(20) comment '客户端发行版本,例如1.0.0',
- model varchar(30) comment '设备型号',
- os int comment '系统',
- os_version varchar(20) comment '系统版本,例如7.1',
- longitude double comment '经度',
- latitude double comment '纬度',
- location varchar(300) comment '位置',
- lang varchar(10) comment '语言',
- login_time datetime comment '登录时间',
- logon bool comment '登录是否成功',
- login_error varchar(1000) comment '登录失败错误信息'
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='设备信息';
|