{
  "name": "Service",
  "plural": "Services",
  "base": "PersistedModel",
  "indexes": {
    "name": {
      "keys": {
        "name": 1
      },
      "options": {
        "unique": true
      }
    }
  },
  "options": {
    "hidden": [
      "startTime",
      "_group"
    ]
  },
  "description": "Represents a Service",
  "properties": {
    "name": {
      "type": "string",
      "required": true,
      "index": 1,
      "description": "The name of the service. This may be different from the name in the package.json"
    },
    "startTime": {
      "type": "date",
      "description": "The timestamp for the last time this service was started"
    },
    "started": {
      "type": "boolean",
      "description": "Indicates if the service should be running or stopped"
    },
    "deploymentInfo": {
      "type": "object",
      "description": "Information about the node application deployed for this service"
    },
    "env": {
      "type": "object",
      "default": {},
      "description": "List of environment variables set for the node application"
    }
  },
  "validations": [],
  "relations": {
    "executors": {
      "type": "hasMany",
      "model": "Executor",
      "through": "ServiceInstance",
      "description": "List of executors the service is running on"
    },
    "instances": {
      "type": "hasMany",
      "model": "ServiceInstance",
      "description": "List of instances that run this service"
    },
    "profileDatas": {
      "type": "hasMany",
      "model": "ProfileData",
      "description": "List of cpuprofile or heapdumps gathered for this service"
    },
    "groups": {
      "type": "embedsMany",
      "model": "Group",
      "description": "List of groups used for routing or partitioning"
    }
  },
  "acls": [],
  "methods": []
}
