Add description field to nodes (#1065)

This commit is contained in:
Stan 2018-03-26 20:57:24 +02:00 committed by Dane Everitt
parent 56478d81da
commit f1a76ec7fd
5 changed files with 65 additions and 11 deletions

View file

@ -63,6 +63,7 @@ class Node extends Model implements CleansAttributes, ValidableContract
'disk_overallocate', 'upload_size',
'daemonSecret', 'daemonBase',
'daemonSFTP', 'daemonListen',
'description',
];
/**
@ -99,6 +100,7 @@ class Node extends Model implements CleansAttributes, ValidableContract
*/
protected static $dataIntegrityRules = [
'name' => 'regex:/^([\w .-]{1,100})$/',
'description' => 'string',
'location_id' => 'exists:locations,id',
'public' => 'boolean',
'fqdn' => 'string',
@ -226,4 +228,5 @@ class Node extends Model implements CleansAttributes, ValidableContract
{
return $this->hasMany(Allocation::class);
}
}
}