Created
August 26, 2018 00:52
-
-
Save JorgenVatle/eb24229dafac8a0c4042b214dfa84458 to your computer and use it in GitHub Desktop.
PHPStorm live template for ATShop/ATPay styled models.
This file contains hidden or 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
<template name="mmodel" value="import { Mongo } from 'meteor/mongo'; const $ModelName$Collection = new Mongo.Collection('$CollectionName$'); interface $ModelName$Document extends ModelDocument { // Todo: Fill in document properties. } interface $ModelName$ extends $ModelName$Document { entry: $ModelName$Document } class $ModelName$ extends Model { /** * Mongo collection this model is responsible for. */ static readonly collection = $ModelName$Collection; /** * $ModelName$ constructor. * */ constructor(docOrId: DocumentOrId) { super(docOrId, $ModelName$Collection) } // Add model methods and relationships. } export default $ModelName$" description="Creates a Meteor Model class" toReformat="false" toShortenFQNames="true"> | |
<variable name="ModelName" expression="" defaultValue="" alwaysStopAt="true" /> | |
<variable name="CollectionName" expression="" defaultValue="" alwaysStopAt="true" /> | |
<context> | |
<option name="JAVA_SCRIPT" value="true" /> | |
<option name="JSX_HTML" value="false" /> | |
<option name="JS_CLASS" value="false" /> | |
<option name="JS_EXPRESSION" value="false" /> | |
</context> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment