@@ -61,7 +61,7 @@ hawaii init -name <<filename>> --database_type <<db_type>> --connection_string <
6161```
6262** To add entity to the config:**
6363```
64- hawaii add <<entity>> -source <<source.DB>> --rest <<rest_route>> --graphql <<graphql_type>> --permissions <<rules:actions>>
64+ hawaii add <<entity>> -source <<source.DB>> --rest <<rest_route>> --graphql <<graphql_type>> --permission <<rules:actions>>
6565```
6666** To update entity to the config:**
6767```
@@ -76,13 +76,33 @@ hawaii init -n todo-001 --database_type "mysql" --connection_string "localhost:8
7676```
7777The Generated config will be in the current directory as todo-001.json
7878```
79- hawaii add todo --source s001.todo --rest todo --graphql todo --permissions "anonymous:*"
79+ hawaii add todo --source s001.todo --rest todo --graphql todo --permission "anonymous:*"
8080```
8181Entity will be added to the config with given rest route, graphql type and prermissions.
8282```
83- hawaii update todo --permissions "authenticate:create" --fields.include "id,name,category"
83+ hawaii update todo --permission "authenticate:create" --fields.include "id,name,category"
8484```
8585Entity will be updated in the config with the provided changes.
8686
87+ Generate config with some permissions and relationship
88+ ```
89+ hawaii init --name todo-005 --database-type mssql --connection-string ""
90+
91+ hawaii add todo --name todo-005 --source s005.todos --permission "authenticated:*"
92+
93+ hawaii add user --name todo-005 --source s005.users --permission "authenticated:*"
94+
95+ hawaii add category --name todo-005 --source s005.categories --permission "authenticated:read"
96+
97+ hawaii update category --name todo-005 --graphql category
8798
99+ hawaii update category --name todo-005 --relationship todos --target.entity todo --cardinality many --mapping.fields "id:category_id"
100+
101+ hawaii update todo --name todo-005 --relationship category --target.entity category --cardinality one --mapping.fields "category_id:id"
102+
103+ hawaii update user --name todo-005 --relationship owns --target.entity todo --cardinality many --mapping.fields "id:owner_id"
104+
105+ hawaii update todo --name todo-005 --relationship owner --target.entity user --cardinality one --mapping.fields "owner_id:id"
106+
107+ ```
88108
0 commit comments