BasicProcess.php 508 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace App\Model;
  3. use Illuminate\Database\Eloquent\Model;
  4. /**
  5. * 工艺属性
  6. * Class Unit
  7. * @package App\Models
  8. */
  9. class BasicProcess extends Model
  10. {
  11. protected $table = "basic_process"; //指定表
  12. const CREATED_AT = 'crt_time';
  13. const UPDATED_AT = 'upd_time';
  14. protected $dateFormat = 'U';
  15. public function scopeWhereUnDel($query,$name='')
  16. {
  17. if(empty($name)) return $query->where('del_time', '=', 0);
  18. else return $query->where($name, '=', 0);
  19. }
  20. }