# Database Used database schema is generated by ORM framework Doctrine from ReCodEx API source code. Tables are directly mapped to _entities_, which are PHP classes annotated with data provided by ORM framework. In the following text there is a brief description of each such entity. There may be some additional database tables for many-to-many relations between entities, but these tables are not discussed in detail because there are only two columns with keys of both related tables in each one. Graphical database schema is added as attachement to this documentation. ## Assignment Assignment table represents exercise assignment in a group. It holds keys of the exercise and group where is the exercise assigned. Other columns are: - _isPublic_ -- assignment can be public (visible to students) or private (visible only to supervisor of the group) - _submissionCountLimit_ -- number of attempts student can make to solve the exercise - _scoreConfig_ -- configuration for calculating point score; actual syntax depends on used score calculator - _firstDeadline_ -- date and time after that no new submissions are received - _allowSecondDeadline_, _secondDeadline_ -- flag if another deadline is allowed, date and time of that deadline - _maxPointsBeforeFirstDeadline_, _maxPointsBeforeSecondDedline_ -- maximal amount of points for correct solutions for first (respectively second) deadline - _scoreCalculator_ -- name of used score score calculator or NULL for API's default one - _canViewLimitRatios_ -- flag if student can view percentage of used time and memory limits for each test - _deletedAt_ -- assignment cannot be deleted due to possible numerous dependencies, but can be hidden from the users; published assignments have NULL value, deleted ones have time of deletion ## Comment ## CommentThread ## Exercise ## ExerciseFile ## ExternalLogin ## ForgottenPassword ## Group ## GroupMembership ## HardwareGroup ## HardwareGroupAvailabilityLog ## Instance ## Licence ## LocalizedAssignment ## Login ## Permission ## ReferenceExerciseSolution ## ReferenceSolutionEvaluation ## ReportedErrors ## Resource ## Role ## RuntimeEnvironment ## Solution ## SolutionEvaluation ## SolutionFile ## SolutionRuntimeConfig - _name_ -- - _runtimeEnvironment_ -- - _jobConfigFilePath_ -- - _createdAt_ -- - _solutionRuntimeConfig_ -- ## Submission - _submittedAt_ -- - _note_ -- - _resultsUrl_ -- - _assignment_ -- - _user_ -- - _submittedBy_ -- - _solution_ -- - _asynchronous_ -- - _evaluation_ -- ## SubmissionFailure - _type_ -- - _description_ -- - _submission_ -- - _createdAt_ -- - _resolvedAt_ -- - _resolutionNote_ -- ## TestResult - _testName_ -- - _status_ -- - _solutionEvaluation_ -- - _score_ -- - _memoryExceeded_ -- - _usedMemoryRatio_ -- - _timeExceeded_ -- - _usedTimeRatio_ -- - _exitCode_ -- - _message_ -- - _stats_ -- - _judgeOutput_ -- ## UploadedFile - _name_ -- - _localFilePath_ -- - _uploadedAt_ -- - _fileSize_ -- - _user_ -- ## User - _degreesBeforeName_ -- - _firstName_ -- - _lastName_ -- - _degreesAfterName_ -- - _email_ -- - _avatarUrl_ -- - _isVerified_ -- - _isAllowed_ -- - _createdAt_ -- - _instance_ -- - _settings_ -- - _memberships_ -- - _exercises_ -- - _role_ -- ## UserAction Stores information about what routes on api user visited and some additional information about it. This procedure is applied only on logged users. - _user_ -- which user performed api request - _loggedAt_ -- time when action was performed - _action_ -- action which was requested on api - _params_ -- GET or POST parameters given by user - _code_ -- return code which was sent back by api - _data_ -- if call ended up with an exception, description of thrown exception should be there ## UserSettings User settings belong to some particular user and contains settings mostly for web application. - _darkTheme_ -- dark mode will be used in text editor in web application - _vimMode_ -- turn vim mode on in text editor used by web application - _defaultLanguage_ -- default language which will be used in web application