我正在为游戏构建一种留言板系统,但在建模关系时遇到了问题。这是我到目前为止所拥有的:
Models
------
User (Has Many Posts)
Post (Belongs to User, Belongs to Game)
Game (Has Many Posts)
这是我需要添加的内容。
Models
------
Server (Belongs to Game but also part of Post)
Replies (Belongs to Post and Post's User but needs to function like private messaging)
对这两件事进行建模的最简单方法是什么?我对服务器的最佳猜测是:
Server - Has Many Posts, Belongs To Game
Posts - Belongs To Server
Game - Has Many Servers
我什至不知道从哪里开始回复。帖子和用户将有许多回复,但回复将有两个用户和一个帖子。谢谢。