You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
5.5 KiB
Markdown

# Database
8 years ago
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.
8 years ago
## Assignment
8 years ago
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
Represents result of one logical test from job configuration.
- _testName_ -- name of test which was stated in job configuration
- _status_ -- overall status of test
- _solutionEvaluation_ -- evaluation to which test result belongs
- _score_ -- score which was assigned to test evaluation by judge
- _memoryExceeded_ -- true if memory limit was exceeded
- _usedMemoryRatio_ -- float number from 0.0 to 1.0 which represents percentage of user solution memory usage against memory limit from configuration
- _timeExceeded_ -- true if time limit was exceeded
- _usedTimeRatio_ -- float number from 0.0 to 1.0 which represents percentage of user solution time usage against time limit from configuration
- _exitCode_ -- exit code which whole test returns
- _message_ -- provided only on non-zero exit code
- _stats_ -- textual representation of whole information about evaluation of test which arrived from worker
- _judgeOutput_ -- output textual message from judge
## UploadedFile
- _name_ -- original name of file uploaded to api
- _localFilePath_ -- destination where file is stored on api server
- _uploadedAt_ -- datetime of file upload
- _fileSize_ -- size of uploaded file in bytes
- _user_ -- user which uploaded particular file
## User
Keeps information about all users which are registered in ReCodEx.
- _degreesBeforeName_ -- degrees before name which user acquired
- _firstName_ -- first name
- _lastName_ -- surname
- _degreesAfterName_ -- degrees after name
- _email_ -- email address which is used for sending email notifications
- _avatarUrl_ -- url of profile picture
- _isVerified_ -- user verified his/hers email address (not used at the moment)
- _isAllowed_ -- if this field is set to false user cannot sign in to application
- _createdAt_ -- datetime of user registration
- _instance_ -- instance to which user belongs to
- _settings_ -- settings which are connected to this user
- _memberships_ -- array of groups in which is user assigned
- _exercises_ -- exercises which user created and is their author
- _role_ -- role of the user which is used to determine privileges
## UserAction
Stores information about what routes on api user visited and some additional information about it. This datas should be collected only from logged users.
8 years ago
- _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
8 years ago
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