Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 3 |
| Bank | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 3 |
| company | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
|||
| bankStmts | |
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\Compta\Models; |
| 4 | |
| 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | |
| 7 | class Bank extends Model |
| 8 | { |
| 9 | protected $connection = 'comptability'; |
| 10 | |
| 11 | protected $table = 'bank_stmts'; |
| 12 | |
| 13 | /** |
| 14 | * Get the post that owns the comment. |
| 15 | */ |
| 16 | public function company() |
| 17 | { |
| 18 | return $this->belongsTo('Qmp\Laravel\Compta\Models\Company'); |
| 19 | } |
| 20 | |
| 21 | |
| 22 | /** |
| 23 | * Get the comments for the blog post. |
| 24 | */ |
| 25 | public function bankStmts() |
| 26 | { |
| 27 | return $this->hasMany('Qmp\Laravel\Compta\Models\BankStmt'); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Prepare a date for array / JSON serialization. |
| 32 | * |
| 33 | * @param \DateTimeInterface $date |
| 34 | * @return string |
| 35 | */ |
| 36 | protected function serializeDate(\DateTimeInterface $date) |
| 37 | { |
| 38 | return $date->format('Y-m-d H:i:s'); |
| 39 | } |
| 40 | |
| 41 | } |