1: | <?php |
2: | /** |
3: | * This code is licensed under Afterlogic Software License. |
4: | * For full statements of the license see LICENSE file. |
5: | */ |
6: | |
7: | namespace Aurora\Modules\ActivityHistory\Models; |
8: | |
9: | use Aurora\Modules\Core\Models\User; |
10: | |
11: | /** |
12: | * Aurora\Modules\ActivityHistory\Models\ActivityHistory |
13: | * |
14: | * @license https://afterlogic.com/products/common-licensing Afterlogic Software License |
15: | * @copyright Copyright (c) 2023, Afterlogic Corp. |
16: | * @property int $Id |
17: | * @property int $UserId |
18: | * @property string $ResourceType |
19: | * @property string $ResourceId |
20: | * @property string $IpAddress |
21: | * @property string $Action |
22: | * @property int $Timestamp |
23: | * @property string $GuestPublicId |
24: | * @property \Illuminate\Support\Carbon|null $CreatedAt |
25: | * @property \Illuminate\Support\Carbon|null $UpdatedAt |
26: | * @property-read mixed $entity_id |
27: | * @method static int count(string $columns = '*') |
28: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\ActivityHistory\Models\ActivityHistory find(int|string $id, array|string $columns = ['*']) |
29: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\ActivityHistory\Models\ActivityHistory findOrFail(int|string $id, mixed $id, Closure|array|string $columns = ['*'], Closure $callback = null) |
30: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\ActivityHistory\Models\ActivityHistory first(array|string $columns = ['*']) |
31: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\ActivityHistory\Models\ActivityHistory firstWhere(Closure|string|array|\Illuminate\Database\Query\Expression $column, mixed $operator = null, mixed $value = null, string $boolean = 'and') |
32: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory newModelQuery() |
33: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory newQuery() |
34: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory query() |
35: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory create(array $attributes) |
36: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\ActivityHistory\Models\ActivityHistory where(Closure|string|array|\Illuminate\Database\Query\Expression $column, mixed $operator = null, mixed $value = null, string $boolean = 'and') |
37: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereAction($value) |
38: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereCreatedAt($value) |
39: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereGuestPublicId($value) |
40: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereId($value) |
41: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\ActivityHistory\Models\ActivityHistory whereIn(string $column, mixed $values, string $boolean = 'and', bool $not = false) |
42: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereIpAddress($value) |
43: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereResourceId($value) |
44: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereResourceType($value) |
45: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereTimestamp($value) |
46: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereUpdatedAt($value) |
47: | * @method static \Illuminate\Database\Eloquent\Builder|ActivityHistory whereUserId($value) |
48: | * @mixin \Eloquent |
49: | */ |
50: | class ActivityHistory extends \Aurora\System\Classes\Model |
51: | { |
52: | protected $table = 'core_activity_history'; |
53: | |
54: | protected $foreignModel = User::class; |
55: | protected $foreignModelIdColumn = 'UserId'; // Column that refers to an external table |
56: | |
57: | protected $fillable = [ |
58: | 'Id', |
59: | 'UserId', |
60: | 'ResourceType', |
61: | 'ResourceId', |
62: | 'IpAddress', |
63: | 'Action', |
64: | 'Timestamp', |
65: | 'GuestPublicId' |
66: | ]; |
67: | } |
68: |