# Class: NoteRevision

## NoteRevision()

NoteRevision represents snapshot of note's title and content at some point in the past. It's used for seamless note versioning.

## Constructor

#### new NoteRevision()

Source:
  - becca/entities/note_revision.js, line 17

### Extends

- AbstractEntity

### Members

#### contentLength :number

##### Type:

- number

Source:
  - becca/entities/note_revision.js, line 48

#### dateCreated :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 40

#### dateLastEdited :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 38

#### isProtected :boolean

##### Type:

- boolean

Source:
  - becca/entities/note_revision.js, line 34

#### mime :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 32

#### noteId :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 28

#### noteRevisionId :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 26

#### title :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 36

#### type :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 30

#### utcDateCreated :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 44

#### utcDateLastEdited :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 42

#### utcDateModified :string

##### Type:

- string

Source:
  - becca/entities/note_revision.js, line 46

### Methods

#### getContent() → {*}

Source:
  - becca/entities/note_revision.js, line 79

##### Returns:

Type
  *

#### getContentMetadata() → {Object}

Source:
  - becca/entities/note_revision.js, line 143

##### Returns:

Type
  Object

#### isStringNote() → {boolean}

Source:
  - becca/entities/note_revision.js, line 65

##### Returns:

true if the note has string content (not binary)

Type
  boolean

#### markAsDeleted(deleteIdopt)

Mark the entity as (soft) deleted. It will be completely erased later. This is a low level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`deleteId` |  | <optional> | null |

Overrides:
  - AbstractEntity#markAsDeleted
Source:
  - becca/entities/abstract_entity.js, line 118

#### save() → {AbstractEntity}

Saves entity - executes SQL, but doesn't commit the transaction on its own

Overrides:
  - AbstractEntity#save
Source:
  - becca/entities/abstract_entity.js, line 73

##### Returns:

Type
  AbstractEntity