def __init__(self, id, type, file_id):
        if id is None:
            self.id = DBFileType.id_counter
            DBFileType.id_counter += 1
        else:
            self.id = id

        self.type = to_utf8(type)
        self.file_id = file_id