站内信表结构设计

站内信表结构设计 一个人可以点对点发 点对群发  但是双方都可以选择自己是否删除 同时管理员能看到全部 的表结构设计

create table message_sender(

mid int unsigned not null primary key auto_increment comment '站内信自增id',

from_uid int unsigned not null default 0 comment '发信人id',

from_username varchar(30) not null default '' comment '发信人姓名',

title varchar(200) not null default '' comment '信息标题',

content text not null comment '信息内容',

from_deleted tinyint unsigned not null default 0 comment '是否被发信人删除',

date_time int unsigned not null default 0 comment '发信时间'

)charset utf8 comment '用户站内信发送表';



create table message_receiver(

rid int unsigned not null primary key auto_increment comment '自增id',

mid int unsigned not null default 0 comment '关联站内信id',

to_uid int unsigned not null default 0 comment '收信人id',

to_username varchar(30) not null default '' comment '收信人姓名',

is_readed  tinyint unsigned not null default 0 comment '是否被收信人阅读',

is_deleted tinyint unsigned not null default 0 comment '是否被收信人删除',

)charset utf8 comment '用户站内信接收表';

 

你可能感兴趣的:(表结构)