SiteProcess.php 617 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Http\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class SiteProcess extends Model
  5. {
  6. protected $table = 'sites_process';
  7. protected $primaryKey = 'id';
  8. protected $guarded = [];
  9. protected $casts = [
  10. 'detail' => 'array',
  11. 'file_list' => 'array',
  12. 'evaluate' => 'array',
  13. 'check_items' => 'array',
  14. 'deploy' => 'array'
  15. ];
  16. public function process()
  17. {
  18. return $this->belongsTo(Process::class, 'process_id', 'id');
  19. }
  20. public function site()
  21. {
  22. return $this->belongsTo(Site::class, 'site_id', 'id');
  23. }
  24. }