from sqlalchemy import Column, Integer, VARCHAR
from sqlalchemy.orm import relationship

from app.infrastructure.database.models import Base


class Role(Base):
    __tablename__ = 'roles'

    id = Column(Integer, primary_key=True, autoincrement=True)
    name = Column(VARCHAR(100), nullable=False)

    users = relationship('User', back_populates='role')
