Commit b4a55aad authored by Baptiste Mouterde's avatar Baptiste Mouterde Committed by ikoalaz
Browse files

comments : remove older and useless comments model

parent b7c66c23
"""
holds comments engine
"""
__author__ = 'Baptiste Mouterde'
__licence__ = 'MIT'
import sqlalchemy as sa
import meta
from sqlalchemy import orm
from debexpo.model import OrmObject
from debexpo.model.packages import Package
from debexpo.model.users import User
t_comments = sa.Table('comment', meta.metadata,
sa.Column('id', sa.types.Integer, primary_key=True),
sa.Column('author_id', sa.types.Integer, sa.ForeignKey('users.id')),
sa.Column('parent_id', sa.types.Integer, sa.ForeignKey('comment.id')),
sa.Column('index', sa.types.Integer),
sa.Column('package_id', sa.types.Integer, sa.ForeignKey('packages.id')),
sa.Column('revision', sa.types.String(40)),
sa.Column('style', sa.types.String(10)),
sa.Column('file', sa.types.String(100), nullable=True),
sa.Column('title', sa.types.String(100)),
sa.Column('content', sa.types.String(500)),
sa.Column('start', sa.types.Integer, nullable=True),
sa.Column('stop', sa.types.Integer, nullable=True),
)
class Comment(OrmObject):
foreign = ['author', 'parent_id', 'package_id']
orm.mapper(Comment, t_comments, properties={
'users': orm.relation(User),
'comment': orm.relation(Comment),
'packages': orm.relation(Package)}
)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment