Basic tenant structure

This commit is contained in:
2026-01-31 20:07:41 +01:00
parent 825af15962
commit 3570f442f5
35 changed files with 634 additions and 144 deletions

39
app/Models/Tenant.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
namespace App\Models;
use App\Scopes\CommonModel;
/**
* @property string $slug
* @property string $local_group
* @property string $email
* @property string $url
* @property string $account_iban
* @property string $city
* @property string $postcode
* @property string $gdpr_text
* @property string $impress_text
* @property string $url_participation_rules
* @property boolean $events_allowed
* @property boolean $has_active_instance
*/
class Tenant extends CommonModel
{
public const PRIMARY_TENANT_NAME = 'LV';
protected $fillable = [
'slug',
'local_group_name',
'email',
'url',
'account_iban',
'city',
'postcode',
'gdpr_text',
'impress_text',
'url_participation_rules',
'is_active_local_group',
'has_active_instance'
];
}

View File

@@ -2,15 +2,12 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
use Notifiable;
/**
* The attributes that are mass assignable.
@@ -18,8 +15,28 @@ class User extends Authenticatable
* @var list<string>
*/
protected $fillable = [
'name',
'tenant_id',
'user_role',
'username',
'firstname',
'nickname',
'lastname',
'local_group_id',
'membership_id',
'address_1',
'address_2',
'postcode',
'city',
'email',
'phone',
'birthday',
'medications',
'allergies',
'intolerances',
'eating_habits',
'swimming_permission',
'first_aid_permission',
'bank_account_iban',
'password',
];
@@ -29,7 +46,6 @@ class User extends Authenticatable
* @var list<string>
*/
protected $hidden = [
'password',
'remember_token',
];