客户删除
This commit is contained in:
@@ -37,6 +37,9 @@ class Customer extends Model
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
use SoftDeletes;
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $casts = [
|
||||
// 'updated_at' => 'datetime:Y-m-d H:i:s', // 指定序列化格式
|
||||
// 'created_at' => 'datetime:Y-m-d H:i:s', // 指定序列化格式
|
||||
@@ -67,9 +70,10 @@ class Customer extends Model
|
||||
$begin_follow = Follow::select('id','created_at','updated_at')
|
||||
->where($where)
|
||||
->min('created_at');
|
||||
$customer['begin_follow'] = $begin_follow;
|
||||
$customer['begin_follow'] = Util::timeTotDate($begin_follow);
|
||||
$customer['created_at'] = Util::timeTotDate($customer['created_at']);
|
||||
$customer['updated_at'] = Util::timeTotDate($customer['updated_at']);
|
||||
$customer['car_type_name'] = empty($customer['car_type_id'])?'':CarType::where(['id'=>$customer['car_type_id']])->value('name');
|
||||
// $customer['last_follow'] = $last_follow;
|
||||
|
||||
return $customer;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace app\model;
|
||||
|
||||
|
||||
use app\util\Util;
|
||||
use config\constants\Constants;
|
||||
use support\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -47,6 +48,7 @@ class Follow extends Model
|
||||
{
|
||||
$follow['type_txt'] = Constants::FOLLOW[$follow['type']];
|
||||
$follow['oss_picture'] = $domain.'/'.$follow['picture'];
|
||||
$follow = Util::formatDate($follow);
|
||||
return $follow;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user