1: | <?php |
2: | |
3: | |
4: | |
5: | |
6: | |
7: | |
8: | namespace Aurora\Modules\CpanelIntegrator\Models; |
9: | |
10: | use Aurora\System\Classes\Model; |
11: | use Aurora\Modules\Mail\Models\MailAccount; |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | |
18: | |
19: | |
20: | class Alias extends Model |
21: | { |
22: | protected $table = 'cpanel_aliases'; |
23: | |
24: | protected $foreignModel = MailAccount::class; |
25: | protected $foreignModelIdColumn = 'IdAccount'; |
26: | |
27: | protected $fillable = [ |
28: | 'Id', |
29: | 'IdUser', |
30: | 'IdAccount', |
31: | 'Email', |
32: | 'ForwardTo', |
33: | 'FriendlyName', |
34: | 'UseSignature', |
35: | 'Signature' |
36: | ]; |
37: | |
38: | protected $appends = [ |
39: | 'EntityId' |
40: | ]; |
41: | |
42: | public function getEntityIdAttribute() |
43: | { |
44: | return $this->Id; |
45: | } |
46: | |
47: | public function __construct(array $attributes = []) |
48: | { |
49: | parent::__construct($attributes); |
50: | $this->Signature = ''; |
51: | } |
52: | } |
53: | |