Include code snippets in full-text search (#6)
This commit is contained in:
@@ -10,7 +10,7 @@ class Codium extends Model {
|
||||
static get schema() {
|
||||
// Return a flitter-orm schema here.
|
||||
return {
|
||||
language: {type: String, default: 'javascript'},
|
||||
Language: {type: String, default: 'javascript'},
|
||||
NodeId: String,
|
||||
PageId: String,
|
||||
code: String,
|
||||
@@ -19,6 +19,10 @@ class Codium extends Model {
|
||||
}
|
||||
|
||||
// Static and instance methods can go here
|
||||
get page() {
|
||||
const Page = require('./Page.model')
|
||||
return this.belongs_to_one(Page, 'PageId', 'UUID')
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = Codium
|
||||
|
||||
Reference in New Issue
Block a user