Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobg committed Sep 22, 2021
1 parent 7132412 commit 552e10f
Show file tree
Hide file tree
Showing 12 changed files with 224 additions and 143 deletions.
14 changes: 14 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
title: Modelarium
description: Modern Code Scaffolding for PHP and JS
remote_theme: pmarsceill/just-the-docs
footer_content: '<a href="https://github.com/Corollarium/modelarium">Modelarium source code</a>, <a href="https://github.com/pmarsceill/just-the-docs/tree/master/LICENSE.txt">MIT license.</a>'

# Footer "Edit this page on GitHub" link text
gh_edit_link: true # show or hide edit this page link
gh_edit_link_text: "Edit this page on GitHub."
gh_edit_repository: "https://github.com/Corollarium/modelarium" # the github URL for your repo
gh_edit_branch: "master" # the branch that your docs is served from
gh_edit_source: docs # the source that your files originate from
gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately

# Aux links for the upper right navigation
aux_links:
"Modelarium on GitHub":
- "//github.com/Corollarium/modelarium"
81 changes: 2 additions & 79 deletions docs/api-datatypes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# Datatypes
# Datatypes Referece

List of validators and its parameters generated automatically.

Expand All @@ -13,8 +12,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## alphanum

String with only alphabetical ASCII letters and numbers.
Expand All @@ -25,20 +22,16 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## alphanumdash

String with only alphabetical ASCII letters, numbers, underscore _ and dash -.
String with only alphabetical ASCII letters, numbers, underscore \_ and dash -.

Random value example: 'RnukkJS-cZinbmJ'

SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## bool

Datatype for boolean values. Accepts actual boolean values, "true"/"false" strings and 0/1 numbers.
Expand All @@ -49,8 +42,6 @@ SQL datatype: INT

Laravel SQL datatype: boolean(name)



## boolean

Datatype for boolean values. Accepts actual boolean values, "true"/"false" strings and 0/1 numbers.
Expand All @@ -61,8 +52,6 @@ SQL datatype: INT

Laravel SQL datatype: boolean(name)



## cnpj

Datatype for Brazilian CNPJ document numbers.
Expand All @@ -73,8 +62,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## color

Datatype for RGB colors in hexadecimeal format, starting with #.
Expand All @@ -85,14 +72,10 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## constant

Constant values



## countrycodeiso2

Country names represented by ISO 2-letter codes.
Expand All @@ -103,8 +86,6 @@ SQL datatype: CHAR(2)

Laravel SQL datatype: char('name', 2)



## countrycodeiso3

Country names represented by ISO 3-letter codes.
Expand All @@ -115,8 +96,6 @@ SQL datatype: CHAR(3)

Laravel SQL datatype: char('name', 3)



## countrycodenumeric

Country names represented by ISO numeric codes.
Expand All @@ -127,8 +106,6 @@ SQL datatype: CHAR(3)

Laravel SQL datatype: char('name', 3)



## cpf

Datatype for Brazilian CPF document numbers.
Expand All @@ -139,8 +116,6 @@ SQL datatype: VARCHAR(13)

Laravel SQL datatype: string(name, 13)



## currency

Currency names, with their 3-letter codes.
Expand All @@ -151,8 +126,6 @@ SQL datatype: CHAR(3)

Laravel SQL datatype: char(name, 3)



## date

Dates in ISO format: YYYY-MM-DD.
Expand All @@ -163,8 +136,6 @@ SQL datatype: DATE

Laravel SQL datatype: date



## datetime

Datetimes in ISO8601 format.
Expand All @@ -175,8 +146,6 @@ SQL datatype: DATETIME

Laravel SQL datatype: datetime('name')



## domain

Internet domain names.
Expand All @@ -187,8 +156,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## email

Emails (hopefully, but we use Respect for validation)
Expand All @@ -199,14 +166,8 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## file





## float

Floating point numbers.
Expand All @@ -217,8 +178,6 @@ SQL datatype: FLOAT

Laravel SQL datatype: float('name')



## html

HTML, validated and sanitized with HTMLPurifier.
Expand All @@ -229,8 +188,6 @@ SQL datatype: TEXT

Laravel SQL datatype: text('name')



## integer

Datatype for integers, between -2147483648 and 2147483647.
Expand All @@ -241,8 +198,6 @@ SQL datatype: INT

Laravel SQL datatype: integer("name")



## ip

Strings in UTF-8 and sanitized, up to 256 characters (which might be more than its bytes).
Expand All @@ -253,8 +208,6 @@ SQL datatype: VARCHAR(39)

Laravel SQL datatype: ipAdddress('name')



## ipv4

Datatype for IPs in IPV4 format
Expand All @@ -265,8 +218,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## ipv6

Datatype for IPs in IPV6 format
Expand All @@ -277,8 +228,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## json

Valid JSON data
Expand All @@ -289,8 +238,6 @@ SQL datatype: TEXT

Laravel SQL datatype: text('name')



## language

Languages. Names are in the actual language. Codes follow ISO 639-1 codes.
Expand All @@ -301,8 +248,6 @@ SQL datatype: VARCHAR(10)

Laravel SQL datatype: string(name, 10)



## phone

A phone number in E164 format
Expand All @@ -313,8 +258,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## string

Strings in UTF-8 and sanitized, up to 256 characters (which might be more than its bytes).
Expand All @@ -325,8 +268,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## text

Strings in UTF-8 and sanitized, up to 1024000 characters (which might be more than its bytes).
Expand All @@ -337,8 +278,6 @@ SQL datatype: TEXT

Laravel SQL datatype: text('name')



## time

Time (HH:MM:SS).
Expand All @@ -349,8 +288,6 @@ SQL datatype: TIME

Laravel SQL datatype: time('name', 0)



## timestamp

Timestamps. Just like datetime, but might be a different type in your database.
Expand All @@ -361,8 +298,6 @@ SQL datatype: TIMESTAMP

Laravel SQL datatype: timestamp('name')



## timezone

Timezones. Follows PHP timezone_identifiers_list().
Expand All @@ -373,8 +308,6 @@ SQL datatype: VARCHAR(50)

Laravel SQL datatype: string(name, 50)



## uinteger

Datatype for unsigned integers, between 0 and 4294967296.
Expand All @@ -385,8 +318,6 @@ SQL datatype: INT UNSIGNED

Laravel SQL datatype: integer("name")->unsigned()



## url

Datatype for URLs
Expand All @@ -397,8 +328,6 @@ SQL datatype: VARCHAR(256)

Laravel SQL datatype: string('name', 256)



## usmall

Datatype for unsigned small integers, between 0 and 65536.
Expand All @@ -409,8 +338,6 @@ SQL datatype: SMALLINT UNSIGNED

Laravel SQL datatype: smallInteger("name")->unsigned()



## uuid

Datatype for uuid values.
Expand All @@ -421,8 +348,6 @@ SQL datatype: CHAR(16)

Laravel SQL datatype: uuid('name')



## year

Valid years. May create a special field in the database.
Expand All @@ -432,5 +357,3 @@ Random value example: 935433446
SQL datatype: INT

Laravel SQL datatype: year('name')


6 changes: 5 additions & 1 deletion docs/datatype.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Datatype
---
nav_order: 9
---

# Datatypes

Here's how to create a new Datatype in your application that works in your application. [Datatypes are created with Formularium](https://github.com/Corollarium/Formularium/).

Expand Down
4 changes: 4 additions & 0 deletions docs/directive.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
nav_order: 8
---

# Directives

This is about implementing new directives.
Expand Down
Loading

0 comments on commit 552e10f

Please sign in to comment.