Permalink
Browse files

Initial commit

  • Loading branch information...
MedeaMelana committed May 11, 2012
0 parents commit 051de4d7c1529506a78e0e93f88d9d8439ca1d8b
Showing with 24,285 additions and 0 deletions.
  1. +14 −0 .classpath
  2. +2 −0 .gitignore
  3. +42 −0 .project
  4. +12 −0 .settings/.jsdtscope
  5. +4 −0 .settings/org.eclipse.core.resources.prefs
  6. +9 −0 .settings/org.eclipse.jdt.core.prefs
  7. +10 −0 .settings/org.eclipse.wst.common.component
  8. +7 −0 .settings/org.eclipse.wst.common.project.facet.core.xml
  9. +1 −0 .settings/org.eclipse.wst.jsdt.ui.superType.container
  10. +1 −0 .settings/org.eclipse.wst.jsdt.ui.superType.name
  11. +1 −0 AddTagCountColumn.sql
  12. +6 −0 MakeParticipantData.sql
  13. +22 −0 Makefile
  14. +1 −0 mbh-create-database.sql
  15. +191 −0 mbh-create.sql
  16. BIN mbh-data.sql.zip
  17. +452 −0 pom.xml
  18. +213 −0 src/main/java/nl/waisda/controllers/AccountController.java
  19. +251 −0 src/main/java/nl/waisda/controllers/GameController.java
  20. +53 −0 src/main/java/nl/waisda/controllers/HomeController.java
  21. +27 −0 src/main/java/nl/waisda/controllers/InfoController.java
  22. +17 −0 src/main/java/nl/waisda/controllers/StaticController.java
  23. +50 −0 src/main/java/nl/waisda/controllers/TagController.java
  24. +96 −0 src/main/java/nl/waisda/controllers/UserController.java
  25. +154 −0 src/main/java/nl/waisda/domain/Game.java
  26. +7 −0 src/main/java/nl/waisda/domain/GameState.java
  27. +21 −0 src/main/java/nl/waisda/domain/Gender.java
  28. +70 −0 src/main/java/nl/waisda/domain/Participant.java
  29. +7 −0 src/main/java/nl/waisda/domain/PlayerType.java
  30. +123 −0 src/main/java/nl/waisda/domain/ResetPassword.java
  31. +7 −0 src/main/java/nl/waisda/domain/ScoreType.java
  32. +282 −0 src/main/java/nl/waisda/domain/TagEntry.java
  33. +285 −0 src/main/java/nl/waisda/domain/User.java
  34. +74 −0 src/main/java/nl/waisda/domain/UserScore.java
  35. +65 −0 src/main/java/nl/waisda/domain/UserSummary.java
  36. +94 −0 src/main/java/nl/waisda/domain/Video.java
  37. +27 −0 src/main/java/nl/waisda/exceptions/Forbidden.java
  38. +27 −0 src/main/java/nl/waisda/exceptions/NotFoundException.java
  39. +9 −0 src/main/java/nl/waisda/forms/ApplyForm.java
  40. +66 −0 src/main/java/nl/waisda/forms/AuthForm.java
  41. +8 −0 src/main/java/nl/waisda/forms/FillForm.java
  42. +35 −0 src/main/java/nl/waisda/forms/LoginForm.java
  43. +117 −0 src/main/java/nl/waisda/forms/ProfileForm.java
  44. +42 −0 src/main/java/nl/waisda/forms/RegisterForm.java
  45. +27 −0 src/main/java/nl/waisda/forms/RequestResetForm.java
  46. +44 −0 src/main/java/nl/waisda/forms/ResetPasswordForm.java
  47. +39 −0 src/main/java/nl/waisda/interceptors/CookieInterceptor.java
  48. +74 −0 src/main/java/nl/waisda/interceptors/GlobalModelInterceptor.java
  49. +74 −0 src/main/java/nl/waisda/interceptors/UserSessionStatusInterceptor.java
  50. +34 −0 src/main/java/nl/waisda/model/Cache.java
  51. +24 −0 src/main/java/nl/waisda/model/Channel.java
  52. +27 −0 src/main/java/nl/waisda/model/CurrentGames.java
  53. +29 −0 src/main/java/nl/waisda/model/GameScore.java
  54. +78 −0 src/main/java/nl/waisda/model/GameUpdate.java
  55. +56 −0 src/main/java/nl/waisda/model/GlobalStats.java
  56. +82 −0 src/main/java/nl/waisda/model/Levenshtein.java
  57. +24 −0 src/main/java/nl/waisda/model/Match.java
  58. +143 −0 src/main/java/nl/waisda/model/Pagination.java
  59. +42 −0 src/main/java/nl/waisda/model/Profile.java
  60. +88 −0 src/main/java/nl/waisda/model/Recap.java
  61. +71 −0 src/main/java/nl/waisda/model/ShallowTagEntry.java
  62. +21 −0 src/main/java/nl/waisda/model/TagCloudItem.java
  63. +39 −0 src/main/java/nl/waisda/model/TagEntryStats.java
  64. +75 −0 src/main/java/nl/waisda/model/TagEntrySummary.java
  65. +59 −0 src/main/java/nl/waisda/model/TopScores.java
  66. +23 −0 src/main/java/nl/waisda/model/Util.java
  67. +7 −0 src/main/java/nl/waisda/model/Value.java
  68. +34 −0 src/main/java/nl/waisda/model/VideoStats.java
  69. +86 −0 src/main/java/nl/waisda/repositories/AbstractRepository.java
  70. +99 −0 src/main/java/nl/waisda/repositories/GameRepository.java
  71. +69 −0 src/main/java/nl/waisda/repositories/ParticipantRepository.java
  72. +32 −0 src/main/java/nl/waisda/repositories/ResetPasswordRepository.java
  73. +256 −0 src/main/java/nl/waisda/repositories/TagEntryRepository.java
  74. +74 −0 src/main/java/nl/waisda/repositories/UserRepository.java
  75. +60 −0 src/main/java/nl/waisda/repositories/VideoRepository.java
  76. +149 −0 src/main/java/nl/waisda/services/GameService.java
  77. +54 −0 src/main/java/nl/waisda/services/MailService.java
  78. +137 −0 src/main/java/nl/waisda/services/ScoringService.java
  79. +67 −0 src/main/java/nl/waisda/services/UserService.java
  80. +112 −0 src/main/java/nl/waisda/services/UserSessionService.java
  81. +53 −0 src/main/java/nl/waisda/services/VideoService.java
  82. +43 −0 src/main/java/nl/waisda/tags/FormatOurNumber.java
  83. +43 −0 src/main/java/nl/waisda/validators/LoginValidator.java
  84. +218 −0 src/main/java/nl/waisda/validators/RegisterValidator.java
  85. +34 −0 src/main/java/nl/waisda/validators/UberValidator.java
  86. +18 −0 src/main/resources/ValidationMessages.properties
  87. +56 −0 src/main/resources/applicationContext.xml
  88. +86 −0 src/main/resources/baseContext.xml
  89. +24 −0 src/main/resources/config.properties
  90. +14 −0 src/main/resources/log4j.properties
  91. +57 −0 src/main/resources/testContext.xml
  92. +391 −0 src/main/resources/webdefault.xml
  93. +17 −0 src/main/webapp/.project
  94. +11 −0 src/main/webapp/404.jsp
  95. +3 −0 src/main/webapp/META-INF/MANIFEST.MF
  96. +8 −0 src/main/webapp/META-INF/context.xml
  97. +12 −0 src/main/webapp/META-INF/persistence.xml
  98. +671 −0 src/main/webapp/WEB-INF/fmt.tld
  99. +4 −0 src/main/webapp/WEB-INF/jetty-env.xml
  100. +51 −0 src/main/webapp/WEB-INF/jetty.xml
  101. +47 −0 src/main/webapp/WEB-INF/nl.waisda-servlet.xml
  102. +129 −0 src/main/webapp/WEB-INF/tags/body.tag
  103. +20 −0 src/main/webapp/WEB-INF/tags/games-queue.tag
  104. +36 −0 src/main/webapp/WEB-INF/tags/head.tag
  105. +4 −0 src/main/webapp/WEB-INF/tags/html.tag
  106. +13 −0 src/main/webapp/WEB-INF/tags/profileLink.tag
  107. +18 −0 src/main/webapp/WEB-INF/tld/NumberFormat.tld
  108. +393 −0 src/main/webapp/WEB-INF/tld/c-rt.tld
  109. +416 −0 src/main/webapp/WEB-INF/tld/c.tld
  110. +403 −0 src/main/webapp/WEB-INF/tld/fmt-rt.tld
  111. +442 −0 src/main/webapp/WEB-INF/tld/fmt.tld
  112. +314 −0 src/main/webapp/WEB-INF/tld/forum.tld
  113. +188 −0 src/main/webapp/WEB-INF/tld/sql-rt.tld
  114. +213 −0 src/main/webapp/WEB-INF/tld/sql.tld
  115. +256 −0 src/main/webapp/WEB-INF/tld/x-rt.tld
  116. +273 −0 src/main/webapp/WEB-INF/tld/x.tld
  117. +12 −0 src/main/webapp/WEB-INF/views/cookies.jsp
  118. +86 −0 src/main/webapp/WEB-INF/views/game.jsp
  119. +104 −0 src/main/webapp/WEB-INF/views/home.jsp
  120. +45 −0 src/main/webapp/WEB-INF/views/login.jsp
  121. +63 −0 src/main/webapp/WEB-INF/views/overHetSpel.jsp
  122. +269 −0 src/main/webapp/WEB-INF/views/profile.jsp
  123. +151 −0 src/main/webapp/WEB-INF/views/recap.jsp
  124. +68 −0 src/main/webapp/WEB-INF/views/register.jsp
  125. +212 −0 src/main/webapp/WEB-INF/views/spelinstructies.jsp
  126. +41 −0 src/main/webapp/WEB-INF/views/tag.jsp
  127. +171 −0 src/main/webapp/WEB-INF/views/voorwaarden.jsp
  128. +61 −0 src/main/webapp/WEB-INF/views/wachtwoord-veranderen.jsp
  129. +51 −0 src/main/webapp/WEB-INF/views/wachtwoord-vergeten.jsp
  130. +84 −0 src/main/webapp/WEB-INF/web.xml
  131. +11 −0 src/main/webapp/error.jsp
  132. BIN src/main/webapp/static/img/favicon-waisda.ico
  133. BIN src/main/webapp/static/img/glyphicons-halflings-white.png
  134. BIN src/main/webapp/static/img/glyphicons-halflings.png
  135. BIN src/main/webapp/static/img/ico-facebook.png
  136. BIN src/main/webapp/static/img/ico-hyves.png
  137. BIN src/main/webapp/static/img/ico-twitter.png
  138. BIN src/main/webapp/static/img/logo-beeldengeluid.png
  139. BIN src/main/webapp/static/img/logo-dummy.png
  140. BIN src/main/webapp/static/img/logo-future.png
  141. BIN src/main/webapp/static/img/logo-q42.png
  142. BIN src/main/webapp/static/img/logo-vu.png
  143. BIN src/main/webapp/static/img/logo-waisda-small.png
  144. BIN src/main/webapp/static/img/logo-waisda.png
  145. BIN src/main/webapp/static/img/match-dictionary.png
  146. BIN src/main/webapp/static/img/match-pioneer-l.png
  147. BIN src/main/webapp/static/img/match-pioneer-xl.png
  148. BIN src/main/webapp/static/img/match-pioneer.png
  149. BIN src/main/webapp/static/img/match-social.png
  150. BIN src/main/webapp/static/img/play-button-overlay.png
  151. BIN src/main/webapp/static/img/r2d2-small.png
  152. BIN src/main/webapp/static/img/social-media-icons.png
  153. BIN src/main/webapp/static/img/stap1.png
  154. BIN src/main/webapp/static/img/stap2a.png
  155. BIN src/main/webapp/static/img/stap2b.png
  156. BIN src/main/webapp/static/img/stap3.png
  157. BIN src/main/webapp/static/img/stap4.png
  158. +2 −0 src/main/webapp/static/robots.txt
  159. +399 −0 src/main/webapp/static/script/boxsizing.htc
  160. +235 −0 src/main/webapp/static/script/game.js
  161. +174 −0 src/main/webapp/static/script/games-queue.js
  162. +113 −0 src/main/webapp/static/script/global.js
  163. +1,824 −0 src/main/webapp/static/script/lib/bootstrap.js
  164. +6 −0 src/main/webapp/static/script/lib/bootstrap.min.js
  165. +4 −0 src/main/webapp/static/script/lib/jquery.min.js
  166. +9 −0 src/main/webapp/static/script/lib/less.js
  167. +664 −0 src/main/webapp/static/script/plugins/jquery.color.js
  168. +60 −0 src/main/webapp/static/script/plugins/jquery.equalheights.js
  169. +2 −0 src/main/webapp/static/script/silverlight.js
  170. +45 −0 src/main/webapp/static/script/taggingHistory.js
  171. +58 −0 src/main/webapp/static/script/ugslplayer.js
  172. +39 −0 src/main/webapp/static/script/utils.js
  173. +111 −0 src/main/webapp/static/script/videoplayer.js
  174. +992 −0 src/main/webapp/static/styles/css/buttons.css
  175. +605 −0 src/main/webapp/static/styles/css/components.css
  176. +939 −0 src/main/webapp/static/styles/css/forms.css
  177. +526 −0 src/main/webapp/static/styles/css/grid.css
  178. +17 −0 src/main/webapp/static/styles/css/ie7andbelow.css
  179. +3 −0 src/main/webapp/static/styles/css/ie8andbelow.css
  180. +64 −0 src/main/webapp/static/styles/css/layouts.css
  181. 0 src/main/webapp/static/styles/css/mixins.css
  182. +97 −0 src/main/webapp/static/styles/css/reset.css
  183. +619 −0 src/main/webapp/static/styles/css/responsive-1200px-min.css
  184. +128 −0 src/main/webapp/static/styles/css/responsive-767px-max.css
  185. +610 −0 src/main/webapp/static/styles/css/responsive-768px-979px.css
  186. +41 −0 src/main/webapp/static/styles/css/responsive-utilities.css
  187. +30 −0 src/main/webapp/static/styles/css/responsive.css
  188. +16 −0 src/main/webapp/static/styles/css/scaffolding.css
  189. +34 −0 src/main/webapp/static/styles/css/styles.css
  190. +317 −0 src/main/webapp/static/styles/css/tables.css
  191. +290 −0 src/main/webapp/static/styles/css/type.css
  192. +151 −0 src/main/webapp/static/styles/css/utilities.css
  193. 0 src/main/webapp/static/styles/css/variables.css
  194. +194 −0 src/main/webapp/static/styles/less/buttons.less
  195. +490 −0 src/main/webapp/static/styles/less/components.less
  196. +639 −0 src/main/webapp/static/styles/less/forms.less
  197. +10 −0 src/main/webapp/static/styles/less/grid.less
  198. +19 −0 src/main/webapp/static/styles/less/ie7andbelow.less
  199. +5 −0 src/main/webapp/static/styles/less/ie8andbelow.less
  200. +22 −0 src/main/webapp/static/styles/less/layouts.less
  201. +658 −0 src/main/webapp/static/styles/less/mixins.less
  202. +130 −0 src/main/webapp/static/styles/less/reset.less
  203. +30 −0 src/main/webapp/static/styles/less/responsive-1200px-min.less
  204. +153 −0 src/main/webapp/static/styles/less/responsive-767px-max.less
  205. +21 −0 src/main/webapp/static/styles/less/responsive-768px-979px.less
  206. +45 −0 src/main/webapp/static/styles/less/responsive-utilities.less
  207. +32 −0 src/main/webapp/static/styles/less/scaffolding.less
  208. +207 −0 src/main/webapp/static/styles/less/tables.less
  209. +277 −0 src/main/webapp/static/styles/less/type.less
  210. +160 −0 src/main/webapp/static/styles/less/utilities.less
  211. +150 −0 src/main/webapp/static/styles/less/variables.less
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
@@ -0,0 +1,2 @@
.DS_Store
*~
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>manbijthond</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
@@ -0,0 +1,4 @@
#Fri Jul 15 15:24:53 CEST 2011
eclipse.preferences.version=1
encoding//src/main/webapp/WEB-INF/views/overHetSpel.jsp=UTF-8
encoding//src/main/webapp/WEB-INF/views/voorwaarden.jsp=UTF-8
@@ -0,0 +1,9 @@
#Mon May 02 10:20:12 CEST 2011
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="manbijthond">
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
<property name="java-output-path" value="/manbijthond/target/classes"/>
<property name="context-root" value="manbijthond-web"/>
</wb-module>
</project-modules>
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.6"/>
<installed facet="jst.web" version="2.5"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
@@ -0,0 +1 @@
Window
@@ -0,0 +1 @@
ALTER TABLE `manbijthond`.`game` ADD COLUMN `countExistingVideoTags` INT NOT NULL AFTER `video_id`;
@@ -0,0 +1,6 @@
insert into Participant (user_id, game_id, joinedOn)
select owner_id, game_id, min(creationDate)
from TagEntry
group by owner_id, game_id
order by creationDate asc
@@ -0,0 +1,22 @@
default: run
run:
MAVEN_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Xdebug -Xnoagent -Djava.compiler=NONE -Dlog4j.configuration=file:./target/classes/log4j.properties -Xrunjdwp:transport=dt_socket,address=8989,server=y,suspend=n" mvn jetty:run -e
clean:
mvn clean
install:
mvn clean install -Dmaven.test.skip
upload: install
# uploading WAR to remote /root
# run `make deploy` on remote to desploy
scp target/manbijthond-web-0.0.1-SNAPSHOT.war mbh:
dump:
mysqldump -u root --no-data waisda-whitelabel MatchingTag Video DictionaryEntry Game TagEntry User ResetPassword Participant > mbh-create.sql
mysqldump -u root --no-create-info waisda-whitelabel MatchingTag Video DictionaryEntry > mbh-data.sql
sed -i '' -E 's/AUTO_INCREMENT=[0-9]+ //' mbh-create.sql
zip mbh-data.sql.zip mbh-data.sql
rm mbh-data.sql
@@ -0,0 +1 @@
create database manbijthond charset utf8 collate utf8_general_ci;
@@ -0,0 +1,191 @@
-- MySQL dump 10.13 Distrib 5.1.51, for apple-darwin10.4.0 (i386)
--
-- Host: localhost Database: waisda-whitelabel
-- ------------------------------------------------------
-- Server version 5.1.51
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `MatchingTag`
--
DROP TABLE IF EXISTS `MatchingTag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `MatchingTag` (
`lo` varchar(63) NOT NULL DEFAULT '' COMMENT 'The low side of the matching pair, normalized (lo < hi)',
`hi` varchar(63) NOT NULL DEFAULT '' COMMENT 'The high side of the matching pair, normalized (lo < hi)',
PRIMARY KEY (`lo`,`hi`),
KEY `hi` (`hi`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Pairs of matching normalized tags';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Video`
--
DROP TABLE IF EXISTS `Video`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Video` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) DEFAULT NULL COMMENT 'Title used in summaries, headers etc',
`duration` int(11) NOT NULL COMMENT 'Length in ms',
`imageUrl` varchar(255) DEFAULT NULL COMMENT 'URL of preview image',
`enabled` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'Whether this video is available for new games',
`playerType` varchar(15) NOT NULL DEFAULT '' COMMENT 'Either ''JW'' or ''NPO''',
`sourceUrl` varchar(255) DEFAULT NULL COMMENT 'For playerType JW',
`fragmentID` int(11) DEFAULT NULL COMMENT 'For playerType NPO',
`sectionNid` int(11) DEFAULT NULL COMMENT 'For playerType NPO',
`startTime` int(11) DEFAULT NULL COMMENT 'For playerType NPO',
PRIMARY KEY (`id`),
UNIQUE KEY `fragmentID` (`fragmentID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Videos available for play';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `DictionaryEntry`
--
DROP TABLE IF EXISTS `DictionaryEntry`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `DictionaryEntry` (
`normalizedTag` varchar(63) NOT NULL DEFAULT '' COMMENT 'Normalized version of tag',
`dictionary` varchar(63) NOT NULL DEFAULT '' COMMENT 'Dictionary in which tag belongs',
PRIMARY KEY (`normalizedTag`,`dictionary`),
KEY `type` (`dictionary`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tags that are awarded extra points';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Game`
--
DROP TABLE IF EXISTS `Game`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Game` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`start` datetime DEFAULT NULL COMMENT 'Starting date',
`initiator_id` int(11) DEFAULT NULL COMMENT 'User who created this session',
`video_id` int(11) NOT NULL COMMENT 'Video played',
`countExistingVideoTags` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of existing tags at creation time',
PRIMARY KEY (`id`),
KEY `FK21C012337EBE01` (`video_id`),
KEY `FK21C0122F5F75EF` (`initiator_id`),
KEY `FK21C0123B4EF296` (`video_id`),
KEY `FK21C0121F1BDABA` (`initiator_id`),
KEY `start` (`start`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='A session in which a specific video is played';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `TagEntry`
--
DROP TABLE IF EXISTS `TagEntry`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `TagEntry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dictionary` varchar(31) DEFAULT NULL COMMENT 'Dictionary in which tag is found (awards extra points)',
`normalizedTag` varchar(63) NOT NULL DEFAULT '' COMMENT 'Normalized version of tag',
`score` int(11) NOT NULL COMMENT 'Computed score (stored for performance)',
`tag` varchar(63) NOT NULL DEFAULT '' COMMENT 'Tag as entered by user',
`gametime` int(11) NOT NULL COMMENT 'Time relative to video, in ms',
`typingDuration` int(11) NOT NULL COMMENT 'How long it took the user to type the tag, in ms',
`game_id` int(11) NOT NULL COMMENT 'Game to which tag belongs',
`owner_id` int(11) NOT NULL COMMENT 'Player who entered the tag',
`matchingTagEntry_id` int(11) DEFAULT NULL COMMENT 'Matching tag, if any (may be set later; awards extra points)',
`pioneer` tinyint(1) NOT NULL COMMENT 'Whether there was no match when tag was entered',
`creationDate` datetime NOT NULL COMMENT 'Date at which tag was entered',
PRIMARY KEY (`id`),
KEY `FKD4E26D182D915173` (`game_id`),
KEY `FKD4E26D189C6246EB` (`owner_id`),
KEY `FKD4E26D1885D046F6` (`matchingTagEntry_id`),
KEY `normalizedTag` (`normalizedTag`),
KEY `creationDate` (`creationDate`),
KEY `FKD4E26D181D4DB63E` (`game_id`),
KEY `FKD4E26D18C3E74E41` (`matchingTagEntry_id`),
KEY `FKD4E26D188C1EABB6` (`owner_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Tag entries by users in specific Game sessions';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `User`
--
DROP TABLE IF EXISTS `User`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `User` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`creationDate` datetime NOT NULL COMMENT 'Date at which user was created',
`email` varchar(255) DEFAULT NULL COMMENT 'Email address of user; used for login',
`name` varchar(255) DEFAULT NULL COMMENT 'Username for public display',
`password` varchar(255) DEFAULT NULL COMMENT 'Encrypted password',
`dateOfBirth` datetime DEFAULT NULL COMMENT 'Date of birth',
`usernameFacebook` varchar(255) DEFAULT NULL COMMENT 'Facebook username or profile URL',
`usernameHyves` varchar(255) DEFAULT NULL COMMENT 'Hyves username',
`usernameTwitter` varchar(255) DEFAULT NULL COMMENT 'Twitter username',
`gender` varchar(15) DEFAULT NULL COMMENT 'Either ''MALE'' or ''FEMALE''',
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Users who participated in one or more games';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `ResetPassword`
--
DROP TABLE IF EXISTS `ResetPassword`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ResetPassword` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT 'User whose password to reset',
`resetKey` varchar(70) DEFAULT NULL COMMENT 'Encrypted key that was sent to the user',
`creationDate` datetime NOT NULL COMMENT 'Date at which the reset key was created',
`resetDate` datetime DEFAULT NULL COMMENT 'Date at which the reset key was used to reset the password',
PRIMARY KEY (`id`),
UNIQUE KEY `resetKey` (`resetKey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Reset password requests for users';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `Participant`
--
DROP TABLE IF EXISTS `Participant`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Participant` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL COMMENT 'Player joining',
`game_id` int(11) NOT NULL COMMENT 'Game joined',
`joinedOn` datetime NOT NULL COMMENT 'Time at which player joined the game',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='A participating User in a Game; used to show player list';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2012-05-06 16:41:32
Binary file not shown.
Oops, something went wrong.

0 comments on commit 051de4d

Please sign in to comment.