/**
 * Tag.js
 *
 * @description :: TODO: You might write a short summary of how this model works and what it represents here.
 * @docs        :: http://sailsjs.org/documentation/concepts/models-and-orm/models
 */

module.exports = {
    tableName: 'tags',
    attributes: {
        id: {
            type: 'integer',
            unique: true,
            autoIncrement: true,
            primaryKey: true
        },
        name: {
            type: 'string'
        },
        tag_class: {
            model:'tag_class'
        },
        tag: {
            type: 'string'
        },
        deviceID: {
            model:'device'
        },
        description: {
            type: 'string'
        },
        data_type: {
            model: 'data_type'
        },
        change_threshold: {
            type: 'float'
        },
        guarantee_sec: {
            type: 'integer'
        },
        map_function: {
            type: 'string'
        },
        units:{
            type: 'string'
        },
        minExpected: {
            type: 'float'
        },
        maxExpected: {
            type: 'float'
        }
    }
};
