I'm new to CakePHP and struggling to make a complete blog with Posts, Tags, comments and users with role. I need to know the perfect schema based upon the CakePHP convention so that utilizing that I could bake most of the CRUD code. Thanks.
问问题
519 次
1 回答
0
这个博客架构看起来很有希望。它缺少用户表和关系,因此您必须将 fk 添加user_id
到必要的表中。
这是一个示例用户表:
CREATE TABLE `users` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`fname` varchar(30) NOT NULL,
`lname` varchar(30) NOT NULL,
`email` varchar(128) NOT NULL, -- OR `username`
`password` varchar(40) NOT NULL,
`status` varchar(2) NOT NULL,
PRIMARY KEY (`id`)
)
于 2013-05-28T11:37:04.487 回答