edit schema wip

This commit is contained in:
2026-01-08 15:19:08 +02:00
parent ebccac210a
commit 25ad3fefab
18 changed files with 714 additions and 45 deletions
+7 -2
View File
@@ -18,10 +18,15 @@ class FieldProp
};
}
public static function fromDb(string $propsJson): IFieldProp
public static function fromDb(string $type, string $propsJson): IFieldProp
{
$props = json_decode($propsJson, true);
return match ($props["type"]) {
return self::fromArray($type, $props);
}
public static function fromArray(string $type, array $props): IFieldProp
{
return match ($type) {
"text" => new TextFieldProp(
required: $props["required"] ?? false,
readonly: $props["readonly"] ?? false,