Move fido configuation items into fido namespace. If keeping packets move them into a date aligned subdir

This commit is contained in:
2023-09-22 14:45:44 +10:00
parent 22c8b3df74
commit 2ae24b9955
13 changed files with 97 additions and 26 deletions

View File

@@ -19,6 +19,8 @@ class File extends Model
private const LOGKEY = 'MF-';
private bool $no_export = FALSE;
public string $prefix = '';
public string $replaces = '';
protected $casts = [
'kludges' => CollectionOrNull::class,
@@ -162,11 +164,31 @@ class File extends Model
/* ATTRIBUTES */
/**
* Return the relative path to Storage::disk() in the store
*
* @return string
*/
public function getFullStoragePathAttribute(): string
{
return sprintf('%04X/%s',$this->filearea_id,$this->name);
}
/**
* Return the relative path to Storage::disk() in the inbound;
*
* @return string
*/
public function getRelNameAttribute(): string
{
return sprintf('%s/%s',config('fido.dir'),$this->prefix_name);
}
public function getPrefixNameAttribute(): string
{
return sprintf('%s%s',$this->prefix ? $this->prefix.'-' : '',$this->name);
}
/* METHODS */
public function jsonSerialize(): array