DepartmentObligationOwner.php 592 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App;
  3. use App\Traits\ModelTimeFormat;
  4. use Illuminate\Database\Eloquent\Model;
  5. use App\Traits\ModelLogChanging;
  6. class DepartmentObligationOwner extends Model
  7. {
  8. use ModelLogChanging;
  9. use ModelTimeFormat;
  10. public $timestamps=false;
  11. protected $table='department_obligation_owner';
  12. protected $fillable=[
  13. 'department_id','obligation_id', 'owner_id', 'valid_time','create_time', 'update_time','delete_flag','failure_time'
  14. ];
  15. public function department()
  16. {
  17. return $this->hasOne(UserWorkgroup::class,"id","department_id");
  18. }
  19. }