Changeset View
Changeset View
Standalone View
Standalone View
src/app/SharedFolder.php
Show All 27 Lines | class SharedFolder extends Model | ||||
use AliasesTrait; | use AliasesTrait; | ||||
use BelongsToTenantTrait; | use BelongsToTenantTrait; | ||||
use EntitleableTrait; | use EntitleableTrait; | ||||
use SharedFolderConfigTrait; | use SharedFolderConfigTrait; | ||||
use SettingsTrait; | use SettingsTrait; | ||||
use SoftDeletes; | use SoftDeletes; | ||||
use StatusPropertyTrait; | use StatusPropertyTrait; | ||||
use UuidIntKeyTrait; | use UuidIntKeyTrait; | ||||
use EmailPropertyTrait; // must be first after UuidIntKeyTrait | use EmailPropertyTrait; // must be after UuidIntKeyTrait | ||||
// we've simply never heard of this folder | // we've simply never heard of this folder | ||||
public const STATUS_NEW = 1 << 0; | public const STATUS_NEW = 1 << 0; | ||||
// folder has been activated | // folder has been activated | ||||
public const STATUS_ACTIVE = 1 << 1; | public const STATUS_ACTIVE = 1 << 1; | ||||
// folder has been suspended. | // folder has been suspended. | ||||
// public const STATUS_SUSPENDED = 1 << 2; | // public const STATUS_SUSPENDED = 1 << 2; | ||||
// folder has been deleted | // folder has been deleted | ||||
public const STATUS_DELETED = 1 << 3; | public const STATUS_DELETED = 1 << 3; | ||||
// folder has been created in LDAP | // folder has been created in LDAP | ||||
public const STATUS_LDAP_READY = 1 << 4; | public const STATUS_LDAP_READY = 1 << 4; | ||||
// folder has been created in IMAP | // folder has been created in IMAP | ||||
public const STATUS_IMAP_READY = 1 << 8; | public const STATUS_IMAP_READY = 1 << 8; | ||||
/** @const array Supported folder type labels */ | /** @const array Supported folder type labels */ | ||||
public const SUPPORTED_TYPES = ['mail', 'event', 'contact', 'task', 'note', 'file']; | public const SUPPORTED_TYPES = ['mail', 'event', 'contact', 'task', 'note', 'file']; | ||||
/** @const string A template for the email attribute on a folder creation */ | /** @const string A template for the email attribute on a folder creation */ | ||||
public const EMAIL_TEMPLATE = '{type}-{id}@{domainName}'; | public const EMAIL_TEMPLATE = '{type}-{id}@{domainName}'; | ||||
/** @var array Mass-assignable properties */ | /** @var array<string, string> The attributes that should be cast */ | ||||
protected $casts = [ | |||||
'created_at' => 'datetime:Y-m-d H:i:s', | |||||
'deleted_at' => 'datetime:Y-m-d H:i:s', | |||||
'updated_at' => 'datetime:Y-m-d H:i:s', | |||||
]; | |||||
/** @var array<int, string> The attributes that are mass assignable */ | |||||
protected $fillable = [ | protected $fillable = [ | ||||
'email', | 'email', | ||||
'name', | 'name', | ||||
'status', | 'status', | ||||
'type', | 'type', | ||||
]; | ]; | ||||
/** | /** | ||||
Show All 13 Lines |