Created
September 16, 2019 20:09
-
-
Save shadow1349/62cc89fb3405ee1133caf40c4c6f605c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IModel, IAlgoliaModel, Model } from "./model"; | |
export interface INote extends IModel { | |
Title: string; | |
Note: string; | |
/** | |
* ID of the user who created the document | |
*/ | |
Author: string; | |
Tags?: string[]; | |
} | |
export interface IAlgoliaNote extends INote, IAlgoliaModel {} | |
export class NoteModel extends Model implements IAlgoliaNote { | |
Title: string; | |
Note: string; | |
/** | |
* ID of the user who created the document | |
*/ | |
Author: string; | |
constructor(private model: INote) { | |
super(model); | |
this.Title = this.model.Title; | |
this.Note = this.model.Note; | |
this.Author = this.model.Author; | |
this._tags = this.model.Tags; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment