mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 03:08:51 +02:00
Use ColumnSecurity for remaing part properties.
This commit is contained in:
parent
47fe76b22e
commit
b5fecee465
2 changed files with 35 additions and 1 deletions
|
@ -68,7 +68,7 @@ class ColumnSecurity
|
|||
|
||||
/**
|
||||
* @var string The name of the property. This is used to determine the default placeholder.
|
||||
* @Annotation\Enum({"integer", "string", "object"})
|
||||
* @Annotation\Enum({"integer", "string", "object", "boolean", "datetime"})
|
||||
*/
|
||||
public $type = 'string';
|
||||
|
||||
|
@ -101,6 +101,11 @@ class ColumnSecurity
|
|||
return '???';
|
||||
case 'object':
|
||||
return null;
|
||||
case 'boolean':
|
||||
return false;
|
||||
case 'datetime':
|
||||
$date = new \DateTime();
|
||||
return $date->setTimestamp(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue