-
Notifications
You must be signed in to change notification settings - Fork 0
Functional Requirements
data:
name | type | description |
---|---|---|
role id | primary key | |
name | string | the name given to the role |
description | string | description of the role |
functions:
Function | Permissions |
---|---|
list all | master admin |
Specific Roles: Master Admin Admin Client User
data:
name | type | description |
---|---|---|
user id | primary key | |
password | Char | |
Roll id | INTEGER | |
user profile image | foreign key | gets the users profile image from user profile image |
user name | VARCHAR | |
first name | VARCHAR | |
last name | VARCHAR | |
VARCHAR | ||
mobile | foreign key | |
self description | TEXT | |
prime-bitcoin id | INTEGER | the users main bitcoin wallet |
address id | foreign key | |
facebook id | string | the users facebook id |
twitter id | string | the users twitter id |
linkedin id | string | the users linkedin id |
trade count | string | the amount of trades the user has done |
first trade | date | the first trade made by the user |
recent trade | date time | the date of the most recent trade |
trade score | integer | the score given to the trader based average user feedback |
trade endorsements | integer | the amount of "friends" a trader has |
identification level | integer | to be added later |
functions:
Function | Permissions | description |
---|---|---|
list all | public | |
create | public | |
view any | public | |
change details | user | |
set roll | master admin | the admin can set roll |
The users profile image
data:
name | type | description |
---|---|---|
profile image id | primary key | |
user id | foreign id | |
file | string |
functions:
Function | Permissions | description |
---|---|---|
view mine | user | |
view any | public | |
edit | user | |
delete | user |
The types of currency that the user accepts and the public key
data:
name | type | description |
---|---|---|
user wallets id | primary key | |
user id | foreign key | the id of the user |
accepts bitcoin | boolean | true or false |
bitcoin public id | foreign key | the id of the users public key stored in the bitcoin table |
wallet confirmed bitcoin | boolean | if true key has been found in block chain |
accepts litecoin | boolean | true or false |
litecoin public id | foreign key | the id of the users public key stored in the litecoin table |
wallet confirmed litecoin | boolean | if true key has been found in block chain |
accepts dogecoin | boolean | true or false |
doge public | foreign key | the id of the users public key stored in the dogecoin table |
wallet confirmed dogecoin | boolean | if true key has been found in block chain |
accepts peercoin | boolean | true or false |
peercoin public | foreign key | the id of the users public key stored in the peercoin table |
wallet confirmed peercoin | boolean | if true key has been found in block chain |
functions:
Function | Permissions |
---|---|
add | user |
list mine | user |
list users | public |
delete mine | user |
Endorsements can be given to users (traders) by other users at any time and for any reason. Users are only able to give their endorsement once to another user and if the user chooses the user is able to remove their endorsement for any reason.
data:
name | type | description |
---|---|---|
endorsement id | primary key | the endorsement id |
for user id | integer | the user receiving the endorsement |
from user id | string | the user the endorsement is from |
after trade | boolean | if true the endorsement was made after trade |
endorsement comment | string | when the endorsement is given users can leave a comment |
endorsement date | date / time | the time and date the endorsement was given |
functions:
Function | Permissions | description |
---|---|---|
list mine | user | |
list users | public | list the users endorsements |
create | user | |
delete mine | user | user can delete endorsements given out or received |
Users are able to leave feedback after a trade has been completed. Feedback can only be left once per trade and can only be left if the trade is for a service, product or item. Feedback can only be provided by the buyer of the goods, never the seller.
data:
name | type | description |
---|---|---|
feedback id | primary key | the feedback id |
trade conclusion id | integer | the trade conclusion id |
buyer id | integer | the buyer id |
seller id | integer | the seller id |
buyer comment | string | the comment that the buyer leaves for the seller |
seller rating | integer | 1 - 5 stars the buyer can grade the seller |
functions:
Function | Permissions | description |
---|---|---|
list mine as buyer | user / public | user can list all the feedback they've left for sellers |
list mine as seller | user / public | the seller can view all their buyer feedback |
delete mine buyer | user | the buyer can delete feedback if desired |
edit mine buyer | user | the buyer can edit their feedback if desired |
Users can add multiple addresses to their account. The user can set a primary address which will auto display when the user is required to submit their address for delivery. data:
name | type | description |
---|---|---|
address id | primary key | the address id |
user id | foreign key | who placed the order |
primary address | boolean | if true is primary |
street | string | street |
town | string | town |
state | string | state |
post code | string | post code |
country | string | country |
special comments | string | shipping notes |
functions:
Function | Permissions |
---|---|
list all | master admin |
list mine | user |
create | user |
edit mine | user |
delete mine | user |
Trade Item Types: Goods
data:
name | type | description |
---|---|---|
category id | primary key | the id of the category |
category name | string | the category name |
trade type | string | trade type. Goods, Currency, Service |
functions:
Function | Permissions | description |
---|---|---|
create | master admin | adds the category |
edit | master admin | edits the category |
delete | master admin | deletes the category |
list all | user | lists all the categories |
name | type | description |
---|---|---|
trade price id | primary key | the primary id |
trade item id | foreign key | the id of the trade item |
bitcoin accept | boolean | is bitcoin accepted true or false |
litecoin accept | boolean | is litecoin accepted true or false |
doge coin accept | boolean | is doge coin accepted true or false |
ppc coin accept | boolean | is ppc coin accepted true or false |
base coin | string | which coin is used as the base for the price set |
base coin amount | integer | that is the price per item |
functions:
Function | Permissions | description |
---|---|---|
add to item | user | the seller can add a price to his/her product |
edit for item | user | the seller can edit the price and base coin |
list | user | user is able to list the items price and currency accepted |
data:
name | type | description |
---|---|---|
item goods id | primary key | the id of the item |
user id | foreign key | the user who wants to sell the item |
trade category id | integer | the category of the trade item |
trade price id | foreign key | the price set for the product is retrieved from the trade price table |
trade description | string | user provided |
date | date | date the trade is entered |
deadline | date | when the trade item is not shown |
quantity | integer | the amount of product the user wants to sell |
location sensitive | boolean | if true reference the location table |
location coordinates | string | the latitude and longitude of the item |
location radius | integer | the distance that the item is allowed to be sent |
delivery description | string | the type of delivery or pic up |
initiations | integer | the amount of times a buyer has inquired |
executions | integer | the amount of times a trade has been executed |
completions | integer | the amount of completed trades for this item |
receive type | integer | references a table of different types of product delivery |
functions:
Function | Permissions | description |
---|---|---|
list all | user | |
list mine | user | |
create | user | |
view any | user | |
view mine | user | |
edit | master admin / user | a client can edit notes only during the 2 proof sent |
delete | master admin / user |
When a user buyer clicks on the buy button of a user sellers ad a "trade initiation" is stored. The trade initiation is used as the first point of reference for the trade to take place.
data:
name | type | description |
---|---|---|
initiation id | primary key | an id for the trade initiation is referenced by |
item id | foreign key | the item id |
trader id seller | foreign key | the seller of the item |
trader id buyer | foreign key | the buyer of the item |
initiated by trader id | foreign key | which user initiated the trade |
seller reputation request | boolean | if the sellers reputation if not public |
buyers reputation request | boolean | if the sellers reputation if not public |
request date | date time | the date and time that the initiation is made |
trade proceed | boolean | did the trade proceed true or false |
functions:
Function | Permissions | description |
---|---|---|
initiate | user / buyer / seller | activates the trade |
edit | user / buyer / seller |
Once the buyer is happy to trade with the seller and if the seller has not objected to selling to the buyer a "Trade Executed" row is saved into the "Trade Executed" table. This table stores both the users wallet public keys which are referenced against the block chain of the selected crypto currency to see if the transaction has been successfully completed.
data:
name | type | description |
---|---|---|
execution id | primary key | the execution |
initiation id | integer | the id for the trade initiation is referenced by |
currency type | integer | the type of crypto currency that is being transferred |
buyer wallet | string | the buyers wallet |
seller wallet | string | the sellers wallet |
transaction left | boolean | checks to see if the coins have left the buyers wallet |
transaction received | boolean | checks if the coins have been received |
left date | date / time | the date the coins were sent |
received date | date / time | did the trade proceed true or false |
coin amount | integer | the amount of coins that have been sent |
transaction error | boolean | if true return error message to both traders |
transaction success | boolean | if true return success |
When a "Trade Execution" has been recorded as successful a "Trade Conclusion" will be stored. data:
name | type | description |
---|---|---|
execution id | foreign key | the execution id |
conclusion id | primary key | an id for the trade initiation is referenced by |
trade duration | integer | the amount of time the execution process had taken |
conclusion date | date/time | the date of the conclusion |
buyer id | integer | the buyers id |
seller id | integer | the sellers id |
buyer endorsement | boolean | did the seller endorse the buyer |
seller rating / comment | boolean | if the buyer would like to leave rating and comment |
functions:
Function | Permissions | description |
---|---|---|
view mine | user buyer / seller |
Traders are able to chat to each other once a trade initiation has been made. When a comment has been made by one of the traders it will be saved into the trade comment table
data:
name | type | description |
---|---|---|
comment id | primary key | an id for the trade comment |
initiation id | integer | the id of the trade initiation the comment has been directed |
date / time | date/time | the date and time of the comment |
comment | string | the comment that was made |
user id | integer | the id of the user that made the comment |
functions:
Function | Permissions | description |
---|---|---|
comment | user / buyer / seller | adds a comment |
list all with initiation id | user / buyer / seller | lists all the comments with the initiation id |
This table will record activity outside of Cryptopia so that the user is able to comment on and make public transaction and deposits that take place outside of Cyptopia. This will also be useful as a notification service later on down the track which could alert the user of unauthorised activity.
data:
name | type | description |
---|---|---|
outside trade id | primary key | the id of the outside trade |
user id | foreign key | the id of the user |
date / time | date/time | the date and time of the transaction/deposit |
from user | boolean | if true money left users wallet and was sent to another wallet |
user wallet public key | string | the users wallet public key |
second traders public key | string | the other traders public key |
second traders user id | foreign key | displays other user id if wallet id found in database |
trade amount | integer | the amount traded |
public | boolean | if true show on profile if false keep hidden |
trade comment | string | a simple comment on the trade |
trade rating | integer | 1 - 5 rating on the trade |
functions:
Function | Permissions | description |
---|---|---|
view all | admin | admin can view all |
view all public | public | public can see all outside trades |
view mine | user | user can view their own |
edit mine | user | user can edit their own |
Stores all users bitcoin public keys
data:
name | type | description |
---|---|---|
bitcoin public id | primary key | the key referenced |
bitcoin public wallet | string | the public wallet string |
user id | foreign key | the users id |
functions:
Function | Permissions | description |
---|---|---|
list all | admin | lists all |