{"size": 410, "ext": "js", "max_stars_repo_path": "packages/tectonic/example/basic/src/scripts/models.js", "max_stars_repo_name": "ml242/tectonic", "max_stars_repo_stars_event_min_datetime": "2016-04-07T19:28:37.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-08T14:15:38.000Z", "max_issues_repo_path": "packages/tectonic/example/basic/src/scripts/models.js", "max_issues_repo_name": "ml242/tectonic", "max_issues_repo_issues_event_min_datetime": "2016-03-22T18:34:24.000Z", "max_issues_repo_issues_event_max_datetime": "2019-02-27T12:24:55.000Z", "max_forks_repo_path": "packages/tectonic/example/basic/src/scripts/models.js", "max_forks_repo_name": "ml242/tectonic", "max_forks_repo_forks_event_min_datetime": "2016-03-22T19:34:28.000Z", "max_forks_repo_forks_event_max_datetime": "2018-06-25T12:48:28.000Z"}
{"max_stars_count": 507, "max_issues_count": 89, "max_forks_count": 38, "avg_line_length": 13.6666666667, "max_line_length": 43, "alphanum_fraction": 0.5365853659}
'use strict';

import { Model } from 'tectonic';

export class User extends Model {
  static modelName = 'user';

  static fields = {
    id: 0,
    name: '',
    email: ''
  };
}

export class Post extends Model {
  static modelName = 'post';

  static fields = {
    id: 0,
    title: '',
    body: '',
    authorID: 0,
    author: ''
  };

  getExcerpt() {
    return this.body.substr(0, 10) + '...';
  }
}
