| Code Coverage | ||||||||||
| Classes and Traits | Functions and Methods | Lines | ||||||||
| Total |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | CRAP |  | 0.00% | 0 / 1 | 
| DockerStat |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 1 | 
| serializeDate |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 1 | |||
| 1 | <?php | 
| 2 | |
| 3 | namespace Qmp\Laravel\DockerScale\Models; | 
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Model; | 
| 6 | |
| 7 | class DockerStat extends Model | 
| 8 | { | 
| 9 | protected $connection = 'dockerScale'; | 
| 10 | protected $table = 'docker_stats'; | 
| 11 | |
| 12 | protected $fillable = ['stat_id', 'service', 'task', 'name', 'container', 'cpu_perc', 'memory', 'memory_perc', 'pids', ]; | 
| 13 | |
| 14 | /** | 
| 15 | * Prepare a date for array / JSON serialization. | 
| 16 | * | 
| 17 | * @param \DateTimeInterface $date | 
| 18 | * @return string | 
| 19 | */ | 
| 20 | protected function serializeDate(\DateTimeInterface $date) | 
| 21 | { | 
| 22 | return $date->format('Y-m-d H:i:s'); | 
| 23 | } | 
| 24 | |
| 25 | } |