CheckFrequency(userId uint64) bool
返回true检查通过,false触发频控
visited_{user_id} >3触发
离线用户key为空
数据结构:key-value
取值:
1=在线
2=离开
3=隐身(VIP功能)
数据结构:list
数据结构:hashmap
简单的设计如下:如需其他功能,需要扩展,用户(主键,账号,密码,邮箱,..)
好友关系(所属者ID,好友ID)
聊天记录(主键,所属者ID,好友ID,时间,内容,..)
create table users
(uid number not null primary key,
uname varchar2(50) not null,
pwd varchar2(20) not null,
email varchar2(50) not null,
...)
create table friends
(owerid number not null,
friendid number not null,
constraint fk_owerid poreign key(owerid) references users(uid),
constraint fk_friendid poreign key(friendid) references users(uid),
constraint pk_friendid_owerid primary key(owerid,friendid)
)
create table records
(rid number not null primary key,
owerid number not null,
friendid number not null,
rdate date default sysdate,
rcontents varchar2(4000),
constraint fk_owerid_r poreign key(owerid) references users(uid),
constraint fk_friendid_r poreign key(friendid) references users(uid),
..
)
添加一个sScrollY属性var height=$(window).height()
$(document).ready(function() {
$('#example').dataTable(
{
"sScrollY": height
})
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)