123456789101112131415161718192021222324252627 |
- <?php
- namespace app\model;
- use think\Model;
- class AgentUser extends Model
- {
- //
- public function employee()
- {
- return $this->hasOne(Employee::class, 'id', 'agent_employee_id');
- }
- public function user()
- {
- return $this->hasOne(User::class, 'id', 'uid');
- }
- public function customer()
- {
- return $this->hasMany(Customer::class, 'agents_id', 'id');
- }
- public function agenttype()
- {
- return $this->hasOne(AgentType::class, 'id', 'type');
- }
- }
|