Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>lixi-snippetNew to Visual Studio Code? Get it now.
lixi-snippet

lixi-snippet

Lixi Be Team

|
53 installs
| (0) | Free
snippet for lixi-core old
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Description

snippet cho lixi core source cu

Reference

For route

@register-api
    register api

@jp-x  is Joip with x is type
    example: @jp-object

@jr-x is Joir with x is type
    example: @jr-array

For biz

@n-biz
    make new a biz
    result: 			
        const {core} = require('../../const/handler');",
        "const Util = require(core.util);",
        "const Biz = require(core.biz);",
        "module.exports = new Biz({ model: 'example' });

Require

@r-core
    require core

@r-handler:
    require handler

@r-util:
    require util

@r-elastic:
    require elastic

Get

@g-list
    get list
    result:
        "const {items, total} = await $1.list({",
        "    page,",
        "    page_size,",
        "    ${2:sort},",
        "    condition: {",
        "        filter_must: ${3:filter_must},",
        "    }",
        "})"

@g-detail
    get detail

@g-uuid
    get by uuid

@g-all
    get all

@g-agg
    aggregate

Migrate

@mi-normal
    result
        "module.exports = {",
        "    up: async (queryInterface, Sequelize) => {",
        "        let exc = queryInterface;",
        "        await exc.addColumn('$2', '$3', {",
        "           type: Sequelize.DataTypes.${4|STRING(),INTEGER(),BOOLEAN(),JSON(),TEXT()|}",
        "});",
        "        return exc;",
        "    },",
        "\n",
        "    down: (queryInterface, Sequelize) => { }",
        "};"

@mi-add
    add a column

@mi-rename
    rename column

@mi-change
    change data type of column

@mi-raw
    raw migrate

Model

@md-es-new
    make new model es

@md-mapping
    mapping

@md-new
    make model template

@md-type
    make model type
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft