初始化

This commit is contained in:
2026-08-08 18:28:49 +08:00
parent 9bef4420e0
commit f082037a6e
854 changed files with 217171 additions and 11 deletions
+36
View File
@@ -0,0 +1,36 @@
<?php
namespace app\models;
use core\base\Model;
/**
* 客户模型
*/
class Customer extends Model
{
protected $table = 'customer';
// 获取所有客户
public function getAll()
{
return $this->order(['id ASC'])->fetchAll();
}
// 添加客户
public function addCustomer($data)
{
return $this->add($data);
}
// 更新客户
public function updateCustomer($id, $data)
{
return $this->where(['id = :id'], [':id' => $id])->update($data);
}
// 删除客户
public function deleteCustomer($id)
{
return $this->delete($id);
}
}