Skip to content

Instantly share code, notes, and snippets.

@xiezefan
Created November 19, 2014 03:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiezefan/3fbab318930618366e53 to your computer and use it in GitHub Desktop.
Save xiezefan/3fbab318930618366e53 to your computer and use it in GitHub Desktop.
use ding;
drop table tb_user;
create table tb_user (
id varchar(36) primary key,
password varchar(256) not null,
registration_id varchar(36),
alias varchar(36),
avatar varchar(36),
phone varchar(20),
nickname varchar(50),
is_login_by_device tinyint(1),
is_service_provider tinyint(1),
create_time bigint not null
);
drop table tb_user_service_ref;
create table tb_user_service_ref (
id varchar(36) primary key,
uid varchar(36) not null,
cid varchar(36) not null,
followed_time BIGINT not null
);
create index idx_uid_cid_followed_time_on_user_service_ref on tb_user_service_ref(uid, cid, followed_time);
drop table tb_message;
create table tb_message (
id varchar(36),
sid varchar(36),
cid varchar(36),
type varchar(36),
category_id varchar(36),
create_time BIGINT,
content varchar(300),
title varchar(300),
summary varchar(500),
cover_pic varchar(300),
link varchar(300)
);
create index idx_cid_category_create_time_on_message on tb_message(cid, create_time, category_id);
drop table tb_service_category;
create table tb_service_category (
id int auto_increment primary key ,
name varchar(36) not null,
cover_pic varchar(250),
create_time bigint not null
);
drop table tb_service;
create table tb_service (
id varchar(36) primary key,
owner_id varchar(36) not null,
api_secret varchar(36) not null,
title varchar(250) not null,
description varchar(500) not null,
category_id varchar(36) not null,
type varchar(25) not null,
has_ding tinyint(1) not null,
has_lbs tinyint(1) not null,
name_pattern varchar(250),
desc_pattern varchar(500),
notify_url varchar(500) not null,
create_time bigint not null,
service_field varchar(2000),
client_field varchar(2000)
);
drop table tb_store_item;
create table tb_store_item (
id varchar(36) primary key,
type varchar(20) not null,
category_id int not null,
sid varchar(36) not null,
weight bigint not null
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment