/**
  * Creates a new message in the db
  * @return 1 is message created successfully, 0 otherwise
  */
 public static function sendMessage()
 {
     $post = Core\Input::post();
     if (isset($post['senderId']) && isset($post['recipientId']) && isset($post['petId']) && isset($post['message'])) {
         $messageObj = new Message($post['senderId'], $post['recipientId'], 'new', $post['message'], time(), time(), 1, 1);
         $res = Model\Message::createMesage($messageObj);
         return $res;
     }
 }
 /**
  * Create a new Message record in the database
  * @return int  row id of newly created message row 
  */
 public function save()
 {
     return Model\Message::createMesage($this);
 }