repo_description: Coding articles to level up your development skills
repo_topics: astro awesome-list css education es6-javascript git html javascript learn-to-code learning-resources nodejs programming snippets
code: import Model from '#src/core/model.js';
  import Snippet from '#src/models/snippet.js';
  
  export default class Language extends Model {
    static {
      Model.prepare(this, ['id']);
    }
  
    constructor(data) {
      super(data);
      this.id = data.id;
      this.long = data.long;
      this.short = data.short;
      this.name = data.name;
    }
  
    get snippets() {
      return Snippet.where({ languageId: this.id });
    }
  }
  