|
@@ -7,24 +7,28 @@
|
|
|
|
|
|
defined('InShopNC') or exit('Access Invalid!');
|
|
|
|
|
|
-class bonus_typeModel extends Model {
|
|
|
+class bonus_typeModel extends Model
|
|
|
+{
|
|
|
public function __construct()
|
|
|
{
|
|
|
parent::__construct('bonus_type');
|
|
|
}
|
|
|
|
|
|
- public function getAll(){
|
|
|
+ public function getAll()
|
|
|
+ {
|
|
|
return $this->select();
|
|
|
}
|
|
|
|
|
|
- public function get($id){
|
|
|
+ public function get($id)
|
|
|
+ {
|
|
|
return $this->where(array('type_id' => $id))->select();
|
|
|
}
|
|
|
|
|
|
- public function save($data, &$id){
|
|
|
- if($id > 0){
|
|
|
+ public function save($data, &$id)
|
|
|
+ {
|
|
|
+ if ($id > 0) {
|
|
|
$this->where(array('type_id' => $id))->update($data);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
$id = $this->insert($data);
|
|
|
}
|
|
|
}
|