Skip to content

Commit

Permalink
2023-05-15 AC: Adds a back end example, and modifies the user documen…
Browse files Browse the repository at this point in the history
…tation.
  • Loading branch information
andrewscaya committed May 15, 2023
1 parent df9c5a3 commit f3b41a1
Show file tree
Hide file tree
Showing 8 changed files with 2,035 additions and 0 deletions.
82 changes: 82 additions & 0 deletions dist/classes/circuit.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* Class for circuit persistence.
*
* @package local_moodleorm
* @copyright 2022 Andrew Caya <andrewscaya@yahoo.ca>
* @author Andrew Caya
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

namespace local_moodleorm;

use \core\persistent;
use \local_moodleorm\traits\unitofworkaware;

/**
* Class for loading/storing a circuit from the DB.
*
* @copyright 2022 Andrew Caya
* @author Andrew Caya <andrewscaya@yahoo.ca>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class circuit extends persistent {

use unitofworkaware;

/** Table name */
const TABLE = 'moodleorm_circuit';

/**
* Return the definition of the properties of this model.
*
* @return array
*/
protected static function define_properties() {
return array(
'id' => array(
'type' => PARAM_INT,
),
'name' => array(
'type' => PARAM_TEXT,
),
'description' => array(
'type' => PARAM_TEXT,
'default' => null,
'null' => NULL_ALLOWED,
),
'waveid' => array(
'type' => PARAM_INT,
),
'timestart' => array(
'type' => PARAM_INT,
),
'timeend' => array(
'type' => PARAM_INT,
),
'timecreated' => array(
'type' => PARAM_INT,
'default' => time(),
),
'timemodified' => array(
'type' => PARAM_INT,
'default' => time(),
),
);
}
}
Loading

0 comments on commit f3b41a1

Please sign in to comment.