Admin.php 421 B

123456789101112131415161718192021
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2021 勾股工作室
  4. * @license https://opensource.org/licenses/Apache-2.0
  5. * @link https://www.gougucms.com
  6. */
  7. namespace app\admin\model;
  8. use think\Model;
  9. class Admin extends Model{
  10. protected $table = 'cp_admin';
  11. public function department(){
  12. return $this->hasone('Department', 'id', 'unit_name')
  13. ->bind(['department_title' => 'title']);
  14. }
  15. }