1
0

AgentApplyIntegral.php 514 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\model;
  3. use think\Model;
  4. class AgentApplyIntegral extends Model
  5. {
  6. //
  7. public function agent()
  8. {
  9. return $this->hasOne(AgentUser::class, 'id', 'agent_id');
  10. }
  11. public function employee()
  12. {
  13. return $this->hasOne(Employee::class, 'id', 'empid');
  14. }
  15. public function user()
  16. {
  17. return $this->hasOne(User::class, 'id', 'uid');
  18. }
  19. public function customer()
  20. {
  21. return $this->hasMany(Customer::class, 'agents_id', 'id');
  22. }
  23. }