Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| TblBudgetStatus | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
| statusExistByName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace App\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory; |
| 6 | use Illuminate\Database\Eloquent\Model; |
| 7 | |
| 8 | class TblBudgetStatus extends Model |
| 9 | { |
| 10 | use HasFactory; |
| 11 | |
| 12 | protected $table = 'tbl_budget_status'; |
| 13 | |
| 14 | public $timestamps = false; |
| 15 | |
| 16 | protected $fillable = [ |
| 17 | 'company_id', |
| 18 | 'name', |
| 19 | 'move_to_rejected_automatically', |
| 20 | 'days_to_move_to_rejected_automatically', |
| 21 | 'created_by', |
| 22 | 'created_at', |
| 23 | 'priority', |
| 24 | 'default', |
| 25 | 'disabled', |
| 26 | 'is_request', |
| 27 | ]; |
| 28 | |
| 29 | /** |
| 30 | * Check if there is a record with the `internal_quote_id` equal to `$g3w_id`. |
| 31 | * |
| 32 | * @param $g3w_status_name String Text of the G3W satuts |
| 33 | * @return bool |
| 34 | */ |
| 35 | public static function statusExistByName($g3w_status_name) |
| 36 | { |
| 37 | return self::where('name', $g3w_status_name)->exists(); |
| 38 | } |
| 39 | } |