# User object
class User:

    # Constructor
    def __init__(self):
        pass

    def __init__(self, username, password, capstone=False):
        self.username = username
        self.password = password
        self.capstone = capstone

    # Accessors and Mutators
    def getId(self):
        return self.username

    def setId(self, username):
        self.username = username

    def getPassword(self):
        return self.password

    def setPassword(self, password):
        self.password = password

    def setCapstone(self, capstone=True):
        self.capstone = capstone

    def isCapstone(self):
        return self.capstone

    def __str__(self):
        return '<Id: ' + str(self.username) + '>'

    def to_dict(self):
        user_data = {}
        user_data['username'] = self.getId()
        user_data['isCapstone'] = self.isCapstone()
        return user_data

