This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/models/View.js

21 lines
350 B
JavaScript

// @flow
import { action } from "mobx";
import BaseModel from "./BaseModel";
import User from "./User";
class View extends BaseModel {
id: string;
documentId: string;
firstViewedAt: string;
lastViewedAt: string;
count: number;
user: User;
@action
touch() {
this.lastViewedAt = new Date().toString();
}
}
export default View;