| Total Complexity | 1 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Order extends Model |
||
| 11 | { |
||
| 12 | use HasFactory, |
||
|
|
|||
| 13 | Concerns\Order\Attribute, |
||
| 14 | Concerns\Order\Event, |
||
| 15 | Concerns\Order\Relation; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * {@inheritDoc} |
||
| 19 | */ |
||
| 20 | protected $fillable = [ |
||
| 21 | 'schedule_date', |
||
| 22 | ]; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritDoc} |
||
| 26 | */ |
||
| 27 | protected $casts = [ |
||
| 28 | 'schedule_date' => 'datetime', |
||
| 29 | ]; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritDoc} |
||
| 33 | */ |
||
| 34 | protected $appends = [ |
||
| 35 | 'status', |
||
| 36 | 'item_total_bundle_quantity', |
||
| 37 | 'item_total', |
||
| 38 | ]; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Generate code for this model. |
||
| 42 | * |
||
| 43 | * @param string $prefix |
||
| 44 | * @param \Illuminate\Support\Carbon|null $date |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public function generateCode(string $prefix = 'BCA', Carbon $date = null): string |
||
| 54 |