12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace huo\model\message;
- use huo\model\common\CommonModel;
- class MemMessageModel extends CommonModel {
- protected $name = 'mem_message';
-
- protected $autoWriteTimestamp = true;
-
- protected function base($query) {
- $query->where('delete_time', 0)
- ->where('is_delete', 2);
- }
-
- public static function addMessage($data) {
- if (!$data) {
- return false;
- }
- if ($obj = self::create($data)) {
- return $obj->id;
- } else {
- return false;
- }
- }
- }
|