123456789101112131415161718192021222324 |
- <?php
- namespace app\admin\model;
- use think\Model;
- /**
- * 配置模型
- */
- class MobileOrderAdmin extends Model
- {
- public static function add(\app\common\model\MobileOrder $mobileOrder,$when,$admin_id){
- if($when){
- self::create([
- 'mobile_order_id'=>$mobileOrder['id'],
- 'admin_id'=>$admin_id,
- ]);
- }
- }
- public function admin(){
- return $this->belongsTo(Admin::class,'admin_id','id',[])->setEagerlyType(0);
- }
- }
|