|
|
@@ -5,17 +5,7 @@ use app\models\User;
|
|
|
|
|
|
class Post extends \lithium\data\Model {
|
|
|
|
|
|
- public $belongsTo = array('User');
|
|
|
-
|
|
|
-/* Post model $_Schema:
|
|
|
- * _id => MongoID
|
|
|
- * user_id -> mongoID of the user that posted it
|
|
|
- * datetime -> mongodate of when the post was posted
|
|
|
- * body -> the text of the post
|
|
|
- * level -> access level required to see the post
|
|
|
- * comments[] => list of comments
|
|
|
- * type -> the type of post, IE picture text, chat etc
|
|
|
- */
|
|
|
+ public $belongsTo = array('User', 'Friends' => array('keys' => array('ToUserId' => 'id')));
|
|
|
|
|
|
/**
|
|
|
* Parses an array of words to find mentions and topic tags then converts them
|