## -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Metric model
##----------------------------------------------------------------------
## Copyright (C) 2007-2014 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------

## Third-marty modules
from mongoengine.document import Document
from mongoengine.fields import StringField, BinaryField, BooleanField


class Metric(Document):
    meta = {
        "collection": "noc.ts.metrics",
        "indexes": ["parent", ("parent", "local")]
    }

    name = StringField(unique=True)
    hash = BinaryField(unique=True)
    parent = BinaryField()
    # Name within parent
    local = StringField()
    has_children = BooleanField()

    def __unicode__(self):
        return self.name

58c69a4a60ec14688b705d85bb9f8015bec25d61
<mask token>


class Metric(Document):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Metric(Document):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def __unicode__(self):
        return self.name

<mask token>


class Metric(Document):
    meta = {'collection': 'noc.ts.metrics', 'indexes': ['parent', ('parent',
        'local')]}
    name = StringField(unique=True)
    hash = BinaryField(unique=True)
    parent = BinaryField()
    local = StringField()
    has_children = BooleanField()

    def __unicode__(self):
        return self.name

from mongoengine.document import Document
from mongoengine.fields import StringField, BinaryField, BooleanField


class Metric(Document):
    meta = {'collection': 'noc.ts.metrics', 'indexes': ['parent', ('parent',
        'local')]}
    name = StringField(unique=True)
    hash = BinaryField(unique=True)
    parent = BinaryField()
    local = StringField()
    has_children = BooleanField()

    def __unicode__(self):
        return self.name

## -*- coding: utf-8 -*-
##----------------------------------------------------------------------
## Metric model
##----------------------------------------------------------------------
## Copyright (C) 2007-2014 The NOC Project
## See LICENSE for details
##----------------------------------------------------------------------

## Third-marty modules
from mongoengine.document import Document
from mongoengine.fields import StringField, BinaryField, BooleanField


class Metric(Document):
    meta = {
        "collection": "noc.ts.metrics",
        "indexes": ["parent", ("parent", "local")]
    }

    name = StringField(unique=True)
    hash = BinaryField(unique=True)
    parent = BinaryField()
    # Name within parent
    local = StringField()
    has_children = BooleanField()

    def __unicode__(self):
        return self.name
