12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace app\common\model;
- use think\facade\Db;
- class Document extends BaseModel {
-
- public function getDocumentList() {
- return Db::name('document')->select()->toArray();
- }
-
- public function getOneDocumentById($id) {
- return Db::name('document')->where('document_id',$id)->find();
- }
-
- public function getOneDocumentByCode($code) {
- return Db::name('document')->where('document_code',$code)->find();
- }
-
- public function editDocument($data) {
- return Db::name('document')->where('document_id',$data['document_id'])->update($data);
- }
- }
- ?>
|