示例#1
0
 /**
  * function ::create ($data)
  */
 public static function create($data)
 {
     $now = strtotime('now');
     $model = new ProductFollowing();
     if ($model->load($data)) {
         $model->created_at = $now;
         $model->status = 0;
         if ($model->save()) {
             return $model;
         }
         $model->getErrors();
         return $model;
     }
     return false;
 }