mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 02:44:42 +00:00
All models
This commit is contained in:
35
backend/app/Models/Order.php
Normal file
35
backend/app/Models/Order.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Order extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'offer_id',
|
||||
'user_id',
|
||||
'start_date',
|
||||
'end_date',
|
||||
'price',
|
||||
'discount',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'start_date' => 'datetime',
|
||||
'end_date' => 'datetime',
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user