FundAdminModel.php 852 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace App\Module\Fund\Models;
  3. use App\Module\Fund\Enums\FUND_TYPE;
  4. use UCore\ModelCore;
  5. class FundAdminModel extends ModelCore
  6. {
  7. protected $table = 'fund_admin';
  8. protected $fillable = [
  9. 'admin_id',
  10. 'admin_name',
  11. 'fund_id',
  12. 'type',
  13. 'status',
  14. 'remark',
  15. 'create_time',
  16. 'create_ip',
  17. 'update_time',
  18. 'update_ip'
  19. ];
  20. public $timestamps = false;
  21. protected $casts = [
  22. 'fund_id' => FUND_TYPE::class,
  23. ];
  24. /**
  25. * 获取管理员信息
  26. */
  27. public function admin()
  28. {
  29. return $this->belongsTo('Dcat\Admin\Models\Administrator', 'admin_id');
  30. }
  31. /**
  32. * 获取资金账户
  33. */
  34. public function fund()
  35. {
  36. return $this->belongsTo('App\Module\Fund\Models\FundModel', 'fund_id');
  37. }
  38. }