<s> import datetime <EOL> from project import db , bcrypt <EOL> class User ( db . Model ) : <EOL> __tablename__ = "<STR_LIT>" <EOL> id = db . Column ( db . Integer , primary_key = True ) <EOL> email = db . Column ( db . String , unique = True , nullable = False ) <EOL> password = db . Column ( db . String , nullable = False ) <EOL> registered_on = db . Column ( db . DateTime , nullable = False ) <EOL> admin = db . Column ( db . Boolean , nullable = False , default = False ) <EOL> def __init__ ( self , email , password , paid = False , admin = False ) : <EOL> self . email = email <EOL> self . password = bcrypt . generate_password_hash ( password ) <EOL> self . registered_on = datetime . datetime . now ( ) <EOL> self . admin = admin <EOL> def is_authenticated ( self ) : <EOL> return True <EOL> def is_active ( self ) : <EOL> return True <EOL> def is_anonymous ( self ) : <EOL> return False <EOL> def get_id ( self ) : <EOL> return self . id <EOL> def __repr__ ( self ) : <EOL> return '<STR_LIT>' . format ( self . email ) </s>
