| 1: | <?php |
| 2: | /** |
| 3: | * This code is licensed under AGPLv3 license or Afterlogic Software License |
| 4: | * if commercial version of the product was purchased. |
| 5: | * For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files. |
| 6: | */ |
| 7: | |
| 8: | namespace Aurora\Modules\Core\Models; |
| 9: | |
| 10: | use Aurora\System\Classes\Model; |
| 11: | |
| 12: | /** |
| 13: | * The Core GroupUser class. |
| 14: | * |
| 15: | * @license https://www.gnu.org/licenses/agpl-3.0.html AGPL-3.0 |
| 16: | * @license https://afterlogic.com/products/common-licensing Afterlogic Software License |
| 17: | * @copyright Copyright (c) 2023, Afterlogic Corp. |
| 18: | * @property int $Id Object primary key |
| 19: | * @property int $GroupId Group ID |
| 20: | * @property int $UserId User ID |
| 21: | * @property-read mixed $entity_id |
| 22: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\Core\Models\GroupUser firstWhere(Closure|string|array|\Illuminate\Database\Query\Expression $column, mixed $operator = null, mixed $value = null, string $boolean = 'and') |
| 23: | * @method static \Illuminate\Database\Eloquent\Builder|GroupUser newModelQuery() |
| 24: | * @method static \Illuminate\Database\Eloquent\Builder|GroupUser newQuery() |
| 25: | * @method static \Illuminate\Database\Eloquent\Builder|GroupUser query() |
| 26: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\Core\Models\GroupUser where(Closure|string|array|\Illuminate\Database\Query\Expression $column, mixed $operator = null, mixed $value = null, string $boolean = 'and') |
| 27: | * @method static \Illuminate\Database\Eloquent\Builder|GroupUser whereGroupId($value) |
| 28: | * @method static \Illuminate\Database\Eloquent\Builder|GroupUser whereId($value) |
| 29: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\Core\Models\GroupUser whereIn(string $column, mixed $values, string $boolean = 'and', bool $not = false) |
| 30: | * @method static \Illuminate\Database\Eloquent\Builder|GroupUser whereUserId($value) |
| 31: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\Core\Models\GroupUser find(int|string $id, array|string $columns = ['*']) |
| 32: | * @method static int count(string $columns = '*') |
| 33: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\Core\Models\GroupUser findOrFail(int|string $id, mixed $id, Closure|array|string $columns = ['*'], Closure $callback = null) |
| 34: | * @method static \Illuminate\Database\Eloquent\Builder|\Aurora\Modules\Core\Models\GroupUser first(array|string $columns = ['*']) |
| 35: | * @mixin \Eloquent |
| 36: | */ |
| 37: | class GroupUser extends Model |
| 38: | { |
| 39: | public $table = 'core_group_user'; |
| 40: | protected $foreignModel = Group::class; |
| 41: | protected $foreignModelIdColumn = 'GroupId'; // Column that refers to an external table |
| 42: | |
| 43: | /** |
| 44: | * The attributes that are mass assignable. |
| 45: | * |
| 46: | * @var array |
| 47: | */ |
| 48: | protected $fillable = [ |
| 49: | 'Id', |
| 50: | 'GroupId', |
| 51: | 'UserId' |
| 52: | ]; |
| 53: | } |
| 54: |