39 lines
681 B
PHP
Executable File
39 lines
681 B
PHP
Executable File
<?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;
|
|
}
|
|
|
|
}
|