From 2738fdaf5cb68a1dd6da0d5e8b900f1ad4de4765 Mon Sep 17 00:00:00 2001 From: Tina_Azure <-> Date: Wed, 5 Apr 2023 02:21:11 +0200 Subject: [PATCH] Create alias table and add it to the spec --- setupdb.sh | 8 ++++++++ spec/spec.md | 16 +++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/setupdb.sh b/setupdb.sh index 4bd30b2..f6a13d4 100644 --- a/setupdb.sh +++ b/setupdb.sh @@ -50,3 +50,11 @@ sudo -u postgres psql -c "CREATE TABLE cryptoWallets( walletAddress text ); " cavecomm + +sudo -u postgres psql -c "CREATE TABLE aliasRoutes( + aliasName text PRIMARY KEY, + freelancerID int, + route text, + routeParameters text + ); +" cavecomm diff --git a/spec/spec.md b/spec/spec.md index df94cde..3c69d1f 100644 --- a/spec/spec.md +++ b/spec/spec.md @@ -57,14 +57,16 @@ $onDeliverPaid - A boolean representation of if the on-Deliver Payment has been ## Customer -### /@{String} ++++ /@{aliasName} personal freelancer links that link to the freelancer profile and/or template -DB structure -{ - $alias - $destination -} + +$aliasName text PRIMARY KEY - the name of the alias which is used for the route +$freelancerID int - the id of the freelancer who created this alias +$route text - route in the format "/customer/$freelancer/template/$templateName" set in the interface +$routeParameter text - POST parameter to address the route usually the id of either freelancer or template +$routeValue text - POST Value to address the route + +++ "/" @@ -78,7 +80,7 @@ This page should consist of all the information about a freelancer that the free See the freelancer section under concepts for more information of what this should be like. -### /customer/$freelancer/template/$templateName ++++ /customer/$freelancer/template/$templateName Accessing this page will provide the customer with a rendered HTML document of a freelancer's job template. This rendering will take data that the freelancer provides for the job, ideally stored in the database, and fills it in for delivery to the customer. The job template should use a html template that the system administrator provides for filling in.