<s> from flask . ext . sqlalchemy import SQLAlchemy <EOL> from flask . ext . security import UserMixin , RoleMixin <EOL> db = SQLAlchemy ( ) <EOL> roles_users = db . Table ( '<STR_LIT>' , <EOL> db . Column ( '<STR_LIT>' , db . Integer ( ) , db . ForeignKey ( '<STR_LIT>' , ondelete = '<STR_LIT>' ) ) , <EOL> db . Column ( '<STR_LIT>' , db . Integer ( ) , db . ForeignKey ( '<STR_LIT>' , ondelete = '<STR_LIT>' ) ) ) <EOL> class Role ( db . Model , RoleMixin ) : <EOL> id = db . Column ( db . Integer ( ) , primary_key = True ) <EOL> name = db . Column ( db . String ( <NUM_LIT> ) , unique = True ) <EOL> description = db . Column ( db . String ( <NUM_LIT:255> ) ) <EOL> class User ( db . Model , UserMixin ) : <EOL> id = db . Column ( db . Integer , primary_key = True ) <EOL> email = db . Column ( db . String ( <NUM_LIT:255> ) , unique = True ) <EOL> password = db . Column ( db . String ( <NUM_LIT:255> ) ) <EOL> active = db . Column ( db . Boolean ( ) ) <EOL> confirmed_at = db . Column ( db . DateTime ( ) ) <EOL> roles = db . relationship ( '<STR_LIT>' , secondary = roles_users , <EOL> backref = db . backref ( '<STR_LIT>' , lazy = '<STR_LIT>' ) ) </s>
