the upload tree, and public form submissions are size-bounded and rate-limited
61 lines
1.6 KiB
PHP
61 lines
1.6 KiB
PHP
<?php
|
|
|
|
return [
|
|
"title" => "Form",
|
|
"author" => "Paul Spenke",
|
|
"identifier" => "form",
|
|
"licence" => "MIT",
|
|
"version" => "1.0.0",
|
|
"settings" => [
|
|
[
|
|
"name" => "email",
|
|
"label" => "Email",
|
|
"default" => "admin@example.com",
|
|
"type" => "text",
|
|
],
|
|
],
|
|
"assets" => [
|
|
[
|
|
"src" => "/assets/dist.css",
|
|
"type" => "style",
|
|
"location" => "header",
|
|
],
|
|
[
|
|
"src" => "/assets/dist.js",
|
|
"type" => "script",
|
|
"location" => "footer",
|
|
],
|
|
],
|
|
"tables" => [
|
|
"entries" => [
|
|
"columns" => [
|
|
"formId" => "int NOT NULL",
|
|
"data" => "longtext NOT NULL",
|
|
"created" => "timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP",
|
|
],
|
|
"uniqueKeys" => [],
|
|
],
|
|
"submission_limits" => [
|
|
"columns" => [
|
|
"formId" => "int NOT NULL",
|
|
"ipHash" => "char(64) NOT NULL",
|
|
"startedAt" => "int unsigned NOT NULL",
|
|
"submissions" => "int unsigned NOT NULL",
|
|
],
|
|
"uniqueKeys" => [
|
|
"form_ip" => ["formId", "ipHash"],
|
|
],
|
|
],
|
|
"definitions" => [
|
|
"columns" => [
|
|
"name" => "varchar(255) NOT NULL",
|
|
"fields" => "longtext NOT NULL",
|
|
"finishers" => "longtext NOT NULL",
|
|
],
|
|
"uniqueKeys" => [
|
|
"name" => ["name"],
|
|
],
|
|
],
|
|
],
|
|
];
|