becca_entities_brecent_note.js.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Source: becca/entities/brecent_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/brecent_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 AbstractBeccaEntity = require("./abstract_becca_entity");
  22. /**
  23. * RecentNote represents recently visited note.
  24. *
  25. * @extends AbstractBeccaEntity
  26. */
  27. class BRecentNote extends AbstractBeccaEntity {
  28. static get entityName() { return "recent_notes"; }
  29. static get primaryKeyName() { return "noteId"; }
  30. constructor(row) {
  31. super();
  32. /** @type {string} */
  33. this.noteId = row.noteId;
  34. /** @type {string} */
  35. this.notePath = row.notePath;
  36. /** @type {string} */
  37. this.utcDateCreated = row.utcDateCreated || dateUtils.utcNowDateTime();
  38. }
  39. getPojo() {
  40. return {
  41. noteId: this.noteId,
  42. notePath: this.notePath,
  43. utcDateCreated: this.utcDateCreated
  44. }
  45. }
  46. }
  47. module.exports = BRecentNote;
  48. </code></pre>
  49. </article>
  50. </section>
  51. </div>
  52. <nav>
  53. <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="AbstractBeccaEntity.html">AbstractBeccaEntity</a></li><li><a href="BAttachment.html">BAttachment</a></li><li><a href="BAttribute.html">BAttribute</a></li><li><a href="BBranch.html">BBranch</a></li><li><a href="BEtapiToken.html">BEtapiToken</a></li><li><a href="BNote.html">BNote</a></li><li><a href="BOption.html">BOption</a></li><li><a href="BRecentNote.html">BRecentNote</a></li><li><a href="BRevision.html">BRevision</a></li><li><a href="BackendScriptApi.html">BackendScriptApi</a></li></ul><h3>Global</h3><ul><li><a href="global.html#api">api</a></li></ul>
  54. </nav>
  55. <br class="clear">
  56. <footer>
  57. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a>
  58. </footer>
  59. <script> prettyPrint(); </script>
  60. <script src="scripts/linenumber.js"> </script>
  61. </body>
  62. </html>