Borrow.php 336 B

123456789101112131415161718
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. use think\model\concern\SoftDelete;
  5. class Borrow extends Model
  6. {
  7. use SoftDelete;
  8. protected $deleteTime = 'delete_time';
  9. public function Admin()
  10. {
  11. // 指定关联Admin模型的数据库连接
  12. return $this->hasOne(Admin::class, 'id','user_id');
  13. }
  14. }