Select.php 460 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Select extends Model
  5. {
  6. protected $table='se_code';
  7. public function select_good(){
  8. return $this->belongsTo(GoodSelect::class,'good_select_id','id');
  9. }
  10. public function select_user(){
  11. return $this->belongsTo(User::class,'user_id');
  12. }
  13. public function select_good_log(){
  14. return $this->hasOne(SendGoodLog::class,'select_id','id');
  15. }
  16. }