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