|
@@ -1,7 +1,7 @@
|
|
|
<?php
|
|
|
namespace app\user\model;
|
|
|
|
|
|
-use think\Exception;class Headquarters extends Base
|
|
|
+use think\Exception;use think\Model;class Headquarters extends Base
|
|
|
{
|
|
|
//设置字段信息
|
|
|
protected $schema = [
|
|
@@ -165,4 +165,8 @@ use think\Exception;class Headquarters extends Base
|
|
|
public function customerInfo(){
|
|
|
return $this->belongsTo(CustomerInfo::class,'code','companyNo');
|
|
|
}
|
|
|
+
|
|
|
+ public static function onAfterUpdate($model) {
|
|
|
+ event("copyCompany",$model->toArray());
|
|
|
+ }
|
|
|
}
|