Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

vigiboard / dashboard / model / bdd_dashboard / graphgroups.py @ 805cc54a

History | View | Annotate | Download (812 Bytes)

1
# -*- coding: utf-8 -*-
2
"""Model For GraphGroups Table"""
3

    
4
from sqlalchemy.orm import mapper, relation
5
from sqlalchemy import Table, ForeignKeyConstraint, Column
6
from sqlalchemy.types import Integer, String, Text, DateTime
7

    
8
from dashboard.model import metadata
9

    
10
# Generation par SQLAutoCode
11

    
12
graphgroups =  Table('graphgroups', metadata,
13
            Column(u'graphname', String(length=100, convert_unicode=False, assert_unicode=None), primary_key=True, nullable=False),
14
            Column(u'idgraphgroup', Integer(), primary_key=True, nullable=False),
15
            Column(u'parent', Integer(), primary_key=False, nullable=False),
16
            ForeignKeyConstraint([u'graphname'], [u'graph.name'], name=u'graphgroups_ibfk_1'),
17
    )
18

    
19
# Classe a mapper
20

    
21
class GraphGroups(object):
22
        pass  
23
mapper(GraphGroups,graphgroups)
24

    
25