Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. CREATE TABLE Vendors (
  2. userId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  3. userEmail varchar(50) NOT NULL,
  4. userName varchar(20) NOT NULL,
  5. userPassword varchar(20) NOT NULL,
  6. userPackageType varchar(10) NOT NULL DEFAULT 'vendor',
  7. userAvatarURL varchar(100) NOT NULL DEFAULT 'https://www.wmpg.org/wp-content/uploads/2019/03/default-avatar-300x300.jpg',
  8. userCoverURL varchar(100) NOT NULL DEFAULT 'https://image.freepik.com/free-vector/gradient-geometric-shapes-dark-background_52683-33258.jpg'
  9. userHash varchar NOT NULL,
  10. userVerified boolean DEFAULT false
  11. );
  12.  
  13. CREATE TABLE VendorConfigurations (
  14. userId int NOT NULL PRIMARY KEY,
  15. userBitcoinAddress,
  16. userEthereumAddress,
  17. userLitecoinAddress,
  18. userPayPalAddress,
  19. userStripeKey,
  20. );
  21.  
  22. CREATE TABLE VendorItems (
  23. itemId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
  24. userId int,
  25. itemName,
  26. itemCategory,
  27. itemMarketplaceCategory,
  28. itemSales,
  29. itemTags,
  30. itemDescription,
  31. itemPrice,
  32. itemThumbnailURL,
  33. itemImageURLs,
  34. itemUpdatedDate,
  35. itemCreatedDate
  36. );
  37.  
  38. CREATE TABLE VendorItemReviews (
  39. reviewId,
  40. itemId,
  41. reviewAuthor,
  42. reviewVendor,
  43. reviewTitle,
  44. reviewBody,
  45. reviewRating
  46. );
  47.  
  48. CREATE TABLE FundingScheme (
  49. fundingScheme varchar(20) NOT NULL PRIMARY KEY,
  50. title varchar(50) NOT NULL,
  51. description varchar(100) DEFAULT '',
  52. fsLanguage varchar(2) NOT NULL,
  53. fsCall varchar(30) NOT NULL
  54. );
  55.  
  56. CREATE TABLE Project_FundingScheme (
  57. fundingSchemeId varchar(20) NOT NULL,
  58. projectId int(10) NOT NULL,
  59. FOREIGN KEY (fundingSchemeId) REFERENCES FundingScheme(fundingScheme),
  60. FOREIGN KEY (projectId) REFERENCES Project(projectId)
  61. );
  62.  
  63. CREATE TABLE AdministrativeContact (
  64. countryId varchar(2) NOT NULL PRIMARY KEY,
  65. coordinatorFlag tinyint(1) NOT NULL,
  66. coordinatorId varchar(20) NOT NULL,
  67. participantFlag tinyint(1) NOT NULL,
  68. participantId varchar(20) NOT NULL,
  69. endOfParticipation boolean NOT NULL,
  70. FOREIGN KEY (countryId) REFERENCES Country(countryId),
  71. );
  72.  
  73. CREATE TABLE Country (
  74. countryId varchar(2) NOT NULL PRIMARY KEY,
  75. name varchar(20) NOT NULL,
  76. city varchar(20) NOT NULL,
  77. street varchar(50) NOT NULL,
  78. postCode varchar(10) NOT NULL
  79. );
  80.  
  81. CREATE TABLE Organisation_Country (
  82. organisationId int(5) NOT NULL,
  83. countryId varchar(2) NOT NULL,
  84. FOREIGN KEY (organisationId) REFERENCES Organisation(organisationId),
  85. FOREIGN KEY (countryId) REFERENCES Country(countryId)
  86. );
  87.  
  88. CREATE TABLE Organisation (
  89. organisationId int(5) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  90. name varchar(50) NOT NULL,
  91. shortName varchar(20) NOT NULL,
  92. activityType varchar(3) NOT NULL,
  93. organisationURL varchar(50) NOT NULL
  94. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement