<s> from datetime import datetime <EOL> from sqlalchemy import Column , Integer , String , ForeignKey , Enum , DateTime <EOL> from sqlalchemy . orm import relationship <EOL> from grouper . models . base . constants import REQUEST_STATUS_CHOICES <EOL> from grouper . models . base . model_base import Model <EOL> class PermissionRequest ( Model ) : <EOL> """<STR_LIT>""" <EOL> __tablename__ = "<STR_LIT>" <EOL> id = Column ( Integer , primary_key = True ) <EOL> requester_id = Column ( Integer , ForeignKey ( "<STR_LIT>" ) , nullable = False ) <EOL> requester = relationship ( <EOL> "<STR_LIT>" , backref = "<STR_LIT>" , foreign_keys = [ requester_id ] <EOL> ) <EOL> permission_id = Column ( Integer , ForeignKey ( "<STR_LIT>" ) , nullable = False ) <EOL> permission = relationship ( "<STR_LIT>" , foreign_keys = [ permission_id ] ) <EOL> argument = Column ( String ( length = <NUM_LIT:64> ) , nullable = True ) <EOL> group_id = Column ( Integer , ForeignKey ( "<STR_LIT>" ) , nullable = False ) <EOL> group = relationship ( "<STR_LIT>" , foreign_keys = [ group_id ] ) <EOL> requested_at = Column ( DateTime , default = datetime . utcnow , nullable = False ) <EOL> status = Column ( Enum ( * REQUEST_STATUS_CHOICES ) , default = "<STR_LIT>" , nullable = False ) </s>
