becca_entities_recent_note.js.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Source: becca/entities/recent_note.js</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Source: becca/entities/recent_note.js</h1>
  17. <section>
  18. <article>
  19. <pre class="prettyprint source linenums"><code>"use strict";
  20. const dateUtils = require('../../services/date_utils');
  21. const AbstractEntity = require("./abstract_entity");
  22. /**
  23. * RecentNote represents recently visited note.
  24. */
  25. class RecentNote extends AbstractEntity {
  26. static get entityName() { return "recent_notes"; }
  27. static get primaryKeyName() { return "noteId"; }
  28. constructor(row) {
  29. super();
  30. /** @type {string} */
  31. this.noteId = row.noteId;
  32. /** @type {string} */
  33. this.notePath = row.notePath;
  34. /** @type {string} */
  35. this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();
  36. }
  37. getPojo() {
  38. return {
  39. noteId: this.noteId,
  40. notePath: this.notePath,
  41. utcDateCreated: this.utcDateCreated
  42. }
  43. }
  44. }
  45. module.exports = RecentNote;
  46. </code></pre>
  47. </article>
  48. </section>
  49. </div>
  50. <nav>
  51. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-sql.html">sql</a></li></ul><h3>Classes</h3><ul><li><a href="Attribute.html">Attribute</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li><li><a href="Branch.html">Branch</a></li><li><a href="EtapiToken.html">EtapiToken</a></li><li><a href="Note.html">Note</a></li><li><a href="NoteRevision.html">NoteRevision</a></li><li><a href="Option.html">Option</a></li><li><a href="RecentNote.html">RecentNote</a></li></ul><h3><a href="global.html">Global</a></h3>
  52. </nav>
  53. <br class="clear">
  54. <footer>
  55. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a>
  56. </footer>
  57. <script> prettyPrint(); </script>
  58. <script src="scripts/linenumber.js"> </script>
  59. </body>
  60. </html>