CREATE DATABASE `saas_account` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
use `saas_account`;

create table `ac_company` (
id int unsigned primary key not null auto_increment,
name varchar(500) not null,
business_code varchar(100),
address varchar(500),
domain varchar(100) not null,
creator_id int unsigned,
create_time datetime,
updater_id int unsigned,
update_time datetime
);

create table `ac_account` (
id int unsigned primary key not null auto_increment,
username varchar(100) not null,
password varchar(100) not null,
salt varchar(100) not null,
realname varchar(100) not null,
email varchar(100) not null,
mobile varchar(100) not null,
type int,
company_id int unsigned not null,
creator_id int unsigned,
create_time datetime,
updater_id int unsigned,
update_time datetime
);