First commit
This commit is contained in:
38
app/farm/model/ClaimTraceabilityOperation.php
Executable file
38
app/farm/model/ClaimTraceabilityOperation.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace app\farm\model;
|
||||
|
||||
use app\BaseModel;
|
||||
|
||||
class ClaimTraceabilityOperation extends BaseModel
|
||||
{
|
||||
//定义表名
|
||||
protected $name = 'lbfarm_claim_traceability_operation';
|
||||
|
||||
public function getList()
|
||||
{
|
||||
return $this->select();
|
||||
}
|
||||
|
||||
public function deleteData($traceability_id)
|
||||
{
|
||||
return $this->where('traceability_id', $traceability_id)->delete();
|
||||
}
|
||||
|
||||
public function addData($data)
|
||||
{
|
||||
|
||||
$res = $this->insert($data);
|
||||
|
||||
$id = $this->getLastInsID();
|
||||
return $id;
|
||||
}
|
||||
|
||||
public function updateDatas($data, $id)
|
||||
{
|
||||
|
||||
$res = $this->where('id', $id)->update($data);
|
||||
return $res;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user