123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\model;
- use DateTimeInterface;
- use support\Model;
- class MarketCustomerLogs extends Model
- {
- protected $table = 'market_customer_logs';
- protected $dateFormat = 'U';
- public function serializeDate(DateTimeInterface $date)
- {
- return $date->format('Y-m-d H:i:s');
- }
- public function custom()
- {
- return $this->belongsTo(MarketCustomer::class, 'market_customer_id');
- }
- public function beforeMan()
- {
- return $this->belongsTo(Consultant::class, 'before_consultant_id');
- }
- public function currentMan()
- {
- return $this->belongsTo(Consultant::class, 'consultant_id');
- }
- public function opBackPerson()
- {
- return $this->belongsTo(SysUser::class, 'change_user_id');
- }
- public function opFrontPerson()
- {
- return $this->belongsTo(Consultant::class, 'change_consultant_id');
- }
- }
|