diff --git a/api/backend/advisor/advisor_routes.py b/api/backend/advisor/advisor_routes.py new file mode 100644 index 000000000..3deb9a68a --- /dev/null +++ b/api/backend/advisor/advisor_routes.py @@ -0,0 +1,208 @@ +from flask import Blueprint +from flask import request +from flask import jsonify +from flask import make_response +from flask import current_app +from backend.db_connection import db +from werkzeug.utils import secure_filename +import logging +#------------------------------------------------------------ +# Create a new Blueprint object, which is a collection of +# routes. +advisors = Blueprint('advisors', __name__) + + + +@advisors.route('/students/', methods=['GET']) +def get_advisor_students(advisor_id): + """Get all students for an advisor with their progress status (Story 1)""" + try: + query = ''' + SELECT + s.ID, + s.First_Name, + s.Last_Name, + s.GPA, + CASE + WHEN s.Eligibility = 1 THEN 'TRUE' + ELSE 'FALSE' + END as Eligibility, + CASE + WHEN s.Hired = 1 THEN 'TRUE' + ELSE 'FALSE' + END as Hired, + COUNT(DISTINCT a.ID) as Total_Applications, + MAX(a.submittedDate) as Latest_Application, + ( + SELECT st.Status_Description + FROM Application a2 + JOIN Status st ON a2.Status_ID = st.ID + WHERE a2.Student_ID = s.ID + ORDER BY a2.submittedDate DESC + LIMIT 1 + ) as Latest_Status + FROM Student s + LEFT JOIN Application a ON s.ID = a.Student_ID + WHERE s.Advisor_ID = %s + GROUP BY s.ID; + ''' + cursor = db.get_db().cursor() + cursor.execute(query, (advisor_id,)) + return jsonify(cursor.fetchall()), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@advisors.route('/statistics/', methods=['GET']) +def get_advisor_statistics(advisor_id): + """Get summary statistics for an advisor's students (Story 3)""" + try: + cursor = db.get_db().cursor() + + # Get total students and their status + status_query = ''' + SELECT + COUNT(*) as Total_Students, + SUM(CASE WHEN Hired = TRUE THEN 1 ELSE 0 END) as Placed_Students, + SUM(CASE WHEN Hired = FALSE THEN 1 ELSE 0 END) as Searching_Students + FROM Student + WHERE Advisor_ID = %s AND Eligibility = TRUE + ''' + cursor.execute(status_query, (advisor_id,)) + status_stats = cursor.fetchone() + + # Get application distribution + apps_query = ''' + SELECT + COUNT(a.ID) as Applications_Count, + COUNT(DISTINCT a.Student_ID) as Students_Applied, + AVG(COUNT(a.ID)) OVER () as Avg_Applications_Per_Student + FROM Student s + LEFT JOIN Application a ON s.ID = a.Student_ID + WHERE s.Advisor_ID = %s AND s.Eligibility = TRUE + GROUP BY a.Student_ID + ''' + cursor.execute(apps_query, (advisor_id,)) + app_stats = cursor.fetchall() + + return jsonify({ + "status_statistics": status_stats, + "application_statistics": app_stats + }), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + + +@advisors.route('/positions/filled/', methods=['GET']) +def get_filled_positions(advisor_id): + """Get information about filled positions (Story 4)""" + try: + query = ''' + SELECT + p.ID, + p.Name, + p.Title, + c.Name AS Company_Name, + p.Filled, + p.Date_Start, + p.Date_End, + COUNT(DISTINCT a.ID) AS Total_Applications, + COUNT(DISTINCT CASE WHEN st.Status_Description = 'Accepted' + THEN a.ID END) AS Accepted_Applications + FROM Posting p + JOIN Company c ON p.Company_ID = c.ID + LEFT JOIN Application a ON p.ID = a.Position_ID + LEFT JOIN Status st ON a.Status_ID = st.ID + WHERE p.Filled = TRUE + GROUP BY p.ID + ORDER BY p.Date_End DESC; + ''' + cursor = db.get_db().cursor() + cursor.execute(query) + return jsonify(cursor.fetchall()), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + + + +@advisors.route('/students//filter', methods=['GET']) +def filter_students_by_status(advisor_id): + """Filter advisees based on co-op status (Story 5)""" + try: + hired = request.args.get('hired') + if hired is not None: + hired = hired.lower() == 'true' + + current_app.logger.info(f"Advisor ID: {advisor_id}, Hired Filter: {hired}") + + query = ''' + SELECT + s.ID, s.First_Name, s.Last_Name, s.GPA, + c.Name as College_Name, + GROUP_CONCAT(DISTINCT f.Name) as Majors + FROM Student s + JOIN College c ON s.College_ID = c.ID + LEFT JOIN Student_Majors sm ON s.ID = sm.Student_ID + LEFT JOIN FieldOfStudy f ON sm.FieldOfStudy_ID = f.ID + WHERE s.Advisor_ID = %s AND s.Hired = %s AND s.Eligibility = TRUE + GROUP BY s.ID + ''' + current_app.logger.info(f"Executing query: {query} with parameters: {(advisor_id, hired)}") + + cursor = db.get_db().cursor() + cursor.execute(query, (advisor_id, hired)) + results = cursor.fetchall() + current_app.logger.info(f"Query Results: {results}") + return jsonify(results), 200 + except Exception as e: + current_app.logger.error(f"Error: {str(e)}") + return jsonify({"error": str(e)}), 400 + + +@advisors.route('/term-summary/', methods=['GET']) +def get_term_summary(advisor_id): + """Get end-of-term summary data (Story 6)""" + try: + cursor = db.get_db().cursor() + + # Get placement statistics + placement_query = ''' + SELECT + cy.cycle, + COUNT(DISTINCT s.ID) as Total_Students, + SUM(CASE WHEN s.Hired = TRUE THEN 1 ELSE 0 END) as Placed_Students, + AVG(s.GPA) as Average_GPA, + COUNT(DISTINCT a.ID) as Total_Applications, + AVG(p.Pay) as Average_Salary + FROM Student s + JOIN Cycle cy ON s.Cycle = cy.ID + LEFT JOIN Application a ON s.ID = a.Student_ID + LEFT JOIN Posting p ON a.Position_ID = p.ID + WHERE s.Advisor_ID = %s AND s.Eligibility = TRUE + GROUP BY cy.cycle + ''' + cursor.execute(placement_query, (advisor_id,)) + placement_stats = cursor.fetchall() + + # Get industry distribution + industry_query = ''' + SELECT + p.Industry, + COUNT(DISTINCT s.ID) as Placed_Students + FROM Student s + JOIN Application a ON s.ID = a.Student_ID + JOIN Posting p ON a.Position_ID = p.ID + WHERE s.Advisor_ID = %s AND s.Hired = TRUE + GROUP BY p.Industry + ''' + cursor.execute(industry_query, (advisor_id,)) + industry_stats = cursor.fetchall() + + return jsonify({ + "placement_statistics": placement_stats, + "industry_distribution": industry_stats + }), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 \ No newline at end of file diff --git a/api/backend/alumni/alumni_routes.py b/api/backend/alumni/alumni_routes.py index e15623a72..3add14a88 100644 --- a/api/backend/alumni/alumni_routes.py +++ b/api/backend/alumni/alumni_routes.py @@ -9,7 +9,7 @@ #------------------------------------------------------------ # Create a new Blueprint object, which is a collection of # routes. -students = Blueprint('alumni', __name__) +alumni = Blueprint('alumni', __name__) @alumni.route('/', methods=['GET']) @@ -100,20 +100,73 @@ def update_alumni_profile(alumni_id): db.get_db().commit() return jsonify({"message": "Profile updated successfully"}), 200 -@alumni.route('//positions', methods=['GET']) -def get_alumni_positions(alumni_id): +@alumni.route('//previous_positions', methods=['GET']) +def get_alumni_previous_positions(alumni_id): + """ + Get all previous positions held by an alumni with detailed information + about the company, location, and required skills. + """ query = ''' - SELECT p.*, c.Name as Company_Name, pl.City, pl.State, pl.Country + SELECT + p.ID as Position_ID, + p.Title, + p.Description as Position_Description, + p.Pay, + p.Date_Start, + p.Date_End, + c.Name as Company_Name, + c.Industry, + c.Description as Company_Description, + pl.City, + pl.State, + pl.Country, + GROUP_CONCAT(DISTINCT s.Name) as Required_Skills FROM Alumni_Position ap JOIN Posting p ON ap.Position_ID = p.ID JOIN Company c ON p.Company_ID = c.ID JOIN Posting_Location pl ON p.Location = pl.ID + LEFT JOIN Posting_Skills ps ON p.ID = ps.Position_ID + LEFT JOIN Skill s ON ps.Skill_ID = s.ID WHERE ap.Alumni_ID = %s + GROUP BY p.ID ORDER BY p.Date_Start DESC ''' - cursor = db.get_db().cursor() - cursor.execute(query, (alumni_id,)) - return jsonify(cursor.fetchall()), 200 + + try: + cursor = db.get_db().cursor() + cursor.execute(query, (alumni_id,)) + positions = cursor.fetchall() + + if not positions: + return jsonify({ + "message": "No previous positions found for this alumni", + "positions": [] + }), 200 + + # Format dates for JSON response + for position in positions: + if position['Date_Start']: + position['Date_Start'] = position['Date_Start'].strftime('%Y-%m-%d') + if position['Date_End']: + position['Date_End'] = position['Date_End'].strftime('%Y-%m-%d') + + # Convert skills string to list if not None + if position['Required_Skills']: + position['Required_Skills'] = position['Required_Skills'].split(',') + else: + position['Required_Skills'] = [] + + return jsonify({ + "positions": positions, + "count": len(positions) + }), 200 + + except Exception as e: + current_app.logger.error(f"Error fetching alumni positions: {str(e)}") + return jsonify({ + "error": "An error occurred while fetching positions", + "details": str(e) + }), 500 @alumni.route('/messages/send', methods=['POST']) def send_message(): @@ -229,4 +282,158 @@ def create_alumni_profile(): (alumni_id, minor_result['ID'])) db.get_db().commit() - return jsonify({"message": "Alumni profile created", "id": alumni_id}), 201 \ No newline at end of file + return jsonify({"message": "Alumni profile created", "id": alumni_id}), 201 + + +@alumni.route('//students', methods=['GET']) +def get_alumni_students(alumni_id): + """ + Get all students related to an alumni (via Alumni_Student table) + """ + try: + query = ''' + SELECT + s.ID as Student_ID, + s.First_Name, + s.Last_Name, + s.GPA, + c.Name as College_Name, + GROUP_CONCAT(DISTINCT f.Name) as Majors + FROM Alumni_Student al + JOIN Student s ON al.Student_ID = s.ID + JOIN College c ON s.College_ID = c.ID + LEFT JOIN Student_Majors sm ON s.ID = sm.Student_ID + LEFT JOIN FieldOfStudy f ON sm.FieldOfStudy_ID = f.ID + WHERE al.Alumni_ID = %s + GROUP BY s.ID + ''' + cursor = db.get_db().cursor() + cursor.execute(query, (alumni_id,)) + results = cursor.fetchall() + + if not results: + return jsonify({"message": "No related students found for this alumni"}), 404 + + return jsonify(results), 200 + except Exception as e: + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + +@alumni.route('//positions', methods=['POST']) +def add_alumni_position(alumni_id): + """ + Add a new position to an alumni's profile. The position can either be: + 1. An existing posting (using posting_id) + 2. A new position entry (requiring full position details) + """ + try: + data = request.get_json() + cursor = db.get_db().cursor() + + # First verify the alumni exists + cursor.execute('SELECT ID FROM Alumni WHERE ID = %s', (alumni_id,)) + if not cursor.fetchone(): + return jsonify({"error": "Alumni not found"}), 404 + + position_id = None + + # If posting_id is provided, use existing posting + if 'posting_id' in data: + cursor.execute('SELECT ID FROM Posting WHERE ID = %s', (data['posting_id'],)) + if not cursor.fetchone(): + return jsonify({"error": "Posting not found"}), 404 + position_id = data['posting_id'] + + # Otherwise, create new posting + else: + # Validate required fields + required_fields = ['title', 'company_name', 'date_start', 'pay'] + if not all(field in data for field in required_fields): + return jsonify({"error": "Missing required fields"}), 400 + + # Get or create company + cursor.execute('SELECT ID FROM Company WHERE Name = %s', (data['company_name'],)) + company_result = cursor.fetchone() + + if company_result: + company_id = company_result['ID'] + else: + # Create new company + cursor.execute( + 'INSERT INTO Company (Name, Industry, Description) VALUES (%s, %s, %s)', + (data['company_name'], data.get('industry'), data.get('company_description')) + ) + company_id = cursor.lastrowid + + # Create or get location + location_query = ''' + INSERT INTO Posting_Location (City, State, Country) + VALUES (%s, %s, %s) + ''' + cursor.execute(location_query, ( + data.get('city'), + data.get('state'), + data.get('country') + )) + location_id = cursor.lastrowid + + # Create new posting + posting_query = ''' + INSERT INTO Posting ( + Name, Title, Company_ID, Location, Date_Start, Date_End, + Description, Pay, Industry + ) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s) + ''' + # Use title as the Name if not explicitly provided + posting_name = data.get('name', data['title']) + + cursor.execute(posting_query, ( + posting_name, + data['title'], + company_id, + location_id, + data['date_start'], + data.get('date_end'), + data.get('description'), + data['pay'], + data.get('industry') + )) + position_id = cursor.lastrowid + + # Add skills if provided + if 'skills' in data: + for skill_name in data['skills']: + # Get or create skill + cursor.execute('SELECT ID FROM Skill WHERE Name = %s', (skill_name,)) + skill_result = cursor.fetchone() + + if not skill_result: + cursor.execute('INSERT INTO Skill (Name) VALUES (%s)', (skill_name,)) + skill_id = cursor.lastrowid + else: + skill_id = skill_result['ID'] + + # Add to posting_skills + cursor.execute( + 'INSERT INTO Posting_Skills (Position_ID, Skill_ID) VALUES (%s, %s)', + (position_id, skill_id) + ) + + # Add position to alumni's profile + cursor.execute( + 'INSERT INTO Alumni_Position (Position_ID, Alumni_ID) VALUES (%s, %s)', + (position_id, alumni_id) + ) + + db.get_db().commit() + return jsonify({ + "message": "Position added successfully", + "position_id": position_id + }), 201 + + except Exception as e: + current_app.logger.error(f"Error adding alumni position: {str(e)}") + db.get_db().rollback() + return jsonify({ + "error": "An error occurred while adding the position", + "details": str(e) + }), 500 \ No newline at end of file diff --git a/api/backend/company/company_routes.py b/api/backend/company/company_routes.py new file mode 100644 index 000000000..3fd4053b9 --- /dev/null +++ b/api/backend/company/company_routes.py @@ -0,0 +1,302 @@ +######################################################## +# Sample customers blueprint of endpoints +# Remove this file if you are not using it in your project +######################################################## +from flask import Blueprint +from flask import request +from flask import jsonify +from flask import make_response +from flask import current_app +from backend.db_connection import db +from pymysql.err import IntegrityError, DatabaseError + +#------------------------------------------------------------ +# Create a new Blueprint object, which is a collection of +# routes. +companies = Blueprint('companies', __name__) + +@companies.route('/profile', methods=['POST']) +def create_company_profile(): + """Create a new company profile (User Story 2)""" + try: + data = request.get_json() + cursor = db.get_db().cursor() + + query = ''' + INSERT INTO Company (Name, Industry, Description) + VALUES (%s, %s, %s) + ''' + cursor.execute(query, ( + data['name'], + data['industry'], + data.get('description', None) # Use default value for description + )) + company_id = cursor.lastrowid + db.get_db().commit() + + return jsonify({ + "message": "Company profile created successfully", + "company_id": company_id + }), 201 + + except KeyError as ke: + return jsonify({"error": f"Missing field: {str(ke)}"}), 400 + except IntegrityError as ie: + return jsonify({"error": "Database integrity error: " + str(ie)}), 400 + except DatabaseError as de: + return jsonify({"error": "Database error: " + str(de)}), 500 + except Exception as e: + return jsonify({"error": f"An unexpected error occurred: {str(e)}"}), 500 + +@companies.route('/profile/', methods=['PUT']) +def update_company_profile(company_id): + """Update company profile """ + try: + data = request.get_json() + cursor = db.get_db().cursor() + + query = ''' + UPDATE Company + SET Name = %s, Industry = %s, Description = %s + WHERE ID = %s + ''' + cursor.execute(query, ( + data['name'], + data['industry'], + data.get('description'), + company_id + )) + db.get_db().commit() + + return jsonify({"message": "Company profile updated successfully"}), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + +@companies.route('/posting', methods=['POST']) +def create_posting(): + """Create a new job posting with skills""" + try: + data = request.get_json() + cursor = db.get_db().cursor() + + # Create the posting location entity + location_query = ''' + INSERT INTO Posting_Location (City, Country) + VALUES (%s, %s) + ''' + cursor.execute(location_query, ( + data['location'], # Assuming 'location' is the city name + "USA" # Assuming a default country for simplicity + )) + location_id = cursor.lastrowid + + # Create the posting + posting_query = ''' + INSERT INTO Posting (Name, Company_ID, Industry, Location, Date_Start, + Date_End, Filled, Minimum_GPA, Title, Description, Pay) + VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s) + ''' + cursor.execute(posting_query, ( + data.get('name', 'Unknown'), # Default name if not provided + data['company_id'], # Ensure 'company_id' is provided + data.get('industry', 'General'), # Default industry if not provided + location_id, + data.get('date_start', '2024-01-01'), # Default start date + data.get('date_end', '2024-12-31'), # Default end date + False, # Not filled initially + data['minimum_gpa'], + data['title'], + data['description'], + data['pay'] + )) + posting_id = cursor.lastrowid + + # Add skills if provided + if 'required_skills' in data and isinstance(data['required_skills'], list): + skills_query = ''' + INSERT INTO Posting_Skills (Position_ID, Skill_ID) + VALUES (%s, %s) + ''' + for skill in data['required_skills']: + # Assuming skill is a Skill_ID directly + cursor.execute(skills_query, (posting_id, skill)) + + db.get_db().commit() + return jsonify({ + "message": "Posting created successfully", + "posting_id": posting_id + }), 201 + except KeyError as e: + return jsonify({"error": f"Missing required field: {e}"}), 400 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@companies.route('/posting/', methods=['PUT']) +def update_posting(posting_id): + """Update job posting details and skills (User Story 9)""" + try: + data = request.get_json() + cursor = db.get_db().cursor() + + # Fetch existing values + fetch_query = ''' + SELECT Name, Industry, Date_Start, Date_End, Minimum_GPA, Title, Description, Pay + FROM Posting + WHERE ID = %s + ''' + cursor.execute(fetch_query, (posting_id,)) + existing_posting = cursor.fetchone() + + if not existing_posting: + return jsonify({"error": "Posting not found"}), 404 + + # Merge existing values with updates + updated_posting = { + "name": data.get("name", existing_posting["Name"]), + "industry": data.get("industry", existing_posting["Industry"]), + "date_start": data.get("date_start", existing_posting["Date_Start"]), + "date_end": data.get("date_end", existing_posting["Date_End"]), + "minimum_gpa": data.get("minimum_gpa", existing_posting["Minimum_GPA"]), + "title": data.get("title", existing_posting["Title"]), + "description": data.get("description", existing_posting["Description"]), + "pay": data.get("pay", existing_posting["Pay"]), + } + + # Update posting + posting_query = ''' + UPDATE Posting + SET Name = %s, Industry = %s, Date_Start = %s, Date_End = %s, + Minimum_GPA = %s, Title = %s, Description = %s, Pay = %s + WHERE ID = %s + ''' + cursor.execute(posting_query, ( + updated_posting["name"], + updated_posting["industry"], + updated_posting["date_start"], + updated_posting["date_end"], + updated_posting["minimum_gpa"], + updated_posting["title"], + updated_posting["description"], + updated_posting["pay"], + posting_id + )) + + # Update skills if provided + if "skills" in data: + # Remove existing skills + cursor.execute('DELETE FROM Posting_Skills WHERE Position_ID = %s', (posting_id,)) + + # Add new skills + skills_query = 'INSERT INTO Posting_Skills (Position_ID, Skill_ID) VALUES (%s, %s)' + for skill_id in data["skills"]: + cursor.execute(skills_query, (posting_id, skill_id)) + + db.get_db().commit() + return jsonify({"message": "Posting updated successfully"}), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + + +@companies.route('/posting//filled', methods=['PUT']) +def mark_posting_filled(posting_id): + """Mark a position as filled """ + try: + cursor = db.get_db().cursor() + query = ''' + UPDATE Posting + SET Filled = TRUE + WHERE ID = %s + ''' + cursor.execute(query, (posting_id,)) + db.get_db().commit() + return jsonify({"message": "Posting marked as filled"}), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@companies.route('/posting/', methods=['DELETE']) +def delete_posting(posting_id): + """Remove a job posting""" + try: + cursor = db.get_db().cursor() + + # Delete related records first + cursor.execute('DELETE FROM Posting_Skills WHERE Position_ID = %s', (posting_id,)) + cursor.execute('DELETE FROM Application WHERE Position_ID = %s', (posting_id,)) + + # Delete the posting + cursor.execute('DELETE FROM Posting WHERE ID = %s', (posting_id,)) + + db.get_db().commit() + return jsonify({"message": "Posting deleted successfully"}), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@companies.route('/posting//applications', methods=['GET']) +def view_applications(posting_id): + """View applications for a posting""" + try: + cursor = db.get_db().cursor() + query = ''' + SELECT a.*, s.First_Name, s.Last_Name, s.Email, s.Phone_Number, + s.GPA, s.Resume_Link, st.Status_Description, + GROUP_CONCAT(DISTINCT sk.Name) as Skills + FROM Application a + JOIN Student s ON a.Student_ID = s.ID + JOIN Status st ON a.Status_ID = st.ID + LEFT JOIN Student_Skills ss ON s.ID = ss.Student_ID + LEFT JOIN Skill sk ON ss.Skill_ID = sk.ID + WHERE a.Position_ID = %s + GROUP BY a.ID + ORDER BY a.submittedDate DESC + ''' + cursor.execute(query, (posting_id,)) + return jsonify(cursor.fetchall()), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@companies.route('/student//contact', methods=['GET']) +def get_student_contact(student_id): + """Get student contact information""" + try: + cursor = db.get_db().cursor() + query = ''' + SELECT Email, Phone_Number, Resume_Link + FROM Student + WHERE ID = %s + ''' + cursor.execute(query, (student_id,)) + result = cursor.fetchone() + if result: + return jsonify(result), 200 + return jsonify({"error": "Student not found"}), 404 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@companies.route('/profile/', methods=['GET']) +def get_company_profile(company_id): + """Get a company's profile information""" + try: + cursor = db.get_db().cursor() + query = ''' + SELECT c.ID, c.Name, c.Industry, c.Description, + COUNT(DISTINCT p.ID) as Active_Postings + FROM Company c + LEFT JOIN Posting p ON c.ID = p.Company_ID + WHERE c.ID = %s + GROUP BY c.ID + ''' + cursor.execute(query, (company_id,)) + result = cursor.fetchone() + + if not result: + return jsonify({"error": "Company not found"}), 404 + + return jsonify(result), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 \ No newline at end of file diff --git a/api/backend/customers/customer_routes.py b/api/backend/customers/customer_routes.py deleted file mode 100644 index 4fda46022..000000000 --- a/api/backend/customers/customer_routes.py +++ /dev/null @@ -1,83 +0,0 @@ -######################################################## -# Sample customers blueprint of endpoints -# Remove this file if you are not using it in your project -######################################################## -from flask import Blueprint -from flask import request -from flask import jsonify -from flask import make_response -from flask import current_app -from backend.db_connection import db -from backend.ml_models.model01 import predict - -#------------------------------------------------------------ -# Create a new Blueprint object, which is a collection of -# routes. -customers = Blueprint('customers', __name__) - - -#------------------------------------------------------------ -# Get all customers from the system -@customers.route('/customers', methods=['GET']) -def get_customers(): - - cursor = db.get_db().cursor() - cursor.execute('''SELECT id, company, last_name, - first_name, job_title, business_phone FROM customers - ''') - - theData = cursor.fetchall() - - the_response = make_response(jsonify(theData)) - the_response.status_code = 200 - return the_response - -#------------------------------------------------------------ -# Update customer info for customer with particular userID -# Notice the manner of constructing the query. -@customers.route('/customers', methods=['PUT']) -def update_customer(): - current_app.logger.info('PUT /customers route') - cust_info = request.json - cust_id = cust_info['id'] - first = cust_info['first_name'] - last = cust_info['last_name'] - company = cust_info['company'] - - query = 'UPDATE customers SET first_name = %s, last_name = %s, company = %s where id = %s' - data = (first, last, company, cust_id) - cursor = db.get_db().cursor() - r = cursor.execute(query, data) - db.get_db().commit() - return 'customer updated!' - -#------------------------------------------------------------ -# Get customer detail for customer with particular userID -# Notice the manner of constructing the query. -@customers.route('/customers/', methods=['GET']) -def get_customer(userID): - current_app.logger.info('GET /customers/ route') - cursor = db.get_db().cursor() - cursor.execute('SELECT id, first_name, last_name FROM customers WHERE id = {0}'.format(userID)) - - theData = cursor.fetchall() - - the_response = make_response(jsonify(theData)) - the_response.status_code = 200 - return the_response - -#------------------------------------------------------------ -# Makes use of the very simple ML model in to predict a value -# and returns it to the user -@customers.route('/prediction//', methods=['GET']) -def predict_value(var01, var02): - current_app.logger.info(f'var01 = {var01}') - current_app.logger.info(f'var02 = {var02}') - - returnVal = predict(var01, var02) - return_dict = {'result': returnVal} - - the_response = make_response(jsonify(return_dict)) - the_response.status_code = 200 - the_response.mimetype = 'application/json' - return the_response \ No newline at end of file diff --git a/api/backend/rest_entry.py b/api/backend/rest_entry.py index 0d36d6e7c..e6281c17e 100644 --- a/api/backend/rest_entry.py +++ b/api/backend/rest_entry.py @@ -1,11 +1,13 @@ from flask import Flask from backend.db_connection import db -from backend.customers.customer_routes import customers from backend.products.products_routes import products from backend.simple.simple_routes import simple_routes from backend.student.student_routes import students from backend.alumni.alumni_routes import alumni +from backend.company.company_routes import companies +from backend.advisor.advisor_routes import advisors +from backend.systemAdmin.system_admin_routes import system_admin import os from dotenv import load_dotenv @@ -43,11 +45,13 @@ def create_app(): # and give a url prefix to each app.logger.info('current_app(): registering blueprints with Flask app object.') app.register_blueprint(simple_routes) - - app.register_blueprint(customers, url_prefix='/c') app.register_blueprint(products, url_prefix='/p') - app.register_blueprint(students, url_prefix='/s') app.register_blueprint(alumni, url_prefix='/a') + app.register_blueprint(companies, url_prefix='/cp') + app.register_blueprint(advisors, url_prefix='/ad') + app.register_blueprint(system_admin, url_prefix='/sys') + app.register_blueprint(students, url_prefix='/st') + # Don't forget to return the app object return app diff --git a/api/backend/student/student_routes.py b/api/backend/student/student_routes.py index 4dc00c57d..c9ad1648c 100644 --- a/api/backend/student/student_routes.py +++ b/api/backend/student/student_routes.py @@ -20,7 +20,7 @@ def test_db_connection(): except Exception as e: return jsonify({"error": f"Error occurred: {str(e)}"}), 500 - +# Need for System Admin persona @students.route('/get_all', methods=['GET']) def get_students(): query = ''' @@ -41,6 +41,7 @@ def get_students(): cursor.execute(query) return make_response(jsonify(cursor.fetchall()), 200) +# Creating a Profile. @students.route('/create_profile', methods=['POST']) def create_student_profile(): data = request.get_json() @@ -74,7 +75,7 @@ def create_student_profile(): db.get_db().commit() return jsonify({"message": "Student profile created", "id": student_id}), 201 - +# @students.route('/edit_profile/', methods=['PUT']) def edit_student_profile(student_id): data = request.get_json() @@ -117,7 +118,7 @@ def filter_postings_by_pay(): JOIN Company c ON p.Company_ID = c.ID JOIN Posting_Location pl ON p.Location = pl.ID WHERE p.Pay >= %s AND p.Filled = FALSE - + ''' cursor = db.get_db().cursor() cursor.execute(query, (min_pay,)) return jsonify(cursor.fetchall()), 200 @@ -174,3 +175,96 @@ def upload_resume(): cursor.execute(query, (filepath, student_id)) db.get_db().commit() +@students.route('/jobs', methods=['GET']) +def get_all_jobs(): + """Get all job postings with optional location and salary filters""" + try: + # Get query parameters + location = request.args.get('location', '') + min_pay = request.args.get('min_pay', type=int, default=0) + + # Base query - removed trailing comma after Position_Title + query = ''' + SELECT + p.ID AS Posting_ID, + p.Name AS Job_Title, + c.Name AS Company_Name, + p.Description AS Job_Description, + p.Industry AS Industry, + pl.City AS City, + pl.State AS State, + pl.Country AS Country, + p.Date_Start AS Start_Date, + p.Date_End AS End_Date, + p.Minimum_GPA AS Minimum_GPA, + p.Pay AS Salary, + p.Title AS Position_Title + FROM Posting p + JOIN Company c ON p.Company_ID = c.ID + JOIN Posting_Location pl ON p.Location = pl.ID + WHERE p.Filled = FALSE + ''' + + params = [] + conditions = [] + + # Only add location filter if location parameter is not empty + if location: + conditions.append("(pl.City LIKE %s OR pl.State LIKE %s OR pl.Country LIKE %s)") + search = f"%{location}%" + params.extend([search, search, search]) + + # Only add pay filter if min_pay is greater than 0 + if min_pay > 0: + conditions.append("p.Pay >= %s") + params.append(min_pay) + + # Add filters to query if any conditions exist + if conditions: + query += " AND " + " AND ".join(conditions) + + query += " ORDER BY p.Date_End DESC" + + cursor = db.get_db().cursor() + cursor.execute(query, tuple(params) if params else None) + results = cursor.fetchall() + + return jsonify(results), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 + + +@students.route('/profile/', methods=['GET']) +def get_student_profile(student_id): + """Get a student's profile information""" + try: + query = ''' + SELECT s.ID, s.First_Name, s.Last_Name, s.Email, s.Phone_Number, + s.GPA, s.Grad_Year, s.Resume_Link, s.Description, + c.Name as College_Name, cy.cycle, + GROUP_CONCAT(DISTINCT f1.Name) as Majors, + GROUP_CONCAT(DISTINCT f2.Name) as Minors, + a.First_Name as Advisor_First_Name, + a.Last_Name as Advisor_Last_Name + FROM Student s + JOIN College c ON s.College_ID = c.ID + JOIN Cycle cy ON s.Cycle = cy.ID + LEFT JOIN Student_Majors sm ON s.ID = sm.Student_ID + LEFT JOIN Student_Minors sn ON s.ID = sn.Student_ID + LEFT JOIN FieldOfStudy f1 ON sm.FieldOfStudy_ID = f1.ID + LEFT JOIN FieldOfStudy f2 ON sn.FieldOfStudy_ID = f2.ID + LEFT JOIN Advisor a ON s.Advisor_ID = a.ID + WHERE s.ID = %s + GROUP BY s.ID + ''' + + cursor = db.get_db().cursor() + cursor.execute(query, (student_id,)) + result = cursor.fetchone() + + if not result: + return jsonify({"error": "Student not found"}), 404 + + return jsonify(result), 200 + except Exception as e: + return jsonify({"error": str(e)}), 400 \ No newline at end of file diff --git a/api/backend/systemAdmin/system_admin_routes.py b/api/backend/systemAdmin/system_admin_routes.py new file mode 100644 index 000000000..b07d1116e --- /dev/null +++ b/api/backend/systemAdmin/system_admin_routes.py @@ -0,0 +1,253 @@ +from flask import Blueprint +from flask import request +from flask import jsonify +from flask import make_response +from flask import current_app +from backend.db_connection import db +from werkzeug.utils import secure_filename +import logging +#------------------------------------------------------------ +# Create a new Blueprint object, which is a collection of +# routes. +system_admin = Blueprint('system_admin', __name__) + +@system_admin.route('/advisors/add', methods=['POST']) +def add_advisor(): + try: + data = request.get_json() + cursor = db.get_db().cursor() + + query = ''' + INSERT INTO Advisor (First_Name, Last_Name, Preferred_Name, College_ID) + VALUES (%s, %s, %s, %s) + ''' + cursor.execute(query, ( + data['First_Name'], + data['Last_Name'], + data.get('Preferred_Name'), + data['College_ID'] + )) + advisor_id = cursor.lastrowid + db.get_db().commit() + + return jsonify({"message": "Advisor added successfully", "id": advisor_id}), 201 + except Exception as e: + db.get_db().rollback() + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + +@system_admin.route('/advisors/', methods=['DELETE']) +def remove_advisor(advisor_id): + try: + cursor = db.get_db().cursor() + + # Check if advisor exists + cursor.execute('SELECT ID FROM Advisor WHERE ID = %s', (advisor_id,)) + if not cursor.fetchone(): + return jsonify({"error": "Advisor not found"}), 404 + + cursor.execute('DELETE FROM Advisor WHERE ID = %s', (advisor_id,)) + db.get_db().commit() + + return jsonify({"message": "Advisor removed successfully"}), 200 + except Exception as e: + db.get_db().rollback() + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + +@system_admin.route('/students//override', methods=['PUT']) +def override_student_restrictions(student_id): + try: + data = request.get_json() + cursor = db.get_db().cursor() + + # Update student eligibility + update_query = ''' + UPDATE Student + SET Eligibility = %s + WHERE ID = %s + ''' + cursor.execute(update_query, (data['eligibility'], student_id)) + + # Add special application if provided + if 'position_id' in data: + app_query = ''' + INSERT INTO Application (Student_ID, Position_ID, submittedDate, Status_ID) + VALUES (%s, %s, NOW(), %s) + ''' + cursor.execute(app_query, ( + student_id, + data['position_id'], + data.get('status_id', 1) # Default to initial status + )) + + db.get_db().commit() + return jsonify({"message": "Student restrictions overridden successfully"}), 200 + except Exception as e: + db.get_db().rollback() + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + + + +@system_admin.route('/activity/applications', methods=['GET']) +def get_application_activity(): + try: + cursor = db.get_db().cursor() + query = ''' + SELECT + a.ID as Application_ID, + a.Student_ID, + s.First_Name as Student_First_Name, + s.Last_Name as Student_Last_Name, + p.Name as Position_Name, + c.Name as Company_Name, + a.submittedDate, + st.Status_Description + FROM Application a + JOIN Student s ON a.Student_ID = s.ID + JOIN Posting p ON a.Position_ID = p.ID + JOIN Company c ON p.Company_ID = c.ID + JOIN Status st ON a.Status_ID = st.ID + ORDER BY a.submittedDate DESC + LIMIT 100 + ''' + cursor.execute(query) + return make_response(jsonify(cursor.fetchall()), 200) + except Exception as e: + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + + + +@system_admin.route('/tickets', methods=['GET']) +def get_tickets(): + try: + cursor = db.get_db().cursor() + query = ''' + SELECT + t.ID, + t.Message, + t.Completed, + sa.First_Name as Reporter_First_Name, + sa.Last_Name as Reporter_Last_Name + FROM Ticket t + JOIN System_Admin sa ON t.Reporter_ID = sa.ID + ORDER BY t.ID DESC + ''' + cursor.execute(query) + return make_response(jsonify(cursor.fetchall()), 200) + except Exception as e: + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + + + +@system_admin.route('/tickets/', methods=['PUT']) +def update_ticket(ticket_id): + try: + data = request.get_json() + cursor = db.get_db().cursor() + + query = ''' + UPDATE Ticket + SET Completed = %s + WHERE ID = %s + ''' + cursor.execute(query, (data['completed'], ticket_id)) + db.get_db().commit() + + return jsonify({"message": "Ticket updated successfully"}), 200 + except Exception as e: + db.get_db().rollback() + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + + +@system_admin.route('/accounts//', methods=['DELETE']) +def delete_account(account_type, account_id): + try: + cursor = db.get_db().cursor() + + # Determine the table based on the account type + if account_type == 'student': + table = 'Student' + elif account_type == 'advisor': + table = 'Advisor' + elif account_type == 'alumni': + table = 'Alumni' + else: + return jsonify({"error": "Invalid account type"}), 400 + + # Check if the account exists + cursor.execute(f'SELECT ID FROM {table} WHERE ID = %s', (account_id,)) + if not cursor.fetchone(): + return jsonify({"error": f"{account_type} not found"}), 404 + + # Attempt to delete the account + cursor.execute(f'DELETE FROM {table} WHERE ID = %s', (account_id,)) + db.get_db().commit() + + return jsonify({"message": f"{account_type} account deleted successfully"}), 200 + except Exception as e: + db.get_db().rollback() + + # Add detailed logging for debugging + logging.error(f"Error occurred during account deletion: {str(e)}") + + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + + +@system_admin.route('/accounts///restrict', methods=['POST']) +def restrict_account(account_type, account_id): + try: + cursor = db.get_db().cursor() + + if account_type == 'student': + query = ''' + UPDATE Student + SET Eligibility = FALSE + WHERE ID = %s + ''' + cursor.execute(query, (account_id,)) + else: + return jsonify({"error": "Account type not supported for restriction"}), 400 + + db.get_db().commit() + return jsonify({"message": f"{account_type} account restricted successfully"}), 200 + except Exception as e: + db.get_db().rollback() + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 + + +@system_admin.route('/admins/', methods=['GET']) +def get_admin(admin_id): + try: + cursor = db.get_db().cursor() + + # Query to fetch admin details by ID + query = ''' + SELECT ID, First_Name, Last_Name, Preferred_Name + FROM System_Admin + WHERE ID = %s + ''' + cursor.execute(query, (admin_id,)) + admin = cursor.fetchone() + + # If the admin doesn't exist + if not admin: + return jsonify({"error": "Admin not found"}), 404 + + # Format the result as JSON + admin_data = { + "ID": admin[0], + "First_Name": admin[1], + "Last_Name": admin[2], + "Preferred_Name": admin[3], + } + return jsonify(admin_data), 200 + + except Exception as e: + # Log error and return a response + logging.error(f"Error occurred while retrieving admin: {str(e)}") + return jsonify({"error": f"Error occurred: {str(e)}"}), 500 diff --git a/app/src/Home.py b/app/src/Home.py index c6ac97a1c..68931febb 100644 --- a/app/src/Home.py +++ b/app/src/Home.py @@ -74,12 +74,12 @@ st.session_state['first_name'] = 'Kalina' st.switch_page('pages/Advisor_Home.py') -if st.button('Act as Neel, an alumn of Northeastern', +if st.button('Act as Emma, an alumn of Northeastern', type = 'primary', use_container_width=True): st.session_state['authenticated'] = True st.session_state['role'] = 'alumn' - st.session_state['first_name'] = 'Neel' + st.session_state['first_name'] = 'Emma' st.switch_page('pages/Alumn_Home.py') if st.button('Act as Tarini, a system administrator of Career Compass', diff --git a/app/src/job_postings.json b/app/src/job_postings.json new file mode 100644 index 000000000..0583ef070 --- /dev/null +++ b/app/src/job_postings.json @@ -0,0 +1,38 @@ +[ + { + "id": "#001", + "job_title": "Data Analyst", + "job_description": "Analyze data trends and insights", + "min_gpa": "3.5", + "grad_year": "2024", + "college": "Engineering", + "skills": "Python, SQL, Data Analysis" + }, + { + "id": "#002", + "job_title": "HR Coordinator", + "job_description": "Coordinate HR processes and hiring", + "min_gpa": "3.0", + "grad_year": "2023", + "college": "Business", + "skills": "Communication, Recruitment, Leadership" + }, + { + "id": "#003", + "job_title": "CEO", + "job_description": "Lead the organization strategically", + "min_gpa": "3.7", + "grad_year": "2025", + "college": "Science", + "skills": "Management, Strategy, Decision Making" + }, + { + "id": "#004", + "job_title": "CFO", + "job_description": "Manage corporate financials", + "min_gpa": "3.8", + "grad_year": "2024", + "college": "Engineering", + "skills": "Accounting, Finance, Leadership" + } +] \ No newline at end of file diff --git a/app/src/modules/nav.py b/app/src/modules/nav.py index dce4dbd38..684c65de0 100644 --- a/app/src/modules/nav.py +++ b/app/src/modules/nav.py @@ -47,35 +47,50 @@ def Alumn_Profile(): ## ------------------------ Examples Company employee ------------------------ -def Company(): - st.sidebar.page_link("pages/12_API_Test.py", label="Test the API", icon="🛜") - def PostJob(): st.sidebar.page_link( - "pages/11_Post_Job.py", label="PostJob", icon="📈" + "pages/40_Add_Postings.py", label="Add Posting", icon="📈" ) +def View_Applications(): + st.sidebar.page_link( + "pages/42_View_Applications.py", label="View Applications", icon="📄" + ) -# def ClassificationNav(): -# st.sidebar.page_link( -# "pages/13_Classification.py", label="Classification Demo", icon="🌺" -# ) +def Edit_Postings(): + st.sidebar.page_link( + "pages/41_Edit_Postings.py", label="Edit Postings", icon="✏️" + ) +def Company_Home(): + st.sidebar.page_link( + "pages/Company_Home.py", label="Company Home Page", icon="🏠" + ) #### ------------------------ Advisor ------------------------ -# def AdminPageNav(): -# st.sidebar.page_link("pages/20_Admin_Home.py", label="System Admin", icon="🖥️") -# # st.sidebar.page_link( -# # "pages/21_ML_Model_Mgmt.py", label="ML Model Management", icon="🏢" -# # ) +def AdvisorHome(): + st.sidebar.page_link( + "pages/Advisor_Home.py", label="Advisor Home", icon="🏠" + ) +def AdvisorProfile(): + st.sidebar.page_link( + "pages/Advisor_Profile.py", label="Advisor Profile", icon="👤" + ) #### ------------------------ System Admin Role ------------------------ -def AdminPageNav(): - st.sidebar.page_link("pages/20_Admin_Home.py", label="System Admin", icon="🖥️") - # st.sidebar.page_link( - # "pages/21_ML_Model_Mgmt.py", label="ML Model Management", icon="🏢" - # ) +def Admin_Profile(): + st.sidebar.page_link( + "pages/42_Admin_Profile.py", label="Student Profile", icon="👤" + ) +def See_Tickets(): + st.sidebar.page_link( + "pages/43_See_Tickets.py", label="See Tickets", icon="⏳" + ) +def See_All_Users(): + st.sidebar.page_link( + "pages/44_See_All_Users.py", label="See All Users", icon="🧑‍💻" + ) @@ -113,8 +128,9 @@ def SideBarLinks(show_home=False): if st.session_state["role"] == "company": st.write('\n\n') PostJob() - # ApiTestNav() - # ClassificationNav() + View_Applications() + Edit_Postings() + Company_Home() # If the user is an administrator, give them access to the administrator pages if st.session_state["role"] == "alumn": @@ -122,9 +138,18 @@ def SideBarLinks(show_home=False): Alumn_Profile() # If the user is an administrator, give them access to the administrator pages - # if st.session_state["role"] == "alumn": - # st.write('\n\n') - # AdminPageNav() + if st.session_state["role"] == "administrator": + st.write('\n\n') + Admin_Profile() + See_Tickets() + See_All_Users() + + # If the user is an advisor, give them access to the advisor pages + if st.session_state["role"] == "advisor": + st.write('\n\n') + AdvisorProfile() + AdvisorHome() + # Always show the About page at the bottom of the list of links AboutPageNav() diff --git a/app/src/pages/03_Simple_Chat_Bot.py b/app/src/pages/03_Simple_Chat_Bot.py new file mode 100644 index 000000000..2fec002cc --- /dev/null +++ b/app/src/pages/03_Simple_Chat_Bot.py @@ -0,0 +1,54 @@ +import logging +logger = logging.getLogger(__name__) +import streamlit as st +from streamlit_extras.app_logo import add_logo +import numpy as np +import random +import time +from modules.nav import SideBarLinks + +SideBarLinks() + +def response_generator(): + response = ("Response here based on query of messages with a later timestams but the same starting message") +#----------------------------------------------------------------------- + +st.set_page_config (page_title="Sample Chat Bot", page_icon="🤖") +add_logo("assets/logo.png", height=400) + +st.title("Chat with Neel") + +st.markdown(""" + Currently, this chat only returns a default message + """ + ) + + +# Initialize chat history +if "messages" not in st.session_state: + st.session_state.messages = [] + +# Display chat message from history on app rerun +for message in st.session_state.messages: + with st.chat_message(message["role"]): + st.markdown(message["content"]) + +# React to user input +if prompt := st.chat_input("What is up?"): + # Display user message in chat message container + with st.chat_message("user"): + st.markdown(prompt) + + # Add user message to chat history + st.session_state.messages.append({"role": "user", "content": prompt}) + + response = f"Echo: {prompt}" + + # Display assistant response in chat message container + with st.chat_message("assistant"): + # st.markdown(response) + response = st.write_stream(response_generator()) + + # Add assistant response to chat history + st.session_state.messages.append({"role": "assistant", "content": response}) + diff --git a/app/src/pages/11_Post_Job.py b/app/src/pages/11_Post_Job.py deleted file mode 100644 index 5bb2244d9..000000000 --- a/app/src/pages/11_Post_Job.py +++ /dev/null @@ -1,38 +0,0 @@ -import logging -logger = logging.getLogger(__name__) - -import streamlit as st -from modules.nav import SideBarLinks -import requests - -st.set_page_config(layout = 'wide') - -# Display the appropriate sidebar links for the role of the logged in user -SideBarLinks() - -# st.title('Prediction with Regression') - -# # create a 2 column layout -# col1, col2 = st.columns(2) - -# # add one number input for variable 1 into column 1 -# with col1: -# var_01 = st.number_input('Variable 01:', -# step=1) - -# # add another number input for variable 2 into column 2 -# with col2: -# var_02 = st.number_input('Variable 02:', -# step=1) - -# logger.info(f'var_01 = {var_01}') -# logger.info(f'var_02 = {var_02}') - -# # add a button to use the values entered into the number field to send to the -# # prediction function via the REST API -# if st.button('Calculate Prediction', -# type='primary', -# use_container_width=True): -# results = requests.get(f'http://api:4000/c/prediction/{var_01}/{var_02}').json() -# st.dataframe(results) - \ No newline at end of file diff --git a/app/src/pages/20_Admin_Home.py b/app/src/pages/20_Admin_Home.py index 57b3fb2e9..84fd8c38d 100644 --- a/app/src/pages/20_Admin_Home.py +++ b/app/src/pages/20_Admin_Home.py @@ -9,20 +9,58 @@ SideBarLinks() - - st.title('System Admin Home Page') st.write(f"### Welcome, {st.session_state['first_name']}!") +st.write('') + +# admin_id = st.session_state.get("alumni_id", 1) + +# # try: +# # # Fetch alumni profile details +# # response = requests.get(f"{BASE_URL}/{admin_id}") +# # response.raise_for_status() +# # profile = response.json() + +# # # Display profile details +# # st.markdown(f""" +# # - **Name**: {profile['First_Name']} {profile['Last_Name']} +# # """) + +# # except requests.RequestException as e: +# # st.error(f"Failed to fetch profile: {e}") + +# try: +# # Fetch admin profile details +# response = requests.get(f"{BASE_URL}/sys/{admin_id}") +# response.raise_for_status() +# profile = response.json() + +# # Display profile details +# st.markdown(f""" +# - **Name**: {profile['First_Name']} {profile['Last_Name']} +# - **Preferred Name**: {profile.get('Preferred_Name', 'N/A')} +# """) + +# except requests.RequestException as e: +# st.error(f"Failed to fetch profile: {e}") + +st.write('') +st.write('### What would you like to do today?') + +if st.button('See Tickets', + type='primary', + use_container_width=True): + st.switch_page('pages/43_See_Tickets.py') -st.write('\n\n') +if st.button('See All Users', + type='primary', + use_container_width=True): + st.switch_page('pages/44_See_All_Users.py') -with st.expander("See Open Tickets"): - st.write(''' - Insert table with open tickets below once we have them! - ''') +if st.button('Admin Profile', + type='primary', + use_container_width=True): + st.switch_page('pages/42_Admin_Profile.py') -with st.expander("Manage Users"): - st.write(''' - Insert table with 10 recently accessed users + a search bar that lets you search all users by USER ID - ''') \ No newline at end of file +st.write('\n\n') \ No newline at end of file diff --git a/app/src/pages/31_Student_Profile.py b/app/src/pages/31_Student_Profile.py index b9a9c2c9a..e32641888 100644 --- a/app/src/pages/31_Student_Profile.py +++ b/app/src/pages/31_Student_Profile.py @@ -6,60 +6,65 @@ from modules.nav import SideBarLinks st.set_page_config(layout = 'wide') +# Todo when routes are done- wherever there is something that say TODO: do it # Show appropriate sidebar links for the role of the currently logged in user SideBarLinks() -# -# Todo when routes are done- wherever there is something that say TODO: do it -# - -BASE_URL = "http://web-api:4000" +STUDENT_ID = st.session_state.get("student_id", 1) +BASE_URL = "http://web-api:4000/st" + +try: + response = requests.get(f"{BASE_URL}/profile/{STUDENT_ID}") + response.raise_for_status() + profile = response.json() + + # Map profile fields to Streamlit inputs + profile_data = { + "First_Name": profile.get("First_Name", ""), + "Last_Name": profile.get("Last_Name", ""), + "Email": profile.get("Email", ""), + "Graduated": profile.get("Grad_Year", ""), + "Major": profile.get("Majors", ""), + "Minor": profile.get("Minors", ""), + "Description": profile.get("description", "") + } -# Fetch a specific student's profile by ID -def fetch_student_by_id(student_id): - response = requests.get(f"{BASE_URL}/s/{student_id}") - if response.status_code == 200: - return response.json() - else: - st.error(f"Error fetching student: {response.status_code}") - return None +except requests.exceptions.RequestException as e: + st.error(f"Failed to fetch profile: {e}") + profile_data = { + "First_Name": "", + "Last_Name": "", + "Email": "", + "Graduated": "", + "Major": "", + "Minor": "", + } -student_id = st.session_state.get('student_id', 1) # Default to ID 1 for testing # Fetch data from the backend -student = fetch_student_by_id(student_id) -# Initialize variables to default values +# default values student_name = "Unknown" major = "Unknown" grad_year = "N/A" gpa = 0.0 -photo_link = "./assets/profile_photo.png" # Add a default photo +photo_link = "./assets/profile_photo.png" status = 0 resumes = {} advisor_name = "Unknown" -advisor_contact = "Unknown" alumni = {} +description = "N/A" -# Fetch data from the backend -student = fetch_student_by_id(student_id) - -if student: - student_name = f"{student['First_Name']} {student['Last_Name']}" - major = (student['Majors']) - grad_year = student.get('Grad_Year', "N/A") - gpa = student.get('GPA') - - if (student.get('Cycle' == 'active')): - status = 1 - else: - status = 0 - - resumes = {"Resume": student.get('Resume_Link')} - advisor_name = student.get("Advisor Name") # TODO: Replace with actual advisor logic / access - advisor_contact = student.get("Advisor Contact") - alumni = {"Alumnus Name": "alumnus@example.com"} # TODO: Replace with alumni logic if available +if profile: + student_name = f"{profile['First_Name']} {profile['Last_Name']}" + major = (profile['Majors']) + grad_year = profile.get('Grad_Year', "N/A") + gpa = profile.get('GPA') + description = profile.get('Description') + + resumes = {"Resume": profile.get('Resume_Link')} + advisor_name = profile.get("Advisor_First_Name") + " " + profile.get("Advisor_Last_Name") else: st.error("Failed to load student profile.") @@ -109,12 +114,6 @@ def fetch_student_by_id(student_id): st.write(major + " / " + str(grad_year)) st.write("GPA: " + str(gpa)) - # Default shows up first - if (status == 0): - st.selectbox("Status", ["Looking for co-op", "Not looking for co-op"]) - else: - st.selectbox("Status", ["Not looking for co-op", "Looking for co-op"]) - # Resumes col3, col4 = st.columns([2, 3]) with col4: @@ -123,53 +122,35 @@ def fetch_student_by_id(student_id): st.markdown(f"- [{name}]({link})") st.divider() -exp_col, team_col = st.columns([3, 2]) - -# Experiences and Skills -with exp_col: - st.markdown("#### Experiences and Skills") - - # Uncomment this section - # for compets in list(skills_experiences.keys()): - # skill_container = st.container() - # st.markdown("**" + compets + "**") - # st.write(skills_experiences.get(compets)) +team_col = st.container() -# Your Team -with team_col: - st.markdown("#### Your Team") - st.markdown("##### Advisor") - st.write(advisor_name) - st.write(advisor_contact) +st.markdown("#### Your Team") +st.markdown("##### Advisor") - st.divider() +st.write(advisor_name) - st.markdown("#### Alumni") - - for alumnus in list(alumni.keys()): - st.markdown("#### " + alumnus) - st.write(alumni.get(alumnus)) +st.divider() if edit_mode: # Editable fields for editing profile - first_name = st.text_input("First Name", value=student.get('First_Name', '')) - last_name = st.text_input("Last Name", value=student.get('Last_Name', '')) - preferred_name = st.text_input("Preferred Name", value=student.get('Preferred_Name', '')) - email = st.text_input("Email", value=student.get('Email', '')) - phone_number = st.text_input("Phone Number", value=student.get('Phone_Number', '')) - gpa_value = student.get('GPA', "3.0") if student.get('GPA') else "3.0" - gpa = st.text_input("GPA", value=student.get('GPA', '')) - grad_year = st.text_input("Graduation Year", value=student.get('Grad_Year', 2024)) - description = st.text_area("Description", value=student.get('Description', '')) - resume_link = st.text_input("Resume Link", value=student.get('Resume_Link', '')) - majors = st.text_input("Majors (comma-separated)", value=", ".join(student.get('Majors', []))) - minors = st.text_input("Minors (comma-separated)", value=", ".join(student.get('Minors', []))) + first_name = st.text_input("First Name", value=profile.get('First_Name', '')) + last_name = st.text_input("Last Name", value=profile.get('Last_Name', '')) + preferred_name = st.text_input("Preferred Name", value=profile.get('Preferred_Name', '')) + email = st.text_input("Email", value=profile.get('Email', '')) + phone_number = st.text_input("Phone Number", value=profile.get('Phone_Number', '')) + gpa = st.text_input("GPA", value=profile.get('GPA', '')) + grad_year = st.text_input("Graduation Year", value=profile.get('Grad_Year', '')) + description = st.text_area("Description", value=profile.get('Description', '')) + resume_link = st.text_input("Resume Link", value=profile.get('Resume_Link', '')) + majors = st.text_input("Majors", value=profile.get('Majors', '')) + minors = st.text_input("Minors", value=profile.get('Minors', '')) # Save changes button if st.button("Save Changes"): + updated_data = { "First_Name": first_name, "Last_Name": last_name, @@ -180,12 +161,16 @@ def fetch_student_by_id(student_id): "Grad_Year": grad_year, "Description": description, "Resume_Link": resume_link, - "Majors": [major.strip() for major in majors.split(",") if major.strip()], - "Minors": [minor.strip() for minor in minors.split(",") if minor.strip()], + "Majors": majors, + "Minors": minors, } - response = requests.put(f"{BASE_URL}/s/edit_profile/{student_id}", json=updated_data) + # Send PUT request to update profile + print("Updated Data:", updated_data) + response = requests.put(f"{BASE_URL}/edit_profile/{STUDENT_ID}", json=updated_data) + print(f"{BASE_URL}/edit_profile/{STUDENT_ID}") + response.raise_for_status() + if response.status_code == 200: st.success("Profile updated successfully!") - else: - st.error(f"Failed to update profile: {response.status_code}") \ No newline at end of file + # Ensure `updated_data` is defined in the correct scope \ No newline at end of file diff --git a/app/src/pages/32_Job_Apps.py b/app/src/pages/32_Job_Apps.py index 816cb1295..8e1958137 100644 --- a/app/src/pages/32_Job_Apps.py +++ b/app/src/pages/32_Job_Apps.py @@ -85,6 +85,4 @@ st.image(selected_job["image"], use_container_width=True) st.markdown(f"**Job Title:** {selected_job['title']}") st.write(f"**Company Name:** {selected_job['company']}") - st.write(f"**Percentage Match:** {selected_job['match']}") - st.button("Click to see full breakdown") # Static button for additional breakdown functionality st.write(f"**Job Description:** {selected_job['description']}") \ No newline at end of file diff --git a/app/src/pages/32_Job_Search.py b/app/src/pages/32_Job_Search.py index 86758db54..89ecec995 100644 --- a/app/src/pages/32_Job_Search.py +++ b/app/src/pages/32_Job_Search.py @@ -134,6 +134,5 @@ def fetch_all_jobs(): st.markdown(f"**Job Title:** {selected_job['title']}") st.write(f"**Company Name:** {selected_job['company']}") st.write(f"**Percentage Match:** {selected_job['match']}") - st.button("Click to see full breakdown") # Static button for additional breakdown functionality st.write(f"**Job Description:** {selected_job['description']}") - + st.write(f"**:** {selected_job['description']}") \ No newline at end of file diff --git a/app/src/pages/40_Add_Postings.py b/app/src/pages/40_Add_Postings.py index 96cab5c14..c19d07f49 100644 --- a/app/src/pages/40_Add_Postings.py +++ b/app/src/pages/40_Add_Postings.py @@ -7,22 +7,36 @@ # Show appropriate sidebar links for the role of the currently logged-in user SideBarLinks() -BASE_URL = "http://web-api:4000" +BASE_URL = "http://web-api:4000/cp" -# Function to create a job posting def create_job_posting(job_data): - response = requests.post(f"{BASE_URL}/postings/create", json=job_data) + response = requests.post(f"{BASE_URL}/posting", json=job_data) if response.status_code == 201: st.success("Job posting created successfully!") else: - st.error(f"Failed to create job posting: {response.status_code} - {response.json().get('error', 'Unknown error')}") - -# Initialize session state for position data + try: + st.write(f"Response JSON: {response.json()}") + error_message = response.json().get('error', 'Unknown error') + except ValueError: + st.write(f"Response Text: {response.text}") + error_message = response.text + st.error(f"Failed to create job posting: {response.status_code} - {error_message}") + +# # Function to create a job posting +# def create_job_posting(job_data): +# response = requests.post(f"{BASE_URL}/posting", json=job_data) +# if response.status_code == 201: +# st.success("Job posting created successfully!") +# else: +# error_message = response.json().get('error', 'Unknown error') +# st.error(f"Failed to create job posting: {response.status_code} - {error_message}") + +# Initialize session state for job data if "position_title" not in st.session_state: st.session_state["position_title"] = "Position Name" if "required_skills" not in st.session_state: - st.session_state["required_skills"] = ["Skill 1", "Skill 2", "Skill 3"] + st.session_state["required_skills"] = [] if "description" not in st.session_state: st.session_state["description"] = "" @@ -31,7 +45,10 @@ def create_job_posting(job_data): st.session_state["pay"] = 0 if "location" not in st.session_state: - st.session_state["location"] = "City, State" + st.session_state["location"] = "City" + +if "minimum_gpa" not in st.session_state: + st.session_state["minimum_gpa"] = 3.0 # Default minimum GPA value # Header Section st.markdown("## Create Job Posting") @@ -43,18 +60,37 @@ def create_job_posting(job_data): # Title and Pay st.text_input("Position Title", key="position_title") st.number_input("Pay (in USD)", min_value=0, step=1, key="pay") -st.text_input("Location (City, State)", key="location") +st.text_input("City", key="location") + +# Minimum GPA Requirement +st.number_input( + "Minimum GPA Requirement", min_value=0.0, max_value=4.0, step=0.1, key="minimum_gpa" +) # Required Skills st.markdown("**Required Skills:**") -for skill in st.session_state["required_skills"]: - st.write(f"- {skill}") -new_skill = st.text_input("Add Required Skill +", key="new_skill_input") +# Skill with remove button +skills_to_remove = [] +for i, skill in enumerate(st.session_state["required_skills"]): + cols = st.columns([4, 1]) # Create two columns: one for skill, one for the button + cols[0].write(f"- {skill}") + if cols[1].button(f"Remove", key=f"remove_skill_{i}"): + skills_to_remove.append(skill) + +# Remove selected skills +if skills_to_remove: + for skill in skills_to_remove: + st.session_state["required_skills"].remove(skill) + st.rerun() + +# Add new skill using dynamic key +skill_input_key = f"new_skill_{len(st.session_state['required_skills'])}" # Dynamic key for text input +new_skill = st.text_input("Add Required Skill", key=skill_input_key) if st.button("Add Skill"): - if new_skill: + if new_skill: # Check if the input is not empty st.session_state["required_skills"].append(new_skill) - st.experimental_rerun() + st.rerun() # Job Description st.text_area("Job Description", value=st.session_state["description"], key="description") @@ -63,10 +99,11 @@ def create_job_posting(job_data): if st.button("Submit Job Posting"): job_data = { "title": st.session_state["position_title"], - "pay": st.session_state["pay"], + "pay": int(st.session_state["pay"]), "location": st.session_state["location"], "required_skills": st.session_state["required_skills"], "description": st.session_state["description"], + "minimum_gpa": float(st.session_state["minimum_gpa"]), # Added Minimum GPA Requirement } create_job_posting(job_data) diff --git a/app/src/pages/41_Edit_Postings.py b/app/src/pages/41_Edit_Postings.py new file mode 100644 index 000000000..9454fdfcd --- /dev/null +++ b/app/src/pages/41_Edit_Postings.py @@ -0,0 +1,69 @@ +import streamlit as st +from modules.nav import SideBarLinks + +st.set_page_config(layout="wide") + +# Sidebar navigation +SideBarLinks() + +# Sample job postings data +job_postings = [ + {"id": "#001", "job_title": "Data Analyst", "job_description": "Analyze data trends and insights", "min_gpa": "3.5", "grad_year": "2024", "college": "Engineering", "skills": "Python, SQL, Data Analysis"}, + {"id": "#002", "job_title": "HR Coordinator", "job_description": "Coordinate HR processes and hiring", "min_gpa": "3.0", "grad_year": "2023", "college": "Business", "skills": "Communication, Recruitment, Leadership"}, + {"id": "#003", "job_title": "CEO", "job_description": "Lead the organization strategically", "min_gpa": "3.7", "grad_year": "2025", "college": "Science", "skills": "Management, Strategy, Decision Making"}, + {"id": "#004", "job_title": "CFO", "job_description": "Manage corporate financials", "min_gpa": "3.8", "grad_year": "2024", "college": "Engineering", "skills": "Accounting, Finance, Leadership"}, +] + +# UI Header Section +st.markdown("## Manage Job Postings") +st.divider() + +# Display each job posting with fields defaulted to closed (unopened) +for idx, job in enumerate(job_postings): + # Each job's details are hidden by default until the user clicks to open + with st.expander(job['job_title'], expanded=False): # Default as closed + # Editable fields for each job posting + new_id = st.text_input( + "Job ID", + value=job["id"], + key=f"id_{idx}" + ) + new_description = st.text_area( + "Job Description", + value=job["job_description"], + key=f"description_{idx}" + ) + new_min_gpa = st.number_input( + "Minimum GPA Requirement", + min_value=0.0, + max_value=4.0, + step=0.1, + value=float(job["min_gpa"]), + key=f"gpa_{idx}" + ) + new_grad_year = st.selectbox( + "Graduation Year Requirement", + options=["2023", "2024", "2025", "2026"], + index=["2023", "2024", "2025", "2026"].index(job["grad_year"]), + key=f"grad_year_{idx}" + ) + new_college = st.text_input( + "College Requirement", + value=job["college"], + key=f"college_{idx}" + ) + new_skills = st.text_area( + "Skills Required (comma-separated)", + value=job["skills"], + key=f"skills_{idx}" + ) + + # Save Changes Button + if st.button("Save Changes", key=f"save_{idx}"): + job["id"] = new_id + job["job_description"] = new_description + job["min_gpa"] = str(new_min_gpa) + job["grad_year"] = new_grad_year + job["college"] = new_college + job["skills"] = new_skills + st.success(f"Changes saved for: {job['job_title']}") diff --git a/app/src/pages/41_View_Postings.py b/app/src/pages/41_View_Postings.py deleted file mode 100644 index e185b7aa6..000000000 --- a/app/src/pages/41_View_Postings.py +++ /dev/null @@ -1,114 +0,0 @@ -from modules.nav import SideBarLinks -import streamlit as st - -st.set_page_config(layout="wide") - -# Show appropriate sidebar links for the role of the currently logged in user -SideBarLinks() - -# Company details -company_logo = "https://images.pexels.com/photos/45201/kitty-cat-kitten-pet-45201.jpeg" #cat photo -company_name = "Company Name" -company_description = "Description" - -# Job positions data - generated with ChatGPT -positions = [ - { - "position_name": "Dev Intern", - "active_applications": 47, - "closed_applications": 103, - "position_views": 2042, - "filled": "NOT FILLED", - }, - { - "position_name": "Design Intern", - "active_applications": 36, - "closed_applications": 43, - "position_views": 1037, - "filled": "NOT FILLED", - }, - { - "position_name": "Business Intern", - "active_applications": 23, - "closed_applications": 121, - "position_views": 4037, - "filled": "NOT FILLED", - }, - { - "position_name": "Marketing Intern", - "active_applications": 104, - "closed_applications": 14, - "position_views": 1832, - "filled": "NOT FILLED", - }, -] - -# Header Section -st.markdown("## Career Compass") -st.divider() - -# Company Info -col1, col2 = st.columns([1, 3]) - -with col1: - st.image(company_logo, width=100) -with col2: - st.markdown(f"### {company_name}") - st.write(company_description) - -st.divider() - -# Job Positions Table Header -st.markdown( - """ - - """, - unsafe_allow_html=True, -) - -# Table Header -st.markdown( - """ -
-
Position Name
-
# Active Applications
-
# Closed Applications
-
# Position Views
-
Filled?
-
- """, - unsafe_allow_html=True, -) - -# Job Positions Table Rows -for position in positions: - st.markdown( - f""" -
-
{position['position_name']}
-
{position['active_applications']} Active Applications
-
{position['closed_applications']} Closed Applications
-
{position['position_views']} Views
-
{position['filled']}
-
- """, - unsafe_allow_html=True, - ) \ No newline at end of file diff --git a/app/src/pages/42_Admin_Profile.py b/app/src/pages/42_Admin_Profile.py new file mode 100644 index 000000000..cfb4bfeb2 --- /dev/null +++ b/app/src/pages/42_Admin_Profile.py @@ -0,0 +1,37 @@ +import streamlit as st +import logging +logger = logging.getLogger(__name__) +import requests # You can use this to make API calls in real-world apps +from modules.nav import SideBarLinks + +# Set page configuration +st.set_page_config(layout="centered", page_title="Admin Profile", page_icon="🛠️") +SideBarLinks() + +# --- Check if 'first_name' is in session state and display it --- +if 'first_name' not in st.session_state: + st.session_state['first_name'] = 'Admin' # Default value if not set + + +# Admin Profile Information NEEDS TO BE CONNECTED TO BACKEND +admin_profile = { + "ID": "123243435", + "role": "System Admin", + "last_login": "2024-12-06 09:45 AM" +} + +# --- Admin Profile Display --- +st.markdown(f"# Welcome, {st.session_state['first_name']}.") + +# Display the admin's profile in two columns +col1, col2 = st.columns([1, 1]) + +with col1: + st.subheader("Admin Information") + st.write(f"**Name**: {st.session_state['first_name']}") + st.write(f"**ID**: {admin_profile['ID']}") + st.write(f"**Role**: {admin_profile['role']}") + st.write(f"**Last Login**: {admin_profile['last_login']}") + +# --- Footer Section --- +st.markdown("---") diff --git a/app/src/pages/42_View_Applications.py b/app/src/pages/42_View_Applications.py index c3748040b..1bd4530a9 100644 --- a/app/src/pages/42_View_Applications.py +++ b/app/src/pages/42_View_Applications.py @@ -1,60 +1,100 @@ import streamlit as st -import requests from modules.nav import SideBarLinks st.set_page_config(layout="wide") -# Show appropriate sidebar links for the role of the currently logged in user +# Show appropriate sidebar links for the role of the currently logged-in user SideBarLinks() -BASE_URL = "http://web-api:4000" - -# Function to fetch applications for a job post -def fetch_applications(): - if job_id: - # real response - response = 1 - if response.status_code == 200: - return response.json() - else: - st.error(f"Error fetching applications: {response.status_code}") - return [] - -# Sample Data for Testing - chatgpt +# Sample data applications = [ - {"id": "#8675309", "job": "Data Analyst", "gpa": "3.76", "applicant_name": "John Doe"}, - {"id": "#2010178", "job": "HR", "gpa": "3.91", "applicant_name": "Jane Smith"}, - {"id": "#9238483", "job": "CEO", "gpa": "3.81", "applicant_name": "Robert Brown"}, - {"id": "#7489234", "job": "CFO", "gpa": "4.0", "applicant_name": "Emily Davis"}, + { + "id": "#8675309", + "job": "Data Analyst", + "gpa": "3.76", + "applicant_name": "John Doe", + "major": "Engineering", + "grad_year": "2024", + "college": "Engineering", + "cycle": "Summer", + "resume_link": "https://example.com/resume-john", + }, + { + "id": "#2010178", + "job": "HR", + "gpa": "3.91", + "applicant_name": "Jane Smith", + "major": "Business", + "grad_year": "2023", + "college": "Business", + "cycle": "Fall", + "resume_link": "https://example.com/resume-jane", + }, + { + "id": "#9238483", + "job": "CEO", + "gpa": "3.81", + "applicant_name": "Robert Brown", + "major": "Science", + "grad_year": "2025", + "college": "Science", + "cycle": "Spring", + "resume_link": "https://example.com/resume-robert", + }, + { + "id": "#7489234", + "job": "CFO", + "gpa": "4.0", + "applicant_name": "Emily Davis", + "major": "Engineering", + "grad_year": "2024", + "college": "Engineering", + "cycle": "Summer", + "resume_link": "https://example.com/resume-emily", + }, ] # Header Section st.markdown("## View Job Applications") st.divider() +# Initialize session state to track currently opened application +if "view_app_id" not in st.session_state: + st.session_state.view_app_id = None # No application view by default + +# Always render the application list above everything +st.markdown("### Applications") +for app in applications: + app_col1, app_col2, app_col3, app_col4 = st.columns([1, 1, 1, 2]) + with app_col1: + st.write(app["id"]) + with app_col2: + st.write(app["gpa"]) + with app_col3: + st.write(app["job"]) + with app_col4: + # When a user clicks a button, set the state to show the application details + if st.button( + f"View {app['applicant_name']}'s Application →", + key=f"view_{app['id']}" + ): + st.session_state.view_app_id = app["id"] + +# Render application details only below the application list if a specific application is clicked +if st.session_state.view_app_id: + selected_app = next( + (app for app in applications if app["id"] == st.session_state.view_app_id), None + ) + if selected_app: + st.markdown("---") + st.markdown(f"### {selected_app['applicant_name']}'s Application") + st.write(f"**Major/College:** {selected_app['college']} / {selected_app['major']}") + st.write(f"**Graduation Year:** {selected_app['grad_year']}") + st.write(f"**GPA:** {selected_app['gpa']}") + st.write(f"**Cycle:** {selected_app['cycle']}") -# Applications Table -left_col, right_col = st.columns([1.5, 3.5]) - -with left_col: - st.markdown("### Filters") - sort_option = st.selectbox("Sort By:", ["GPA"], key="sort_option") # add skills match if we have time - - # Apply sorting thanks https://pythonhow.com/how/sort-a-list-of-dictionaries-by-a-value-of-the-dictionary/ - applications.sort(key=lambda x: float(x["gpa"]), reverse=True) - -with right_col: - st.markdown("### Applications") - if not applications: - st.write("No applications found for this job.") - else: - for app in applications: - app_col1, app_col2, app_col3, app_col4 = st.columns([1, 1, 1, 2]) - with app_col1: - st.write(app["id"]) - with app_col2: - st.write(app["gpa"]) - with app_col3: - st.write(app["job"]) - with app_col4: - st.button(f"View {app['applicant_name']}'s Application →", key=f"view_{app['id']}") \ No newline at end of file + st.write(f"[View Resume]({selected_app['resume_link']})") + + # Button to close detailed view + if st.button("Close Application View"): + st.session_state.view_app_id = None diff --git a/app/src/pages/43_See_Tickets.py b/app/src/pages/43_See_Tickets.py new file mode 100644 index 000000000..d3f60d1f6 --- /dev/null +++ b/app/src/pages/43_See_Tickets.py @@ -0,0 +1,51 @@ +import streamlit as st +from modules.nav import SideBarLinks + +# Set page configuration +st.set_page_config(layout="wide", page_title="Dashboard", page_icon="👤") + +# Initialize the navigation sidebar +SideBarLinks() + +# --- Welcome Section with User Profile --- +st.markdown("## Welcome, Amber") + +# --- Open Tickets Section --- +st.markdown("### Open Tickets") + +# TICKETS NEED TO BE CONNECTED TO BACKEND +if "tickets" not in st.session_state: + st.session_state.tickets = [ + {"title": "Broken website page", "time": "Today at 11:57PM"}, + {"title": "403 error", "time": "Today at 2:32PM"}, + {"title": "Can’t see student resumés", "time": "Today at 11:15AM"}, + {"title": "Crazy thing just happened", "time": "Today at 5:47AM"}, + {"title": "New ticket example", "time": "Yesterday at 10:00PM"}, + ] + +# Display tickets as a table with clickable buttons +st.markdown("#### Click on a ticket to view details:") + +# Check if there are any tickets +if not st.session_state.tickets: + st.warning("No tickets available.") # Handle empty ticket list gracefully +else: + for ticket in st.session_state.tickets: + with st.container(): + # Use a container for each ticket row + col1, col2, col3, col4 = st.columns([4, 3, 1, 1]) # Adjusted column layout + col2.write(ticket["title"]) # Ticket title + col3.write(ticket["time"]) # Ticket timestamp + + # Button to view the ticket details + if col4.button("View", key=f"view_{ticket['title']}"): + st.info(f"You clicked on: **{ticket['title']}**") + + # Button to mark the ticket as resolved (delete it) + if col1.button("Mark as Resolved", key=f"resolved_{ticket['title']}"): + # Remove the ticket from the list in session state + st.session_state.tickets = [t for t in st.session_state.tickets if t != ticket] + st.success(f"Ticket **{ticket['title']}** has been marked as resolved and removed.") + st.rerun() # Refresh to reflect the changes + + st.divider() # Add a divider after each ticket for better separation diff --git a/app/src/pages/44_See_All_Users.py b/app/src/pages/44_See_All_Users.py new file mode 100644 index 000000000..052f53f7e --- /dev/null +++ b/app/src/pages/44_See_All_Users.py @@ -0,0 +1,98 @@ +import streamlit as st +from modules.nav import SideBarLinks + +# Set the page layout +st.set_page_config(layout="wide", page_title="Admin View", page_icon="📊") + +# Initialize the navigation sidebar +SideBarLinks() + +st.markdown("# Manage Users") + +# USER DATA NEEDS TO BE CONNECTED TO BACKEND +if "data" not in st.session_state: + st.session_state.data = [ + {"Name": "Douglass McStudent", "Role": "Co-Op Advisor"}, + {"Name": "Susan Rodriguez", "Role": "Alumni"}, + {"Name": "Jarred Wong", "Role": "Alumni"}, + {"Name": "John Doe", "Role": "Student"}, + {"Name": "Jane Smith", "Role": "Faculty"}, + ] + +# --- User Management Section --- +st.markdown("### Add New User") + +# Create a form to add a new user +with st.form(key='add_user_form'): + new_name = st.text_input("Name", placeholder="Enter the new user's name") + new_role = st.selectbox("Role", options=["Faculty", "Student", "Company", "Alumni", "Co-Op Advisor"]) + + # Submit button to add the new user + submit_button = st.form_submit_button("Add User") + + # If the form is submitted, add the new user to the session state + if submit_button: + if new_name: # Ensure the name is not empty + new_user = {"Name": new_name, "Role": new_role} + st.session_state.data.append(new_user) # Add new user to the list + st.success(f"New user **{new_name}** added successfully!") + st.rerun() # Refresh the app to show the newly added user + else: + st.error("Please enter a name for the new user.") + +# --- Filter and Sort Section --- +st.markdown("### Filter and Sort") + +col1, col2, col3 = st.columns([5, 2, 2]) + +# Search bar +with col1: + search_input = st.text_input("Search", placeholder="Type to search...") + +# Filter dropdown +with col2: + filter_option = st.selectbox( + "Filter by", + options=["All", "Faculty", "Student", "Company", "Alumni"] + ) + +# Sort dropdown +with col3: + sort_option = st.selectbox( + "Sort by", + options=["Name", "Role", "Date Added"] + ) + +# --- Display User Table --- +st.divider() # Adds a horizontal divider +st.markdown("### Users") + +# Filter the data dynamically based on the search and filter inputs +filtered_data = st.session_state.data + +if search_input: + filtered_data = [user for user in filtered_data if search_input.lower() in user["Name"].lower()] +if filter_option != "All": + filtered_data = [user for user in filtered_data if filter_option.lower() in user["Role"].lower()] + +# Display the user table dynamically +if not filtered_data: + st.warning("No users found matching the criteria.") +else: + for row in filtered_data: + with st.container(): + col1, col2, col3 = st.columns([3, 2, 1]) + # Button for the user's name + if col1.button(row["Name"], key=row["Name"]): + st.info(f"**You clicked on {row['Name']}!**") + # Display the role + col2.write(row["Role"]) + + # Add a delete button + if col3.button("Delete", key=f"delete_{row['Name']}"): + # Remove the user from the data in session state + st.session_state.data = [user for user in st.session_state.data if user != row] + st.success(f"User {row['Name']} has been deleted.") + st.rerun() # Refresh to reflect the changes + + st.divider() diff --git a/app/src/pages/45_Alumn_Profile.py b/app/src/pages/45_Alumn_Profile.py new file mode 100644 index 000000000..f1faa7d00 --- /dev/null +++ b/app/src/pages/45_Alumn_Profile.py @@ -0,0 +1,104 @@ +import streamlit as st +import requests + +# Base API URL for alumni routes +BASE_URL = "http://api:4000/a" + +st.set_page_config(layout="wide") +st.title(f"Welcome Alumni, {st.session_state.get('first_name', 'Guest')}!") + +# Sidebar navigation +if st.sidebar.button("Chat with Lily McStudent"): + st.switch_page("Chat_Lily.py") +if st.sidebar.button("Chat with Other Student"): + st.switch_page("Other_Student.py") + +# Display alumni profile +st.markdown("### Profile Details") +alumni_id = st.session_state.get("alumni_id", 1) # Replace '1' with dynamic ID for real implementation + +try: + # Fetch alumni profile details + response = requests.get(f"{BASE_URL}/{alumni_id}") + response.raise_for_status() + profile = response.json() + + # Display profile details + st.markdown(f""" + - **Name**: {profile['First_Name']} {profile['Last_Name']} + - **Email**: {profile['Email']} + - **Graduated**: {profile['Grad_Year']} + - **College**: {profile['College']} + - **Majors**: {profile['Majors']} + - **Minors**: {profile['Minors']} + """) + +except requests.RequestException as e: + st.error(f"Failed to fetch profile: {e}") + +# Buttons for profile actions +if st.button("Edit Profile Details"): + st.switch_page("pages/Alumn_Edit.py") + +if st.button("Add Co-op Experience"): + st.switch_page("pages/Add_Alumn_Experience.py") + +# Alumni Previous Positions +st.markdown("### Previous Positions") +try: + response = requests.get(f"{BASE_URL}/{alumni_id}/previous_positions") + response.raise_for_status() + positions = response.json() + + if positions["count"] > 0: + st.write("#### Previous Positions:") + for position in positions["positions"]: + st.write(f""" + - **Title**: {position['Title']} + - **Company**: {position['Company_Name']} ({position['Industry']}) + - **Duration**: {position['Date_Start']} to {position['Date_End']} + - **Pay**: ${position['Pay']} + - **Location**: {position['City']}, {position['State']}, {position['Country']} + - **Skills**: {", ".join(position['Required_Skills']) if position['Required_Skills'] else "None"} + """) + else: + st.info("No previous positions found.") +except requests.RequestException as e: + st.error(f"Failed to fetch previous positions: {e}") + +# Alumni Messages +st.markdown("### Messages") +try: + response = requests.get(f"{BASE_URL}/messages/{alumni_id}") + response.raise_for_status() + messages = response.json() + + if messages: + st.write("#### Messages:") + for message in messages: + st.write(f""" + - **From**: {message['Student_First_Name']} {message['Student_Last_Name']} + - **Message**: {message['Message']} + """) + else: + st.info("No messages found.") +except requests.RequestException as e: + st.error(f"Failed to fetch messages: {e}") + +# Send Message +st.markdown("### Send Message") +student_id = st.number_input("Enter Student ID:", min_value=1, step=1, value=1) +message = st.text_area("Message:") + +if st.button("Send Message"): + payload = { + "Student_ID": student_id, + "Alumni_ID": alumni_id, + "Message": message, + } + try: + response = requests.post(f"{BASE_URL}/messages/send", json=payload) + response.raise_for_status() + st.success("Message sent successfully!") + except requests.RequestException as e: + st.error(f"Failed to send message: {e}") diff --git a/app/src/pages/46_Alumn_Messages.py b/app/src/pages/46_Alumn_Messages.py new file mode 100644 index 000000000..e69de29bb diff --git a/app/src/pages/47_Previous_Experiences.py b/app/src/pages/47_Previous_Experiences.py new file mode 100644 index 000000000..e69de29bb diff --git a/app/src/pages/Add_Alumn_Experience.py b/app/src/pages/Add_Alumn_Experience.py new file mode 100644 index 000000000..218a8f56a --- /dev/null +++ b/app/src/pages/Add_Alumn_Experience.py @@ -0,0 +1,105 @@ +import datetime +import streamlit as st +import requests +from modules.nav import SideBarLinks + +st.set_page_config(layout='wide') + +# Sidebar navigation +SideBarLinks() + +# Base API URL +BASE_URL = "http://api:4000" + +# Function to add a position to the alumni's profile +def add_alumni_position(alumni_id, position_data): + """Make a POST request to add a position to an alumni's profile.""" + try: + st.write("Payload being sent to the backend:", position_data) + response = requests.post(f"{BASE_URL}/a/{alumni_id}/positions", json=position_data) + if response.status_code == 201: + st.success("Position added to alumni profile!") + else: + error_message = response.json().get("error", "Unknown error") + st.error(f"Failed to add position: {response.status_code} - {error_message}") + except requests.RequestException as e: + st.error(f"An error occurred: {e}") + +# Retrieve the alumni ID from session state +if "alumni_id" not in st.session_state: + st.session_state["alumni_id"] = 1 # Replace with dynamic alumni ID retrieval + +alumni_id = st.session_state["alumni_id"] + +# Initialize session state for job data +if "position_title" not in st.session_state: + st.session_state["position_title"] = "Position Title" + +if "company_name" not in st.session_state: + st.session_state["company_name"] = "Company Name" + +if "pay" not in st.session_state: + st.session_state["pay"] = 0 + +if "date_start" not in st.session_state: + st.session_state["date_start"] = None + +if "date_end" not in st.session_state: + st.session_state["date_end"] = None + +if "city" not in st.session_state: + st.session_state["city"] = "" + +if "state" not in st.session_state: + st.session_state["state"] = "" + +if "country" not in st.session_state: + st.session_state["country"] = "" + +if "description" not in st.session_state: + st.session_state["description"] = "" + +if "skills" not in st.session_state: + st.session_state["skills"] = "" + +# Header Section +st.markdown("## Add a Position to Your Profile") +st.divider() + +# Job Posting Form +st.markdown("### Position Details") + +# Input Fields +st.text_input("Position Title", key="position_title") +st.text_input("Company Name", key="company_name") +st.text_input("Industry", key="industry") # New field for industry +st.number_input("Pay (in USD)", min_value=0, step=1, key="pay") +st.date_input("Start Date", key="date_start", value=st.session_state["date_start"] or datetime.date.today()) +st.date_input("End Date (Optional)", key="date_end", value=st.session_state["date_end"]) +st.text_input("City", key="city") +st.text_input("State", key="state") +st.text_input("Country", key="country") +st.text_area("Description", key="description") +st.text_input("Required Skills (comma-separated)", key="skills") + +# Submit button +if st.button("Add to Profile"): + job_data = { + "title": st.session_state["position_title"], + "company_name": st.session_state["company_name"], + "industry": st.session_state.get("industry", ""), # Add industry + "pay": st.session_state["pay"], + "date_start": st.session_state["date_start"].strftime('%Y-%m-%d'), + "date_end": st.session_state["date_end"].strftime('%Y-%m-%d'), + "city": st.session_state["city"], + "state": st.session_state["state"], + "country": st.session_state["country"], + "description": st.session_state["description"], + "skills": st.session_state["skills"].split(",") if st.session_state["skills"] else [] + } + add_alumni_position(alumni_id, job_data) + st.switch_page("pages/Alumn_Home.py") + + +# Divider +st.divider() diff --git a/app/src/pages/Advisor_Home.py b/app/src/pages/Advisor_Home.py index 740c6608b..a9d29fffe 100644 --- a/app/src/pages/Advisor_Home.py +++ b/app/src/pages/Advisor_Home.py @@ -1,29 +1,32 @@ import logging -logger = logging.getLogger(__name__) - import streamlit as st +import pandas as pd from modules.nav import SideBarLinks -st.set_page_config(layout = 'wide') +# Set page configuration +st.set_page_config(layout='wide') -# Show appropriate sidebar links for the role of the currently logged in user +# Show appropriate sidebar links for the currently logged-in user SideBarLinks() -st.title(f"Welcome Advisor, {st.session_state['first_name']}.") -import streamlit as st -import pandas as pd +# Main Streamlit app +st.title(f"Welcome Advisor, {st.session_state.get('first_name', 'Guest')}.") +# --- Temporarily Replace API Call with Sample Data --- -# Sample data -data = { -"Name": ["Adam McStudent", "Kalina Monova", "Lily McStudent", "Anya McStudent"], -"Section": [1, 1, 1, 1], -"Applications": [300, 2, 5, 6], -"Status": ["Received offer", "Received offer", "Still Searching", "Received offer"], -} +# Sample student data (replace this with your real API response later) +sample_data = [ + {"Name": "John Doe", "Status": "Received offer", "Applications": 5, "GPA": 3.8, "CoopCycle": "Spring", "GradYear": 2024, "EligibleForCoop": True}, + {"Name": "Jane Smith", "Status": "Still Searching", "Applications": 3, "GPA": 3.5, "CoopCycle": "Fall", "GradYear": 2025, "EligibleForCoop": True}, + {"Name": "Michael Johnson", "Status": "Received offer", "Applications": 7, "GPA": 3.9, "CoopCycle": "Spring", "GradYear": 2023, "EligibleForCoop": False}, + {"Name": "Emily Davis", "Status": "Still Searching", "Applications": 2, "GPA": 3.2, "CoopCycle": "Fall", "GradYear": 2026, "EligibleForCoop": True}, + {"Name": "James Brown", "Status": "Received offer", "Applications": 6, "GPA": 3.7, "CoopCycle": "Spring", "GradYear": 2024, "EligibleForCoop": True}, +] -# Convert data to a DataFrame -df = pd.DataFrame(data) +# Create a DataFrame from the sample data +df = pd.DataFrame(sample_data) + +# --- Add Filters and Search Functionality --- # Search bar search_query = st.text_input("Search by name", value="") @@ -57,8 +60,82 @@ elif sort_by == "Applications Descending": filtered_df = filtered_df.sort_values(by="Applications", ascending=False) -# Display the filtered data +# --- Display the filtered data with clickable names --- if filtered_df.empty: st.warning("No data matches the current filters.") else: - st.table(filtered_df) \ No newline at end of file + # Add a header row for the table + col1, col2, col3 = st.columns([3, 2, 1]) + with col1: + st.markdown("### Name") + with col2: + st.markdown("### Status") + with col3: + st.markdown("### Applications") + + # Display a table with clickable student names + for index, row in filtered_df.iterrows(): + col1, col2, col3 = st.columns([3, 2, 1]) + + with col1: + # Create a button for each student's name + if st.button(row["Name"], key=row["Name"]): + # Store the clicked student's data in session_state + st.session_state["selected_student"] = row.to_dict() + st.session_state["profile_open"] = True # Set profile panel to be open + + with col2: + st.write(row["Status"]) + + with col3: + st.write(row["Applications"]) + +# --- Display the Student Profile Panel on the Right --- +if "profile_open" in st.session_state and st.session_state["profile_open"]: + student = st.session_state["selected_student"] + + # Custom CSS to position the profile panel on the right side + st.markdown( + """ + + """, unsafe_allow_html=True + ) + + # Display profile data inside the slide-over panel + st.markdown(f""" +
+

Student Profile: {student['Name']}

+

Name: {student['Name']}

+

Status: {student['Status']}

+

Applications: {student['Applications']}

+

GPA: {student['GPA']} / 4.0

+

Co-op Cycle: {student['CoopCycle']}

+

Graduation Year: {student['GradYear']}

+

Eligible for Co-op: {'Yes' if student['EligibleForCoop'] else 'No'}

+
+ """, unsafe_allow_html=True) + + # Single button to close the profile panel + if st.button("Close Profile"): + st.session_state["profile_open"] = False # Close the profile panel + del st.session_state["selected_student"] # Remove selected student data diff --git a/app/src/pages/Advisor_Profile.py b/app/src/pages/Advisor_Profile.py new file mode 100644 index 000000000..760a42dc0 --- /dev/null +++ b/app/src/pages/Advisor_Profile.py @@ -0,0 +1,38 @@ +import logging +import streamlit as st +import pandas as pd +from modules.nav import SideBarLinks + +# Set page configuration +st.set_page_config(layout='wide') + +# Show appropriate sidebar links for the currently logged-in user +SideBarLinks() + +# Main Streamlit app +st.title(f"Welcome Advisor, {st.session_state.get('first_name', 'Guest')}.") + +# Profile section +st.image("./assets/profile_photo.png", width=100) # Replace with the actual path to the sunflower image +st.markdown("

Welcome, Susan

", unsafe_allow_html=True) + +# Spacer +st.write("") + +# Recent Activity section +st.markdown("### Recent Activity") +recent_activity = [ + {"Activity": "STUDENT accepted an offer at COMPANY", "Time": "Today at 11:59PM"}, + {"Activity": "STUDENT got a co-op offer at COMPANY", "Time": "Today at 11:29PM"}, + {"Activity": "STUDENT accepted an offer at COMPANY", "Time": "Today at 10:42PM"}, + {"Activity": "STUDENT got a co-op offer at COMPANY", "Time": "Today at 9:30PM"}, +] +for activity in recent_activity: + st.markdown( + f"
" + f"{activity['Activity']}{activity['Time']}
", + unsafe_allow_html=True, + ) + +# Spacer +st.write("") diff --git a/app/src/pages/Alumn_Edit.py b/app/src/pages/Alumn_Edit.py new file mode 100644 index 000000000..a7df36dbd --- /dev/null +++ b/app/src/pages/Alumn_Edit.py @@ -0,0 +1,78 @@ +import streamlit as st +import requests +from modules.nav import SideBarLinks + +# Base URL for your API +BASE_URL = "http://api:4000" + +# Sidebar navigation +SideBarLinks() + +# Retrieve Alumni ID from session or use a fallback for testing +ALUMNI_ID = st.session_state.get("alumni_id", 1) # Replace 1 with dynamic ID retrieval in production + +# Title +st.title("Edit Alumni Profile") + +# Fetch the existing profile details +try: + response = requests.get(f"{BASE_URL}/a/{ALUMNI_ID}") + response.raise_for_status() + profile = response.json() # Parse the JSON response + + # Map profile fields to Streamlit inputs + profile_data = { + "First_Name": profile.get("First_Name", ""), + "Last_Name": profile.get("Last_Name", ""), + "Email": profile.get("Email", ""), + "Graduated": profile.get("Grad_Year", ""), + "Major": profile.get("Majors", "").split(",")[0] if profile.get("Majors") else "", + "Minor": profile.get("Minors", "").split(",")[0] if profile.get("Minors") else "", + } + +except requests.exceptions.RequestException as e: + st.error(f"Failed to fetch profile: {e}") + profile_data = { + "First_Name": "", + "Last_Name": "", + "Email": "", + "Graduated": "", + "Major": "", + "Minor": "", + } + +# Create a form for editing the profile +with st.form(key="profile_form"): + profile_data["First_Name"] = st.text_input("First Name", profile_data["First_Name"]) + profile_data["Last_Name"] = st.text_input("Last Name", profile_data["Last_Name"]) + profile_data["Email"] = st.text_input("Email", profile_data["Email"]) + profile_data["Graduated"] = st.text_input("Graduation Year", profile_data["Graduated"]) + profile_data["Major"] = st.text_input("Major", profile_data["Major"]) + profile_data["Minor"] = st.text_input("Minor", profile_data["Minor"]) + + # Submit button + if st.form_submit_button("Save Changes"): + # Prepare data for the PUT request + updated_data = { + "First_Name": profile_data["First_Name"], + "Last_Name": profile_data["Last_Name"], + "Email": profile_data["Email"], + "Grad_Year": profile_data["Graduated"], + "Majors": [profile_data["Major"]], + "Minors": [profile_data["Minor"]], + } + + try: + # Make the PUT request to update the profile + response = requests.put(f"{BASE_URL}/a/{ALUMNI_ID}", json=updated_data) + if response.status_code == 200: + st.success("Profile updated successfully!") + # Update session state with the new data + st.session_state.update(profile_data) + st.switch_page("pages/Alumn_Home.py") + + else: + st.error(f"Failed to update profile: {response.json().get('error', 'Unknown error')}") + + except requests.exceptions.RequestException as e: + st.error(f"Error updating profile: {e}") diff --git a/app/src/pages/Alumn_Home.py b/app/src/pages/Alumn_Home.py index a0221498b..f1faa7d00 100644 --- a/app/src/pages/Alumn_Home.py +++ b/app/src/pages/Alumn_Home.py @@ -1,89 +1,104 @@ -# import logging -# logger = logging.getLogger(__name__) -# import streamlit as st -# from streamlit_extras.app_logo import add_logo -# import numpy as np -# import random -# import time -# from modules.nav import SideBarLinks - -import logging - -import requests -logger = logging.getLogger(__name__) - import streamlit as st -from modules.nav import SideBarLinks - -st.set_page_config(layout = 'wide') - -SideBarLinks() import requests -import streamlit as st -# # Example Streamlit page -# st.title("Filter Postings by Location") +# Base API URL for alumni routes +BASE_URL = "http://api:4000/a" -# # Input field for location -# location = st.text_input("Enter location (city, state, or country):") +st.set_page_config(layout="wide") +st.title(f"Welcome Alumni, {st.session_state.get('first_name', 'Guest')}!") -# # Button to trigger API call -# if st.button("Search"): -# if location: -# try: -# # Make the API call -# response = requests.get( -# "http://api:4000/s/postings/by_location", -# params={"location": location}, -# ) - -# # Raise error for bad status codes -# response.raise_for_status() - -# # Parse and display the data -# data = response.json() -# st.write(f"Results for location: {location}") -# st.dataframe(data) -# except requests.RequestException as e: -# st.error(f"Error fetching data: {e}") -# else: -# st.error("Please enter a location before searching.") +# Sidebar navigation +if st.sidebar.button("Chat with Lily McStudent"): + st.switch_page("Chat_Lily.py") +if st.sidebar.button("Chat with Other Student"): + st.switch_page("Other_Student.py") +# Display alumni profile +st.markdown("### Profile Details") +alumni_id = st.session_state.get("alumni_id", 1) # Replace '1' with dynamic ID for real implementation -# st.title(f"Welcome Alumni , {st.session_state['first_name']}.") -# st.write('') -# st.write('') -# st.write('### What would you like to do today?') - -# data = {} -# try: -# data = requests.get('http://api:4000/s/get_all').json() -# except: -# st.write("**Important**: Could not connect to sample api, so using dummy data.") -# data = {"a":{"b": "123", "c": "hello"}, "z": {"b": "456", "c": "goodbye"}} - -# st.dataframe(data) +try: + # Fetch alumni profile details + response = requests.get(f"{BASE_URL}/{alumni_id}") + response.raise_for_status() + profile = response.json() + + # Display profile details + st.markdown(f""" + - **Name**: {profile['First_Name']} {profile['Last_Name']} + - **Email**: {profile['Email']} + - **Graduated**: {profile['Grad_Year']} + - **College**: {profile['College']} + - **Majors**: {profile['Majors']} + - **Minors**: {profile['Minors']} + """) -st.title(f"Welcome Alumni , {st.session_state['first_name']}.") +except requests.RequestException as e: + st.error(f"Failed to fetch profile: {e}") -# Placeholder for student ID (replace with dynamic value in real implementation) -student_id = st.session_state.get("student_id", 1) # Replace '1' with actual student ID +# Buttons for profile actions +if st.button("Edit Profile Details"): + st.switch_page("pages/Alumn_Edit.py") -st.write('') -st.write('') -st.write('### Your Applications') +if st.button("Add Co-op Experience"): + st.switch_page("pages/Add_Alumn_Experience.py") -# Fetch applications from the API +# Alumni Previous Positions +st.markdown("### Previous Positions") try: - # Make API call to fetch applications for the student - response = requests.get(f"http://api:4000/s/applications/{student_id}") - response.raise_for_status() # Raise an exception for HTTP errors - applications = response.json() + response = requests.get(f"{BASE_URL}/{alumni_id}/previous_positions") + response.raise_for_status() + positions = response.json() + + if positions["count"] > 0: + st.write("#### Previous Positions:") + for position in positions["positions"]: + st.write(f""" + - **Title**: {position['Title']} + - **Company**: {position['Company_Name']} ({position['Industry']}) + - **Duration**: {position['Date_Start']} to {position['Date_End']} + - **Pay**: ${position['Pay']} + - **Location**: {position['City']}, {position['State']}, {position['Country']} + - **Skills**: {", ".join(position['Required_Skills']) if position['Required_Skills'] else "None"} + """) + else: + st.info("No previous positions found.") +except requests.RequestException as e: + st.error(f"Failed to fetch previous positions: {e}") - # Display the applications in a table - if applications: - st.dataframe(applications) +# Alumni Messages +st.markdown("### Messages") +try: + response = requests.get(f"{BASE_URL}/messages/{alumni_id}") + response.raise_for_status() + messages = response.json() + + if messages: + st.write("#### Messages:") + for message in messages: + st.write(f""" + - **From**: {message['Student_First_Name']} {message['Student_Last_Name']} + - **Message**: {message['Message']} + """) else: - st.write("No applications found.") + st.info("No messages found.") except requests.RequestException as e: - st.error(f"Error fetching applications: {e}") \ No newline at end of file + st.error(f"Failed to fetch messages: {e}") + +# Send Message +st.markdown("### Send Message") +student_id = st.number_input("Enter Student ID:", min_value=1, step=1, value=1) +message = st.text_area("Message:") + +if st.button("Send Message"): + payload = { + "Student_ID": student_id, + "Alumni_ID": alumni_id, + "Message": message, + } + try: + response = requests.post(f"{BASE_URL}/messages/send", json=payload) + response.raise_for_status() + st.success("Message sent successfully!") + except requests.RequestException as e: + st.error(f"Failed to send message: {e}") diff --git a/app/src/pages/Chat_Lily.py b/app/src/pages/Chat_Lily.py new file mode 100644 index 000000000..34c2fb816 --- /dev/null +++ b/app/src/pages/Chat_Lily.py @@ -0,0 +1,37 @@ +import logging +logger = logging.getLogger(__name__) +import streamlit as st +from streamlit_extras.app_logo import add_logo +import random +import time +from modules.nav import SideBarLinks + +SideBarLinks() + + +# st.set_page_config(page_title="Neel & Lily Chat", page_icon="💬") +add_logo("assets/logo.png", height=400) + +st.title("Your chat with Lily McStudent") + +# Initialize chat history +if "messages" not in st.session_state: + st.session_state.messages = [ + {"role": "Lily", "content": "Hi Neel! I saw that you did a co-op at Bain Capital. Can you tell me a little bit about what your day to day was like?"}, + {"role": "Neel", "content": "Hi Lily! Yes of course I can. In my position I ... blah blah content stuff work things.... What year & co-op cycle are you?"}, + {"role": "Lily", "content": "I am a second year fall co-op. Thanks for providing that insight on your day to day. What was your relationship like with your driect supervisors? I want to be under soemone who I can learn a lot from. Was that your experience at Bain?"}, + ] + +# Display chat messages from history on app rerun +for message in st.session_state.messages: + with st.chat_message(message["role"]): + st.markdown(message["content"]) + +# React to Neel's input +if neel_message := st.chat_input("Neel: Type your message here..."): + # Display Neel's message + with st.chat_message("Neel"): + st.markdown(neel_message) + + # Add Neel's message to chat history + st.session_state.messages.append({"role": "Neel", "content": neel_message}) diff --git a/app/src/pages/Company_Home.py b/app/src/pages/Company_Home.py index 10facbcb2..613ac7735 100644 --- a/app/src/pages/Company_Home.py +++ b/app/src/pages/Company_Home.py @@ -21,7 +21,7 @@ if st.button('Edit Postings', type='primary', use_container_width=True): - st.switch_page('pages/41_View_Postings.py') + st.switch_page('pages/41_Edit_Postings.py') if st.button('View Applications', type='primary', diff --git a/app/src/pages/Make_Experience.py b/app/src/pages/Make_Experience.py new file mode 100644 index 000000000..e69de29bb diff --git a/app/src/pages/Student_Home.py b/app/src/pages/Student_Home.py index 8b3be4ba7..1ea18fec8 100644 --- a/app/src/pages/Student_Home.py +++ b/app/src/pages/Student_Home.py @@ -1,139 +1,70 @@ import streamlit as st import requests - from modules.nav import SideBarLinks -st.set_page_config(layout = 'wide') +st.set_page_config(layout='wide') -# Show appropriate sidebar links for the role of the currently logged in user +# Sidebar SideBarLinks() -# Sample Data - connect to backend - generated with ChatGPT - -cat_photo = "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/640px-Cat03.jpg" -#TODO: FIX ERROR 404 ON FETCHING JOBS -BASE_URL = "http://web-api:4000" +BASE_URL = "http://web-api:4000/st/postings" -# Function to fetch job postings from the backend -def fetch_jobs(min_pay=None): - params = {} - if min_pay is not None: - params["min_pay"] = min_pay - response = requests.get(f"{BASE_URL}/postings/by_pay", params=params) +# Data by loc +def fetch_jobs_by_location(location): + response = requests.get(f"{BASE_URL}/by_location?location={location}") if response.status_code == 200: return response.json() else: - st.error(f"Error fetching jobs: {response.status_code}") return [] -# Fetch initial job postings (default) -job_postings = fetch_jobs() - -job_postings = [ - { - "id": 1, - "title": "Software Engineer", - "company": "domp", - "description": "Develop and maintain software applications.", - }, - { - "id": 2, - "title": "Software Engineer", - "company": "blep", - "description": "glorp", - }, - { - "id": 3, - "title": "Software Engineer", - "company": "domp", - "description": "glep" - } -] - - - -# Header Section: Navbar -st.markdown( - """ - - - - - - """, - unsafe_allow_html=True, -) - -filter_col, sort_col = st.columns([2, 1]) +# Data by pay +def fetch_jobs_by_pay(min_pay): + response = requests.get(f"{BASE_URL}/by_pay?min_pay={min_pay}") + if response.status_code == 200: + return response.json() + else: + return [] -# "Filter By" -with filter_col: - st.markdown("**Filter**") - with st.expander("Filter by"): - selected_filter = st.selectbox("Choose a filter", ["Status", "Location"], key="filter_select") - - if selected_filter == "Status": - st.selectbox("Select Status", ["Pending", "Accepted", "Rejected"], key="status_filter") - - elif selected_filter == "Location": - st.selectbox("Select Location", ["City, State 1", "City, State 2"], key="location_filter") +st.title("Career Compass") +st.header("Filter Jobs") +# All jobs +all_jobs = fetch_jobs_by_pay(0) -st.divider() +# City +city_filter = st.text_input("Filter by City (press Enter):") +filtered_by_city = all_jobs +if city_filter: + filtered_by_city = fetch_jobs_by_location(city_filter) -# Get first job -if "selected_job" not in st.session_state: - st.session_state["selected_job"] = job_postings[0] +# Minimum pay +pay_filter = st.text_input("Filter by Minimum Pay:") +filtered_jobs = filtered_by_city +if pay_filter: + try: + pay_filter = float(pay_filter) + filtered_jobs = [job for job in filtered_by_city if job["Pay"] >= pay_filter] + except ValueError: + st.error("Please enter a valid pay amount.") job_col, details_col = st.columns([2, 3]) -# Job Postings with job_col: st.markdown("### Job Postings") - for job in job_postings: - if st.button(job["title"], key=job["id"]): # Each job title is a button + for job in filtered_jobs: + if st.button(job["Title"] + " | " + job["Company_Name"], key=job["ID"]): st.session_state["selected_job"] = job # Update session state with the selected job + st.rerun() -# Job Details +# Job details with details_col: - selected_job = st.session_state["selected_job"] # Get the selected job from session state - st.markdown("### Job Details") - st.markdown(f"**Job Title:** {selected_job['title']}") - st.write(f"**Company Name:** {selected_job['company']}") - st.write(f"**Job Description:** {selected_job['description']}") - + selected_job = st.session_state.get("selected_job", {}) + if selected_job: + st.markdown("### Job Details") + st.markdown(f"**Job Title:** {selected_job.get('Title', 'N/A')}") + st.write(f"**Company Name:** {selected_job.get('Company_Name', 'N/A')}") + st.write(f"**Job Description:** {selected_job.get('Description', 'N/A')}") + st.write(f"**City:** {selected_job.get('City', 'N/A')}") + st.write(f"**Pay:** ${selected_job.get('Pay', 'N/A')}") + else: + st.markdown("### Select a Job to View Details") \ No newline at end of file diff --git a/database-files/Career_Compass_Database.sql b/database-files/Career_Compass_Database.sql index ddb899eb0..50d1d13bb 100644 --- a/database-files/Career_Compass_Database.sql +++ b/database-files/Career_Compass_Database.sql @@ -248,1795 +248,54 @@ CREATE TABLE Message FOREIGN KEY (Alumni_ID) REFERENCES Alumni (ID) ); - - - -- Insert Statements - - -- Skill Insert -INSERT INTO Skill (Name, Description, Industry) -VALUES -('Python', 'Programming language used for data science, web development, and AI.', 'Technology'), -('Leadership', 'Ability to guide, influence, and inspire teams to achieve goals.', 'Management'), -('Data Analysis', 'Process of inspecting, cleaning, and interpreting data.', 'Data Science'), -('Machine Learning', 'Application of algorithms to create systems that learn and adapt.', 'Artificial Intelligence'), -('Marketing Strategy', 'Planning and executing marketing campaigns to achieve business objectives.', 'Marketing'), -('Project Management', 'Planning, organizing, and managing resources to complete specific goals.', 'Management'), -('SEO', 'Optimizing websites to rank higher in search engine results.', 'Digital Marketing'), -('Digital Marketing', 'Promoting products or services through online channels.', 'Marketing'), -('Web Development', 'Building and maintaining websites.', 'Software Development'), -('Public Speaking', 'Delivering speeches and presentations effectively.', 'Communication'), -('Negotiation', 'Reaching mutually beneficial agreements in professional settings.', 'Business'), -('Graphic Design', 'Creating visual content using tools like Photoshop and Illustrator.', 'Design'), -('UX Design', 'Designing user-friendly interfaces and experiences.', 'Design'), -('Content Writing', 'Creating written content for websites, blogs, and other mediums.', 'Media'), -('Customer Service', 'Providing support and resolving issues for customers.', 'Retail'), -('Social Media Marketing', 'Promoting brands using social media platforms.', 'Marketing'), -('Financial Analysis', 'Analyzing financial data to support business decisions.', 'Finance'), -('Time Management', 'Organizing time effectively to meet deadlines.', 'Productivity'), -('Team Management', 'Coordinating and leading teams to achieve objectives.', 'Management'), -('Entrepreneurship', 'Developing and managing business ventures.', 'Business'), -('Event Planning', 'Organizing and coordinating events.', 'Hospitality'), -('Programming', 'Writing code in various languages like Java, C++, and Python.', 'Technology'), -('Data Visualization', 'Representing data in graphical formats for analysis.', 'Data Science'), -('Cloud Computing', 'Using cloud-based services for data storage and processing.', 'Technology'), -('Cybersecurity', 'Protecting systems and networks from cyber threats.', 'Technology'), -('Research', 'Investigating and analyzing to discover new information.', 'Academia'), -('Presentation Skills', 'Delivering engaging and effective presentations.', 'Communication'), -('Operations Management', 'Overseeing and improving business operations.', 'Management'), -('Artificial Intelligence', 'Creating systems that mimic human intelligence.', 'Technology'), -('Salesforce', 'Using CRM tools for managing customer relationships.', 'Business'), -('Public Relations', 'Managing the public image of organizations.', 'Media'), -('Supply Chain Management', 'Overseeing the flow of goods and services.', 'Logistics'), -('Branding', 'Developing a strong and consistent brand identity.', 'Marketing'), -('Mobile Development', 'Creating applications for mobile devices.', 'Technology'), -('Financial Reporting', 'Preparing and analyzing financial statements.', 'Finance'), -('SQL', 'Using structured query language for database management.', 'Technology'), -('Python for Data Science', 'Specialized Python skills for analyzing large datasets.', 'Data Science'), -('Email Marketing', 'Engaging customers through targeted email campaigns.', 'Marketing'), -('Human Resources', 'Managing employee relations and organizational development.', 'HR'), -('Statistics', 'Analyzing data and trends using mathematical principles.', 'Data Science'), -('Strategic Planning', 'Developing strategies to achieve long-term goals.', 'Business'), -('Biotechnology', 'Using biological processes for industrial purposes.', 'Healthcare'), -('Game Development', 'Designing and creating video games.', 'Entertainment'), -('Physics Simulations', 'Creating simulations to study physical systems.', 'Academia'), -('Engineering Design', 'Designing systems and processes in engineering.', 'Engineering'), -('Mathematics', 'Applying mathematical theories to solve problems.', 'Academia'), -('Customer Relationship Management', 'Building strong relationships with customers.', 'Sales'), -('Business Development', 'Identifying opportunities to grow businesses.', 'Business'), -('Digital Transformation', 'Adopting digital technology to improve business processes.', 'Technology'), -('JavaScript', 'Programming language for interactive web applications.', 'Technology'), -('Linux Administration', 'Managing Linux-based operating systems.', 'IT'), -('Cloud Architecture', 'Designing cloud solutions and infrastructures.', 'Technology'), -('Blockchain', 'Using distributed ledger technologies for secure transactions.', 'Finance'), -('Machine Learning Operations', 'Operationalizing machine learning models in production.', 'Technology'), -('Video Editing', 'Creating and editing video content.', 'Media'), -('Product Management', 'Managing the development and lifecycle of products.', 'Business'), -('Embedded Systems', 'Programming hardware-level applications.', 'Engineering'), -('Renewable Energy', 'Developing sustainable energy solutions.', 'Energy'); - - --- System_Admin Insert Statements -INSERT INTO System_Admin (First_Name, Last_Name, Preferred_Name) -VALUES -('John', 'Doe', 'Johnny'), -('Jane', 'Smith', 'Janie'), -('Michael', 'Johnson', 'Mike'), -('Emily', 'Brown', 'Em'), -('Chris', 'Evans', 'Chrisy'), -('Anna', 'Taylor', 'Annie'), -('David', 'Wilson', 'Dave'), -('Sarah', 'Moore', 'Sarah'), -('Daniel', 'Anderson', 'Dan'), -('Laura', 'White', 'Laurie'), -('James', 'Harris', 'Jim'), -('Olivia', 'Martin', 'Liv'), -('Robert', 'Thompson', 'Rob'), -('Sophia', 'Garcia', 'Soph'), -('William', 'Martinez', 'Will'), -('Isabella', 'Rodriguez', 'Bella'), -('Benjamin', 'Lee', 'Ben'), -('Mia', 'Perez', 'Mimi'), -('Charles', 'Clark', 'Charlie'), -('Charlotte', 'Lewis', 'Charlie'), -('Joseph', 'Walker', 'Joe'), -('Amelia', 'Young', 'Amy'), -('Thomas', 'Allen', 'Tom'), -('Harper', 'King', 'Harpy'), -('Henry', 'Wright', 'Hank'), -('Evelyn', 'Scott', 'Evy'), -('Alexander', 'Hill', 'Alex'), -('Abigail', 'Green', 'Abby'), -('Jackson', 'Adams', 'Jack'), -('Emily', 'Baker', 'Emmy'), -('Lucas', 'Nelson', 'Luke'), -('Grace', 'Carter', 'Gracie'), -('Matthew', 'Mitchell', 'Matt'), -('Chloe', 'Perez', 'Chloe'), -('Sebastian', 'Roberts', 'Seb'), -('Victoria', 'Turner', 'Vicky'), -('Owen', 'Phillips', 'Oweny'), -('Ella', 'Campbell', 'Ellie'), -('Jacob', 'Parker', 'Jake'), -('Scarlett', 'Evans', 'Scar'), -('Jack', 'Edwards', 'Jacky'), -('Madison', 'Collins', 'Maddie'), -('Liam', 'Stewart', 'Liam'), -('Zoey', 'Sanchez', 'Zoe'), -('Aiden', 'Morris', 'Aid'), -('Hannah', 'Rogers', 'Hanny'), -('Ethan', 'Reed', 'Ethan'), -('Lily', 'Cook', 'Lil'), -('Noah', 'Morgan', 'Noah'), -('Emily', 'Bailey', 'Emy'); - - - -- Company Insert Statements -INSERT INTO Company (Name, Industry, Description) -VALUES -('Tech Innovators', 'Software Engineer', 'A leading technology firm focused on developing innovative AI-driven solutions for businesses, governments, and educational institutions.'), -('Green Future Inc.', 'Renewable Energy Expert', 'Dedicated to creating sustainable energy solutions, including solar farms and wind energy, to help reduce carbon emissions globally.'), -('Urban Creators Co.', 'Architect', 'Specializing in modern, eco-friendly urban designs, focusing on maximizing space while maintaining environmental sustainability.'), -('Health First LLC', 'Medical Researcher', 'A cutting-edge medical research organization working on innovative treatments for chronic diseases and advancing telemedicine technologies.'), -('EduTrackers Inc.', 'Data Scientist', 'A leader in education technology, creating tools for tracking student performance and personalizing learning experiences through AI.'), -('BuildIt Ltd.', 'Construction Manager', 'An innovative construction company with a mission to design and build sustainable, resilient infrastructure for smart cities.'), -('NextGen AI', 'AI Specialist', 'A trailblazer in artificial intelligence, offering machine learning tools and services that empower industries to automate complex tasks.'), -('Marketing Masters', 'Digital Marketer', 'An agency that crafts unique digital marketing strategies using big data and analytics to drive customer engagement and growth.'), -('CodeCrafts LLC', 'Backend Developer', 'Building robust and scalable backend systems for applications in finance, healthcare, and e-commerce industries.'), -('Global Connect', 'Business Consultant', 'Connecting businesses across borders with strategic insights, market research, and operational optimization.'), -('DesignWorks Studio', 'Graphic Designer', 'Creating visually stunning brand identities, marketing materials, and web designs for companies in diverse sectors.'), -('MediCare Plus', 'Healthcare Admin', 'Providing advanced patient management systems and streamlining healthcare operations with innovative IT solutions.'), -('RenewEnergy Corp.', 'Solar Engineer', 'Pioneering solar power technology to create affordable and efficient energy solutions for residential and commercial use.'), -('AgriTech Solutions', 'Agricultural Engineer', 'Innovating the agriculture sector with smart irrigation, precision farming, and advanced crop monitoring systems.'), -('FinWise LLC', 'Financial Analyst', 'Helping businesses make informed financial decisions through comprehensive data-driven analysis and strategic planning.'), -('EcoBuilders Co.', 'Eco Consultant', 'Providing consultancy on sustainable building practices and green certifications to reduce environmental footprints.'), -('TranspoNet', 'Logistics Specialist', 'Optimizing global supply chains by integrating AI and IoT solutions for better efficiency and transparency.'), -('CleanWater Initiative', 'Environmental Specialist', 'Committed to providing clean water access to underserved communities using sustainable water purification technologies.'), -('Edutech World', 'Instructional Designer', 'Developing innovative e-learning platforms and tools to revolutionize education for all age groups.'), -('Innovatech Labs', 'Data Engineer', 'Designing large-scale data pipelines and implementing data warehouse solutions for multinational corporations.'), -('FutureFoods Inc.', 'Food Scientist', 'Advancing the food industry by creating sustainable and nutrient-rich food alternatives to address global food security.'), -('SmartHome Ltd.', 'IoT Specialist', 'Transforming homes with smart IoT devices that enhance security, energy efficiency, and everyday convenience.'), -('GreenLeaf Solutions', 'Sustainability Expert', 'Helping organizations implement eco-friendly practices to meet their sustainability goals and reduce waste.'), -('LegalTech LLC', 'Legal Consultant', 'Empowering law firms with AI tools for contract analysis, case prediction, and streamlined legal workflows.'), -('HealthTrackers Co.', 'Healthcare Analyst', 'Specializing in predictive analytics to improve patient outcomes and streamline hospital operations.'), -('FinanceWorks', 'Accountant', 'Providing financial planning, auditing, and tax advisory services tailored for small and medium enterprises.'), -('CodeBuddies', 'Frontend Developer', 'Creating responsive and visually appealing front-end designs for web and mobile applications across industries.'), -('Creative Minds', 'UX Designer', 'Delivering user-centric design solutions that enhance digital experiences and drive customer satisfaction.'), -('SecureTech', 'Cybersecurity Analyst', 'Providing state-of-the-art cybersecurity services to protect businesses from ever-evolving digital threats.'), -('MediaWorks', 'Media Consultant', 'Helping brands navigate the digital media landscape with strategic campaigns and content development.'), -('SocializeNow', 'Social Media Manager', 'Creating data-driven social media campaigns to increase brand visibility and engage target audiences.'), -('FastTrack Logistics', 'Transport Manager', 'Offering seamless shipping and transportation services by leveraging advanced route optimization technologies.'), -('SolarWise', 'Renewable Energy Consultant', 'Promoting clean energy solutions by designing and implementing large-scale solar power projects worldwide.'), -('GreenZone', 'Environmental Planner', 'Focused on developing urban green spaces and sustainable city planning for healthier communities.'), -('SmartNet', 'Network Engineer', 'Designing and maintaining reliable, high-speed network infrastructures for corporate and public sectors.'), -('BrightFuture', 'Teacher', 'Innovating classroom education with interactive and personalized teaching methods to inspire future generations.'), -('AppWorks', 'Mobile Developer', 'Developing user-friendly mobile applications that cater to a variety of needs, from fitness tracking to e-commerce.'), -('TravelSmart', 'Tourism Specialist', 'Crafting personalized travel experiences that combine adventure with sustainability for global explorers.'), -('DataDynamics', 'Data Analyst', 'Helping organizations uncover actionable insights from big data through advanced visualization and analytics tools.'), -('RetailBoost', 'Merchandiser', 'Assisting retailers in optimizing inventory and boosting sales with tailored merchandising strategies.'), -('PowerGrid Corp.', 'Electrical Engineer', 'Enhancing energy distribution systems with smart grid technologies for a more reliable power supply.'), -('NextStep', 'Career Coach', 'Providing career guidance and professional development resources to help individuals achieve their goals.'), -('HealthConnect', 'Health IT Specialist', 'Developing health IT solutions to improve communication and data management in healthcare systems.'), -('FarmTech', 'Agricultural Technician', 'Revolutionizing agriculture with drone technology and automated machinery for efficient farming.'), -('CodeSavvy', 'Software Tester', 'Ensuring software quality through rigorous testing and debugging processes to deliver reliable applications.'), -('Innovative Labs', 'Research Scientist', 'Driving groundbreaking scientific discoveries in pharmaceuticals, AI, and renewable energy sectors.'), -('BrightEnergy Co.', 'Renewable Energy Analyst', 'Leading the way in renewable energy adoption by analyzing and implementing solar and wind energy solutions.'), -('HomeCare Inc.', 'Care Specialist', 'Providing compassionate home care services for elderly and disabled individuals to improve their quality of life.'), -('NetSecure', 'Cybersecurity Consultant', 'Protecting businesses from cyber threats with cutting-edge security solutions and risk management strategies.'); - - -- College Insert Statements -INSERT INTO College (Name) -VALUES -('Harvard University'), -('Stanford University'), -('Massachusetts Institute of Technology'), -('University of California, Berkeley'), -('California Institute of Technology'), -('University of Chicago'), -('Columbia University'), -('Princeton University'), -('Yale University'), -('Cornell University'), -('University of Pennsylvania'), -('Duke University'), -('Johns Hopkins University'), -('University of Michigan, Ann Arbor'), -('Northwestern University'), -('University of California, Los Angeles (UCLA)'), -('University of Virginia'), -('New York University (NYU)'), -('University of Texas at Austin'), -('University of Washington'), -('Carnegie Mellon University'), -('University of Southern California'), -('University of North Carolina, Chapel Hill'), -('Georgia Institute of Technology'), -('Brown University'), -('Vanderbilt University'), -('Rice University'), -('University of Florida'), -('University of Wisconsin, Madison'), -('University of Illinois at Urbana-Champaign'), -('University of Minnesota, Twin Cities'), -('Pennsylvania State University'), -('University of Maryland, College Park'), -('University of California, San Diego'), -('Boston University'), -('University of Rochester'), -('Purdue University'), -('Michigan State University'), -('Indiana University, Bloomington'), -('University of Arizona'), -('University of Colorado, Boulder'), -('University of California, Irvine'), -('University of California, Davis'), -('University of Massachusetts, Amherst'), -('University of Georgia'), -('Florida State University'), -('University of Miami'), -('Ohio State University'), -('Arizona State University'), -('Alabama'); - - - -- FieldOFStudy Insert Statements -INSERT INTO FieldOfStudy (Name, Description) -VALUES -('Computer Science', 'Study of computation, algorithms, and systems.'), -('Mathematics', 'Study of numbers, quantities, and shapes.'), -('Business Administration', 'Management of businesses and organizations.'), -('Economics', 'Study of production, distribution, and consumption of goods.'), -('Psychology', 'Study of the human mind and behavior.'), -('Biology', 'Study of living organisms.'), -('Chemistry', 'Study of matter and its interactions.'), -('Physics', 'Study of matter, energy, and forces.'), -('Political Science', 'Study of political systems and behavior.'), -('Sociology', 'Study of social behavior and societies.'), -('Philosophy', 'Study of knowledge, reality, and existence.'), -('English Literature', 'Study of written works in the English language.'), -('History', 'Study of past events and their impact.'), -('Art History', 'Study of art and its historical development.'), -('Anthropology', 'Study of human societies and cultures.'), -('Linguistics', 'Study of language and its structure.'), -('Environmental Science', 'Study of the environment and its protection.'), -('Data Science', 'Study of extracting knowledge from data.'), -('Cybersecurity', 'Study of protecting computer systems and networks.'), -('Marketing', 'Study of promoting and selling products or services.'), -('Accounting', 'Study of financial transactions and reporting.'), -('Finance', 'Study of managing money and investments.'), -('Public Relations', 'Study of managing public image and communication.'), -('Graphic Design', 'Study of creating visual content.'), -('International Relations', 'Study of political and economic relations between countries.'), -('Journalism', 'Study of collecting, writing, and reporting news.'), -('Health Sciences', 'Study of health and healthcare systems.'), -('Education', 'Study of teaching and learning processes.'), -('Pre-Medicine', 'Preparation for medical school.'), -('Pre-Law', 'Preparation for law school.'), -('Theater Arts', 'Study of acting, directing, and theater production.'), -('Music', 'Study of musical theory and practice.'), -('Neuroscience', 'Study of the nervous system.'), -('Film Studies', 'Study of cinema and its production.'), -('Sports Management', 'Study of managing sports organizations.'), -('Criminal Justice', 'Study of law enforcement and criminal behavior.'), -('Urban Planning', 'Study of designing and managing urban areas.'), -('Public Policy', 'Study of creating and evaluating government policies.'), -('Sustainability Studies', 'Study of sustainable practices and development.'), -('Environmental Engineering', 'Engineering solutions to environmental challenges.'), -('Agricultural Science', 'Study of farming and food production.'), -('Biomedical Engineering', 'Application of engineering principles to healthcare.'), -('Mechanical Engineering', 'Study of machines and mechanical systems.'), -('Civil Engineering', 'Study of infrastructure and construction.'), -('Electrical Engineering', 'Study of electrical systems and circuits.'), -('Chemical Engineering', 'Study of chemical processes in manufacturing.'), -('Hospitality Management', 'Study of managing hotels and tourism.'), -('Supply Chain Management', 'Study of managing supply chains.'), -('Game Design', 'Study of creating video games.'), -('Artificial Intelligence', 'Study of intelligent systems and algorithms.'); - -INSERT INTO Advisor (First_Name, Last_Name, Preferred_Name, College_ID) -VALUES -('Emily', 'Brown', 'Em', 1), -('Chris', 'Evans', 'CE', 2), -('Anna', 'White', NULL, 3), -('David', 'Wilson', 'Dave', 4), -('Sarah', 'Moore', 'Sarah', 5), -('Michael', 'Johnson', 'Mike', 6), -('Laura', 'Taylor', 'Laurie', 7), -('James', 'Harris', 'Jim', 8), -('Sophia', 'Martinez', 'Soph', 9), -('William', 'Garcia', 'Will', 10), -('Isabella', 'Rodriguez', 'Bella', 11), -('Benjamin', 'Lee', 'Ben', 12), -('Charlotte', 'Clark', 'Charlie', 13), -('Joseph', 'Walker', 'Joe', 14), -('Amelia', 'Young', 'Amy', 15), -('Henry', 'Allen', 'Hank', 16), -('Evelyn', 'King', 'Evy', 17), -('Alexander', 'Wright', 'Alex', 18), -('Abigail', 'Scott', 'Abby', 19), -('Jackson', 'Hill', 'Jack', 20), -('Emily', 'Green', 'Emmy', 21), -('Lucas', 'Adams', 'Luke', 22), -('Grace', 'Baker', 'Gracie', 23), -('Matthew', 'Nelson', 'Matt', 24), -('Chloe', 'Carter', 'Chloe', 25), -('Sebastian', 'Mitchell', 'Seb', 26), -('Victoria', 'Perez', 'Vicky', 27), -('Owen', 'Roberts', 'Oweny', 28), -('Ella', 'Turner', 'Ellie', 29), -('Jacob', 'Phillips', 'Jake', 30), -('Scarlett', 'Campbell', 'Scar', 31), -('Jack', 'Parker', 'Jacky', 32), -('Madison', 'Collins', 'Maddie', 33), -('Liam', 'Stewart', 'Liam', 34), -('Zoey', 'Sanchez', 'Zoe', 35), -('Aiden', 'Morris', 'Aid', 36), -('Hannah', 'Rogers', 'Hanny', 37), -('Ethan', 'Reed', 'Ethan', 38), -('Lily', 'Cook', 'Lil', 39), -('Noah', 'Morgan', 'Noah', 40), -('Emily', 'Bailey', 'Emy', 41), -('Olivia', 'Cruz', 'Liv', 42), -('Daniel', 'Rivera', 'Dan', 43), -('Zoe', 'Torres', 'Zozo', 44), -('Mason', 'Gomez', 'Mace', 45), -('Sophia', 'Diaz', 'Sophy', 46), -('James', 'Ramirez', 'Jimbo', 47), -('Mia', 'Hernandez', 'Mimi', 48), -('Alexander', 'Flores', 'Alex', 49), -('Emma', 'Nguyen', 'Em', 50); - - --- Alumni Insert Statements -INSERT INTO Alumni (Grad_Year, First_Name, Last_Name, Email, College_ID) -VALUES -(2001, 'Emma', 'Walsh', 'emma.walsh@gmail.com', 16), -(2014, 'Kimberly', 'Chung', 'kimberly.chung@data.com', 43), -(2020, 'Michelle', 'Johnson', 'michelle.johnson@pm.com', 21), -(2014, 'Debra', 'Wilson', 'debra.wilson@pm.com', 14), -(2000, 'Jennifer', 'Farrell', 'jennifer.farrell@marketing.com', 30), -(2013, 'William', 'Freeman', 'william.freeman@finance.com', 20), -(2010, 'Gary', 'Bryant', 'gary.bryant@hr.com', 36), -(2020, 'Terri', 'Coleman', 'terri.coleman@design.com', 37), -(1993, 'Melissa', 'Lee', 'melissa.lee@web.com', 16), -(2013, 'Jennifer', 'Hernandez', 'jennifer.hernandez@ai.com', 40), -(2004, 'Seth', 'Stout', 'seth.stout@it.com', 13), -(1992, 'Patrick', 'Johns', 'patrick.johns@edu.com', 50), -(2023, 'Gail', 'Murphy', 'gail.murphy@tech.com', 3), -(1993, 'Cynthia', 'Fritz', 'cynthia.fritz@bio.com', 2), -(1998, 'Nancy', 'Lane', 'nancy.lane@finance.com', 35), -(1999, 'Lisa', 'Williams', 'lisa.williams@edu.com', 3), -(2008, 'Jason', 'Smith', 'jason.smith@cs.com', 36), -(2016, 'Shawn', 'Garcia', 'shawn.garcia@marketing.com', 43), -(2018, 'Angela', 'Nichols', 'angela.nichols@design.com', 40), -(2012, 'William', 'Ochoa', 'william.ochoa@edu.com', 19), -(2010, 'Scott', 'Turner', 'scott.turner@tech.com', 10), -(2010, 'Jennifer', 'Quinn', 'jennifer.quinn@bio.com', 48), -(2012, 'Timothy', 'Huffman', 'timothy.huffman@cs.com', 32), -(1998, 'Melinda', 'Payne', 'melinda.payne@edu.com', 39), -(1997, 'John', 'Barnett', 'john.barnett@tech.com', 3), -(2023, 'Daniel', 'Velez', 'daniel.velez@marketing.com', 25), -(2003, 'Danielle', 'Reid', 'danielle.reid@design.com', 46), -(1994, 'Lynn', 'Hoffman', 'lynn.hoffman@bio.com', 17), -(2010, 'Marie', 'Foster', 'marie.foster@cs.com', 42), -(2006, 'Johnathan', 'Lam', 'johnathan.lam@web.com', 33), -(2001, 'Damon', 'Hines', 'damon.hines@tech.com', 37), -(1999, 'Katherine', 'Bell', 'katherine.bell@design.com', 31), -(2016, 'Mary', 'Keller', 'mary.keller@finance.com', 23), -(1998, 'Denise', 'Smith', 'denise.smith@edu.com', 28), -(2009, 'Andrew', 'Ferrell', 'andrew.ferrell@bio.com', 31), -(1993, 'Christie', 'Hernandez', 'christie.hernandez@tech.com', 48), -(2021, 'Christopher', 'Hunter', 'christopher.hunter@cs.com', 39), -(2012, 'Sara', 'Hall', 'sara.hall@edu.com', 7), -(2007, 'Stephanie', 'Daniels', 'stephanie.daniels@ai.com', 38), -(1999, 'Matthew', 'Bullock', 'matthew.bullock@marketing.com', 10), -(1993, 'Bailey', 'Scott', 'bailey.scott@design.com', 31), -(2021, 'Megan', 'Chang', 'megan.chang@bio.com', 8), -(1998, 'Danny', 'Hernandez', 'danny.hernandez@cs.com', 5), -(2017, 'Samantha', 'Meza', 'samantha.meza@web.com', 34), -(2017, 'Penny', 'Martinez', 'penny.martinez@finance.com', 15), -(2023, 'Ann', 'Beck', 'ann.beck@edu.com', 8), -(1993, 'Christopher', 'Kennedy', 'christopher.kennedy@tech.com', 15), -(2001, 'Lauren', 'Rodgers', 'lauren.rodgers@design.com', 8), -(1996, 'Angela', 'Ross', 'angela.ross@bio.com', 12), -(1996, 'Alex', 'Price', 'alex.price@cs.com', 8), -(2003, 'Crystal', 'Vargas', 'crystal.vargas@ai.com', 43), -(2020, 'Adam', 'Yang', 'adam.yang@finance.com', 23), -(2013, 'William', 'Hanson', 'william.hanson@edu.com', 23), -(2024, 'Emily', 'Williams', 'emily.williams@tech.com', 3), -(2000, 'Sara', 'Sutton', 'sara.sutton@design.com', 6), -(1990, 'Brandi', 'Williams', 'brandi.williams@bio.com', 47), -(1992, 'Joshua', 'Lewis', 'joshua.lewis@cs.com', 31), -(1996, 'Rebecca', 'Drake', 'rebecca.drake@web.com', 8), -(1992, 'Valerie', 'Dunn', 'valerie.dunn@edu.com', 34), -(2017, 'Lori', 'Moran', 'lori.moran@ai.com', 26); - --- Alumni Major Entries -INSERT INTO Alumni_Majors (Alumni_ID, FieldOfStudy_ID) VALUES -(1, 1), (1, 15), -(2, 3), -(3, 7), (3, 12), -(4, 2), -(5, 8), (5, 22), -(6, 4), -(7, 9), -(8, 5), (8, 18), -(9, 10), -(10, 6), -(11, 11), (11, 25), -(12, 13), -(13, 14), (13, 28), -(14, 16), -(15, 17), (15, 30), -(16, 19), -(17, 20), -(18, 21), (18, 35), -(19, 23), -(20, 24), -(21, 26), -(22, 27), (22, 38), -(23, 29), -(24, 31), -(25, 32), (25, 40), -(26, 33), -(27, 34), -(28, 36), -(29, 37), (29, 42), -(30, 39), -(31, 1), -(32, 3), (32, 15), -(33, 5), -(34, 7), -(35, 9), (35, 22), -(36, 11), -(37, 13), (37, 25), -(38, 2), -(39, 4), -(40, 6), (40, 28), -(41, 8), -(42, 10), -(43, 12), (43, 30), -(44, 14), -(45, 16), -(46, 18), (46, 33), -(47, 20), -(48, 24), (48, 35), -(49, 26), -(50, 28); - --- Alumni Minor Entries -INSERT INTO Alumni_Minors (Alumni_ID, FieldOfStudy_ID) VALUES -(1, 2), -(2, 4), (2, 16), -(3, 6), -(4, 8), (4, 20), -(5, 10), -(6, 12), (6, 24), -(7, 14), -(8, 1), -(9, 3), (9, 27), -(10, 5), -(11, 7), -(12, 9), (12, 30), -(13, 11), -(14, 13), -(15, 15), (15, 33), -(16, 17), -(17, 19), (17, 36), -(18, 21), -(19, 23), (19, 39), -(20, 25), -(21, 28), -(22, 31), -(23, 34), (23, 43), -(24, 37), -(25, 40), -(26, 44), (26, 45), -(27, 46), -(28, 47), (28, 48), -(29, 49), -(30, 50), -(31, 2), -(32, 4), -(33, 6), (33, 17), -(34, 8), -(35, 10), (35, 19), -(36, 12), -(37, 14), -(38, 16), (38, 21), -(39, 18), -(40, 20), -(41, 22), (41, 23), -(42, 24), -(43, 26), -(44, 28), (44, 25), -(45, 30), -(46, 32), -(47, 34), (47, 27), -(48, 36), -(49, 38), (49, 29), -(50, 40); - - - -- Posting_Location Insert Statements -INSERT INTO Posting_Location (Region, State, Zip_Code, Address_Number, Street, City, Country) -VALUES -('Northeast', 'Massachusetts', '02139', 123, 'Main St', 'Cambridge', 'USA'), -('West Coast', 'California', '94016', 456, 'Market St', 'San Francisco', 'USA'), -('Midwest', 'Illinois', '60601', 789, 'Lake Shore Dr', 'Chicago', 'USA'), -('South', 'Texas', '75201', 234, 'Elm St', 'Dallas', 'USA'), -('Mountain', 'Colorado', '80202', 890, 'Pine St', 'Denver', 'USA'), -('Northeast', 'New York', '10001', 678, 'Broadway', 'New York City', 'USA'), -('West Coast', 'Washington', '98101', 345, '1st Ave', 'Seattle', 'USA'), -('Southeast', 'Florida', '33101', 910, 'Ocean Dr', 'Miami', 'USA'), -('South', 'Georgia', '30301', 567, 'Peachtree St', 'Atlanta', 'USA'), -('Southwest', 'Arizona', '85001', 432, 'Grand Ave', 'Phoenix', 'USA'), -('Midwest', 'Michigan', '48201', 876, 'Woodward Ave', 'Detroit', 'USA'), -('West Coast', 'Oregon', '97201', 321, 'Burnside St', 'Portland', 'USA'), -('Northeast', 'Pennsylvania', '19101', 654, 'Market St', 'Philadelphia', 'USA'), -('West Coast', 'California', '94101', 987, 'Van Ness Ave', 'San Francisco', 'USA'), -('Southeast', 'North Carolina', '27601', 135, 'Fayetteville St', 'Raleigh', 'USA'), -('Mountain', 'Utah', '84101', 246, 'State St', 'Salt Lake City', 'USA'), -('South', 'Alabama', '35201', 369, '20th St', 'Birmingham', 'USA'), -('Southwest', 'New Mexico', '87101', 579, 'Central Ave', 'Albuquerque', 'USA'), -('Northeast', 'Rhode Island', '02901', 258, 'Westminster St', 'Providence', 'USA'), -('West Coast', 'Nevada', '89101', 147, 'Las Vegas Blvd', 'Las Vegas', 'USA'), -('Midwest', 'Minnesota', '55401', 369, 'Hennepin Ave', 'Minneapolis', 'USA'), -('Southwest', 'Texas', '77001', 159, 'Houston St', 'Houston', 'USA'), -('South', 'Kentucky', '40501', 753, 'Main St', 'Lexington', 'USA'), -('West Coast', 'California', '95814', 486, 'Capitol Mall', 'Sacramento', 'USA'), -('Midwest', 'Ohio', '43215', 268, 'High St', 'Columbus', 'USA'), -('Southeast', 'Virginia', '23219', 197, 'Broad St', 'Richmond', 'USA'), -('Northeast', 'Maine', '04101', 874, 'Congress St', 'Portland', 'USA'), -('Midwest', 'Indiana', '46201', 659, 'Meridian St', 'Indianapolis', 'USA'), -('West Coast', 'California', '92037', 432, 'La Jolla Shores Dr', 'La Jolla', 'USA'), -('Mountain', 'Idaho', '83701', 789, 'Idaho St', 'Boise', 'USA'), -('Southwest', 'Oklahoma', '73101', 235, 'Robinson Ave', 'Oklahoma City', 'USA'), -('West Coast', 'California', '90001', 569, 'Sunset Blvd', 'Los Angeles', 'USA'), -('Midwest', 'Wisconsin', '53202', 147, 'Wisconsin Ave', 'Milwaukee', 'USA'), -('Southeast', 'Tennessee', '37201', 385, 'Broadway', 'Nashville', 'USA'), -('South', 'Arkansas', '72201', 476, 'Main St', 'Little Rock', 'USA'), -('Mountain', 'Montana', '59601', 651, 'Last Chance Gulch', 'Helena', 'USA'), -('Southwest', 'Texas', '78201', 248, 'Commerce St', 'San Antonio', 'USA'), -('Midwest', 'Kansas', '66101', 365, 'Minnesota Ave', 'Kansas City', 'USA'), -('West Coast', 'California', '92101', 843, 'Harbor Dr', 'San Diego', 'USA'), -('South', 'Louisiana', '70112', 132, 'Canal St', 'New Orleans', 'USA'), -('West Coast', 'Hawaii', '96801', 476, 'King St', 'Honolulu', 'USA'), -('Southwest', 'Nevada', '89501', 214, 'Virginia St', 'Reno', 'USA'), -('Mountain', 'Wyoming', '82001', 567, 'Capitol Ave', 'Cheyenne', 'USA'), -('Midwest', 'Nebraska', '68501', 158, 'O St', 'Lincoln', 'USA'), -('Southeast', 'South Carolina', '29201', 376, 'Gervais St', 'Columbia', 'USA'), -('Southwest', 'Texas', '76101', 142, 'Main St', 'Fort Worth', 'USA'), -('Mountain', 'Colorado', '80301', 197, 'Pearl St', 'Boulder', 'USA'), -('Southwest', 'Utah', '84701', 243, 'Cedar City Blvd', 'Cedar City', 'USA'), -('Midwest', 'North Dakota', '58102', 184, 'Broadway', 'Fargo', 'USA'), -('Southeast', 'Alabama', '36601', 349, 'Government St', 'Mobile', 'USA'); - - --- Posting Insert Statements -INSERT INTO Posting (Name, Company_ID, Industry, Location, Date_Start, Date_End, Filled, Minimum_GPA, Title, Description, Pay) -VALUES -('Backend Developer Intern', 1, 'Technology', 3, '2024-05-15', '2024-08-15', FALSE, 3.3, 'Internship', 'Develop and maintain backend services using Java and Spring Boot.', 65), -('Frontend Developer', 1, 'Technology', 3, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Full-Time', 'Build responsive web applications using React.', 70), -('ML Engineer Intern', 2, 'AI', 5, '2024-05-20', '2024-08-20', TRUE, 3.6, 'Internship', 'Work on cutting-edge ML models and implementations.', 60), -('Data Scientist', 2, 'AI', 5, '2024-06-15', '2024-09-15', FALSE, 3.5, 'Full-Time', 'Analyze complex datasets and build predictive models.', 72), -('Software QA Intern', 3, 'Technology', 8, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Internship', 'Develop and execute test plans for web applications.', 45), -('DevOps Engineer', 3, 'Technology', 8, '2024-07-01', '2024-09-30', FALSE, 3.2, 'Contract', 'Maintain CI/CD pipelines and cloud infrastructure.', 68), -('Product Manager', 4, 'Management', 12, '2024-06-01', '2024-08-31', TRUE, 3.4, 'Full-Time', 'Lead product development and strategy initiatives.', 71), -('Business Analyst Intern', 4, 'Business', 12, '2024-05-15', '2024-08-15', FALSE, 3.2, 'Internship', 'Support business analysis and reporting tasks.', 40), -('Marketing Intern', 5, 'Marketing', 15, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Internship', 'Assist with digital marketing campaigns.', 35), -('Content Strategist', 5, 'Marketing', 15, '2024-06-15', '2024-09-15', FALSE, 3.1, 'Full-Time', 'Develop content strategy and manage social media presence.', 55), -('Data Engineer', 6, 'Technology', 18, '2024-05-20', '2024-08-20', FALSE, 3.4, 'Full-Time', 'Build and maintain data pipelines and warehouses.', 69), -('Cloud Engineer Intern', 6, 'Technology', 18, '2024-06-01', '2024-08-31', TRUE, 3.3, 'Internship', 'Work with AWS services and cloud architecture.', 55), -('UX Designer', 7, 'Design', 20, '2024-06-15', '2024-09-15', FALSE, 3.0, 'Full-Time', 'Create user-centered designs and prototypes.', 60), -('UI Developer Intern', 7, 'Design', 20, '2024-07-01', '2024-09-30', FALSE, 3.1, 'Internship', 'Implement responsive UI designs using modern frameworks.', 45), -('Full Stack Developer', 8, 'Technology', 22, '2024-05-15', '2024-08-15', FALSE, 3.4, 'Full-Time', 'Develop full-stack applications using MEAN stack.', 73), -('Systems Engineer Intern', 8, 'Technology', 22, '2024-06-01', '2024-08-31', TRUE, 3.2, 'Internship', 'Support system architecture and infrastructure projects.', 50), -('Finance Analyst', 9, 'Finance', 25, '2024-06-15', '2024-09-15', FALSE, 3.5, 'Full-Time', 'Perform financial analysis and reporting.', 65), -('Accounting Intern', 9, 'Finance', 25, '2024-05-20', '2024-08-20', FALSE, 3.3, 'Internship', 'Support accounting operations and reconciliations.', 40), -('HR Coordinator', 10, 'HR', 28, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Full-Time', 'Manage HR operations and employee relations.', 50), -('Recruitment Intern', 10, 'HR', 28, '2024-07-01', '2024-09-30', TRUE, 3.1, 'Internship', 'Assist with recruitment and onboarding processes.', 35), -('Android Developer', 11, 'Mobile', 30, '2024-05-15', '2024-08-15', FALSE, 3.3, 'Full-Time', 'Develop Android applications using Kotlin.', 70), -('iOS Developer Intern', 11, 'Mobile', 30, '2024-06-01', '2024-08-31', FALSE, 3.2, 'Internship', 'Build iOS applications using Swift.', 55), -('Research Scientist', 12, 'Research', 32, '2024-06-15', '2024-09-15', TRUE, 3.7, 'Full-Time', 'Conduct research in computer vision and deep learning.', 75), -('Research Assistant', 12, 'Research', 32, '2024-05-20', '2024-08-20', FALSE, 3.5, 'Internship', 'Support research projects and experiments.', 45), -('Security Engineer', 13, 'Security', 35, '2024-06-01', '2024-08-31', FALSE, 3.4, 'Full-Time', 'Implement security measures and conduct audits.', 72), -('Security Analyst Intern', 13, 'Security', 35, '2024-07-01', '2024-09-30', FALSE, 3.3, 'Internship', 'Assist with security monitoring and analysis.', 50), -('Operations Manager', 14, 'Operations', 38, '2024-05-15', '2024-08-15', TRUE, 3.2, 'Full-Time', 'Manage daily operations and process improvements.', 65), -('Operations Intern', 14, 'Operations', 38, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Internship', 'Support operations and logistics processes.', 40), -('Sales Representative', 15, 'Sales', 40, '2024-06-15', '2024-09-15', FALSE, 3.0, 'Full-Time', 'Drive sales growth and client relationships.', 60), -('Sales Intern', 15, 'Sales', 40, '2024-05-20', '2024-08-20', FALSE, 3.1, 'Internship', 'Support sales operations and client outreach.', 35), -('Backend Developer', 16, 'Technology', 42, '2024-06-01', '2024-08-31', TRUE, 3.4, 'Full-Time', 'Develop scalable backend services using Python.', 71), -('Frontend Developer Intern', 16, 'Technology', 42, '2024-07-01', '2024-09-30', FALSE, 3.2, 'Internship', 'Build web interfaces using Vue.js.', 50), -('Data Analyst', 17, 'Data Science', 44, '2024-05-15', '2024-08-15', FALSE, 3.3, 'Full-Time', 'Analyze business data and create reports.', 63), -('Analytics Intern', 17, 'Data Science', 44, '2024-06-01', '2024-08-31', FALSE, 3.2, 'Internship', 'Support data analysis and visualization projects.', 45), -('Product Designer', 18, 'Design', 46, '2024-06-15', '2024-09-15', TRUE, 3.1, 'Full-Time', 'Design product interfaces and user experiences.', 65), -('Design Intern', 18, 'Design', 46, '2024-05-20', '2024-08-20', FALSE, 3.0, 'Internship', 'Support product design and prototyping.', 40), -('Project Coordinator', 19, 'Management', 48, '2024-06-01', '2024-08-31', FALSE, 3.2, 'Full-Time', 'Coordinate project activities and timelines.', 55), -('Project Management Intern', 19, 'Management', 48, '2024-07-01', '2024-09-30', FALSE, 3.1, 'Internship', 'Support project planning and execution.', 40), -('Marketing Manager', 20, 'Marketing', 50, '2024-05-15', '2024-08-15', TRUE, 3.3, 'Full-Time', 'Lead marketing strategies and campaigns.', 68), -('Digital Marketing Intern', 20, 'Marketing', 50, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Internship', 'Support digital marketing initiatives.', 35), -('Software Architect', 21, 'Technology', 2, '2024-06-15', '2024-09-15', FALSE, 3.6, 'Full-Time', 'Design and implement system architecture.', 74), -('Architecture Intern', 21, 'Technology', 2, '2024-05-20', '2024-08-20', FALSE, 3.4, 'Internship', 'Support architecture design and documentation.', 50), -('Business Intelligence Analyst', 22, 'Business', 4, '2024-06-01', '2024-08-31', TRUE, 3.3, 'Full-Time', 'Develop BI solutions and reports.', 65), -('BI Intern', 22, 'Business', 4, '2024-07-01', '2024-09-30', FALSE, 3.2, 'Internship', 'Support BI reporting and analysis.', 45), -('Cloud Solutions Architect', 23, 'Technology', 6, '2024-05-15', '2024-08-15', FALSE, 3.5, 'Full-Time', 'Design cloud infrastructure solutions.', 73), -('Cloud Infrastructure Intern', 23, 'Technology', 6, '2024-06-01', '2024-08-31', FALSE, 3.3, 'Internship', 'Support cloud infrastructure projects.', 55), -('Financial Analyst', 24, 'Finance', 8, '2024-06-15', '2024-09-15', TRUE, 3.4, 'Full-Time', 'Perform financial modeling and analysis.', 67), -('Finance Intern', 24, 'Finance', 8, '2024-05-20', '2024-08-20', FALSE, 3.2, 'Internship', 'Support financial analysis and reporting.', 40), -('Software Development Manager', 25, 'Technology', 10, '2024-06-01', '2024-08-31', FALSE, 3.5, 'Full-Time', 'Lead software development teams.', 75), -('Development Team Intern', 25, 'Technology', 10, '2024-07-01', '2024-09-30', FALSE, 3.3, 'Internship', 'Support development team projects.', 50), -('AI Research Scientist', 26, 'AI', 12, '2024-05-15', '2024-08-15', TRUE, 3.8, 'Full-Time', 'Conduct AI research and development.', 74), -('AI Research Intern', 26, 'AI', 12, '2024-06-01', '2024-08-31', FALSE, 3.6, 'Internship', 'Support AI research projects.', 55), -('DevOps Manager', 27, 'Technology', 14, '2024-06-15', '2024-09-15', FALSE, 3.4, 'Full-Time', 'Lead DevOps practices and teams.', 72), -('DevOps Intern', 27, 'Technology', 14, '2024-05-20', '2024-08-20', FALSE, 3.2, 'Internship', 'Support DevOps operations and automation.', 50), -('UX Research Lead', 28, 'Design', 16, '2024-06-01', '2024-08-31', TRUE, 3.3, 'Full-Time', 'Lead user research initiatives.', 68), -('UX Research Intern', 28, 'Design', 16, '2024-07-01', '2024-09-30', FALSE, 3.1, 'Internship', 'Support user research studies.', 45), -('Database Administrator', 29, 'Technology', 18, '2024-05-15', '2024-08-15', FALSE, 3.4, 'Full-Time', 'Manage database systems and performance.', 69), -('Database Intern', 29, 'Technology', 18, '2024-06-01', '2024-08-31', FALSE, 3.2, 'Internship', 'Support database administration tasks.', 45), -('Quality Assurance Lead', 30, 'Technology', 20, '2024-06-15', '2024-09-15', TRUE, 3.3, 'Full-Time', 'Lead QA processes and testing teams.', 67), -('QA Intern', 30, 'Technology', 20, '2024-05-20', '2024-08-20', FALSE, 3.1, 'Internship', 'Support QA testing and documentation.', 40), -('Cybersecurity Analyst', 13, 'Security', 35, '2024-06-01', '2024-08-31', FALSE, 3.4, 'Full-Time', 'Analyze and mitigate security threats.', 68), -('Junior Mobile Developer', 11, 'Mobile', 30, '2024-06-15', '2024-09-15', FALSE, 3.2, 'Full-Time', 'Develop and debug mobile apps for Android and iOS.', 65), -('Data Architect', 6, 'Technology', 18, '2024-05-15', '2024-08-15', TRUE, 3.5, 'Full-Time', 'Design and manage enterprise-level data models.', 73), -('Marketing Coordinator', 5, 'Marketing', 15, '2024-06-01', '2024-08-31', FALSE, 3.1, 'Full-Time', 'Coordinate marketing campaigns and events.', 60), -('SEO Specialist Intern', 5, 'Marketing', 15, '2024-05-20', '2024-08-20', FALSE, 3.2, 'Internship', 'Optimize web content for search engines.', 45), -('Software Test Engineer', 3, 'Technology', 8, '2024-06-15', '2024-09-15', TRUE, 3.4, 'Full-Time', 'Develop automated tests for software applications.', 72), -('Data Visualization Specialist', 17, 'Data Science', 44, '2024-06-01', '2024-08-31', FALSE, 3.3, 'Full-Time', 'Create interactive dashboards and data visualizations.', 65), -('Technical Writer', 4, 'Management', 12, '2024-05-15', '2024-08-15', FALSE, 3.0, 'Full-Time', 'Write technical documentation and user manuals.', 55), -('Customer Success Manager', 10, 'HR', 28, '2024-06-01', '2024-08-31', TRUE, 3.2, 'Full-Time', 'Manage client relationships and customer success strategies.', 70), -('Technical Support Specialist', 10, 'HR', 28, '2024-05-15', '2024-08-15', FALSE, 3.1, 'Internship', 'Assist with resolving technical support tickets.', 45), -('Environmental Engineer', 14, 'Environmental', 38, '2024-06-01', '2024-08-31', FALSE, 3.4, 'Full-Time', 'Design sustainable engineering solutions.', 68), -('Energy Efficiency Intern', 14, 'Environmental', 38, '2024-05-20', '2024-08-20', TRUE, 3.2, 'Internship', 'Assist in evaluating energy efficiency initiatives.', 40), -('Social Media Manager', 5, 'Marketing', 15, '2024-06-15', '2024-09-15', FALSE, 3.0, 'Full-Time', 'Plan and manage social media campaigns.', 55), -('Brand Strategist', 5, 'Marketing', 15, '2024-05-20', '2024-08-20', TRUE, 3.1, 'Full-Time', 'Develop and implement branding strategies.', 60), -('AI Ethics Researcher', 2, 'AI', 5, '2024-06-01', '2024-08-31', FALSE, 3.7, 'Full-Time', 'Research ethical implications of AI technologies.', 74), -('Cloud Migration Specialist', 6, 'Technology', 18, '2024-06-15', '2024-09-15', FALSE, 3.4, 'Full-Time', 'Assist in migrating systems to the cloud.', 72), -('Machine Learning Intern', 2, 'AI', 5, '2024-05-15', '2024-08-15', FALSE, 3.6, 'Internship', 'Develop and optimize machine learning algorithms.', 55), -('Front-End Engineer', 16, 'Technology', 42, '2024-06-01', '2024-08-31', TRUE, 3.2, 'Full-Time', 'Develop dynamic and user-friendly interfaces.', 65), -('DevOps Intern', 27, 'Technology', 14, '2024-07-01', '2024-09-30', FALSE, 3.3, 'Internship', 'Support automation and deployment pipelines.', 45), -('UX Researcher', 28, 'Design', 16, '2024-06-15', '2024-09-15', FALSE, 3.1, 'Full-Time', 'Conduct research to improve user experience.', 67), -('Game Developer Intern', 11, 'Mobile', 30, '2024-05-20', '2024-08-20', FALSE, 3.4, 'Internship', 'Develop game features for mobile platforms.', 55), -('Data Governance Analyst', 6, 'Technology', 18, '2024-05-15', '2024-08-15', FALSE, 3.5, 'Full-Time', 'Implement data governance policies.', 72), -('Financial Planner', 9, 'Finance', 25, '2024-06-15', '2024-09-15', TRUE, 3.4, 'Full-Time', 'Provide financial planning services to clients.', 68), -('Digital Advertising Intern', 5, 'Marketing', 15, '2024-05-20', '2024-08-20', FALSE, 3.2, 'Internship', 'Assist with pay-per-click advertising campaigns.', 40), -('IT Support Specialist', 10, 'HR', 28, '2024-06-01', '2024-08-31', FALSE, 3.0, 'Full-Time', 'Provide IT support to staff and clients.', 60), -('Operations Coordinator', 14, 'Operations', 38, '2024-06-15', '2024-09-15', FALSE, 3.3, 'Full-Time', 'Coordinate operational projects and logistics.', 70), -('Sustainability Intern', 14, 'Environmental', 38, '2024-05-15', '2024-08-15', TRUE, 3.1, 'Internship', 'Work on sustainability assessments and reports.', 40), -('Mobile App Designer', 11, 'Mobile', 30, '2024-06-01', '2024-08-31', FALSE, 3.3, 'Full-Time', 'Design user interfaces for mobile applications.', 68), -('Data Security Analyst', 13, 'Security', 35, '2024-05-15', '2024-08-15', TRUE, 3.5, 'Full-Time', 'Monitor and secure organizational data.', 72); - - - --- Alumni_Position Insert Statements -INSERT INTO Alumni_Position (Position_ID, Alumni_ID) -VALUES -(50, 20), -(46, 59), -(24, 25), -(56, 31), -(31, 59), -(36, 3), -(5, 17), -(33, 19), -(46, 18), -(51, 42), -(17, 7), -(20, 24), -(21, 22), -(4, 46), -(22, 44), -(19, 27), -(33, 13), -(41, 46), -(11, 1), -(53, 14), -(17, 45), -(32, 47), -(21, 38), -(54, 17), -(47, 3), -(9, 23), -(51, 19), -(58, 2), -(34, 31), -(34, 24), -(51, 52), -(28, 60), -(39, 42), -(12, 50), -(35, 27), -(37, 8), -(19, 3), -(37, 12), -(56, 51), -(4, 37), -(4, 18), -(1, 39), -(14, 19), -(38, 52), -(54, 2), -(22, 45), -(28, 18), -(36, 28), -(48, 58), -(30, 39), -(48, 55), -(30, 51), -(32, 9), -(37, 16), -(55, 44), -(41, 3), -(20, 13), -(40, 34), -(41, 4), -(4, 40), -(10, 38), -(32, 28), -(44, 46), -(1, 28), -(13, 37), -(4, 49), -(44, 7), -(7, 44), -(52, 10), -(29, 34), -(21, 4), -(55, 39), -(39, 9), -(12, 60), -(24, 36), -(59, 34), -(6, 2), -(54, 36), -(6, 48), -(33, 55), -(10, 4), -(34, 11), -(22, 35), -(53, 3), -(33, 43), -(6, 15), -(31, 20), -(48, 10), -(44, 29), -(38, 6), -(20, 14), -(24, 49), -(25, 49), -(53, 45), -(29, 39), -(1, 58), -(27, 35); - --- Cycle insert statements -INSERT INTO Cycle (cycle) -VALUES -('Spring'), -('Fall'); - - -- Student Insert Statements -INSERT INTO Student (First_Name, Last_Name, Preferred_Name, GPA, College_ID, Grad_Year, Cycle, Advisor_ID, Eligibility, Hired, Resume_Link, Email, Phone_Number, Description) -VALUES -('Emma', 'Johnson', 'Em', 3.85, 12, 2025, 1, 25, TRUE, FALSE, 'link_to_resume_1', 'emma.johnson@gmail.com', '555-123-4567', 'Passionate about AI research.'), -('Liam', 'Smith', NULL, 3.75, 15, 2024, 2, 12, TRUE, FALSE, 'link_to_resume_2', 'liam.smith@gmail.com', '555-234-5678', 'Focused on cloud computing and cybersecurity.'), -('Sophia', 'Brown', 'Sophie', 3.90, 8, 2026, 1, 22, TRUE, FALSE, 'link_to_resume_3', 'sophia.brown@gmail.com', '555-345-6789', 'Aspiring data scientist.'), -('Noah', 'Taylor', 'Noah', 3.65, 10, 2023, 2, 18, TRUE, FALSE, 'link_to_resume_4', 'noah.taylor@gmail.com', '555-456-7890', 'Experienced in web development.'), -('Isabella', 'Davis', 'Bella', 3.80, 7, 2024, 1, 30, TRUE, FALSE, 'link_to_resume_5', 'isabella.davis@gmail.com', '555-567-8901', 'Graphic design and marketing enthusiast.'), -('Oliver', 'Jones', 'Ollie', 3.70, 5, 2025, 2, 20, TRUE, FALSE, 'link_to_resume_6', 'oliver.jones@gmail.com', '555-678-9012', 'Interest in financial modeling and analytics.'), -('Mia', 'Wilson', 'Mimi', 3.95, 13, 2026, 1, 35, TRUE, FALSE, 'link_to_resume_7', 'mia.wilson@gmail.com', '555-789-0123', 'Excited to work in renewable energy projects.'), -('Lucas', 'Garcia', NULL, 3.60, 18, 2025, 2, 17, TRUE, FALSE, 'link_to_resume_8', 'lucas.garcia@gmail.com', '555-890-1234', 'Software engineering focus with cloud expertise.'), -('Ava', 'Martinez', 'Avy', 3.85, 14, 2024, 1, 40, TRUE, FALSE, 'link_to_resume_9', 'ava.martinez@gmail.com', '555-901-2345', 'Marketing and customer engagement specialist.'), -('Ethan', 'Rodriguez', 'Ethan', 3.75, 9, 2026, 2, 19, TRUE, FALSE, 'link_to_resume_10', 'ethan.rodriguez@gmail.com', '555-012-3456', 'AI and robotics enthusiast.'), -('Emily', 'Lopez', 'Emmy', 3.80, 21, 2025, 1, 29, TRUE, FALSE, 'link_to_resume_11', 'emily.lopez@gmail.com', '555-123-4567', 'Graphic designer and creative thinker.'), -('Benjamin', 'Thomas', NULL, 3.95, 19, 2024, 2, 28, TRUE, FALSE, 'link_to_resume_12', 'benjamin.thomas@gmail.com', '555-234-5678', 'Financial analyst with passion for data.'), -('Ella', 'Anderson', 'Ellie', 3.85, 22, 2025, 1, 36, TRUE, FALSE, 'link_to_resume_13', 'ella.anderson@gmail.com', '555-345-6789', 'Experienced in project management and operations.'), -('James', 'Hernandez', 'Jimmy', 3.65, 4, 2024, 2, 27, TRUE, FALSE, 'link_to_resume_14', 'james.hernandez@gmail.com', '555-456-7890', 'Blockchain and fintech enthusiast.'), -('Lily', 'Moore', 'Lil', 3.90, 6, 2026, 1, 24, TRUE, FALSE, 'link_to_resume_15', 'lily.moore@gmail.com', '555-567-8901', 'Passionate about healthcare technology.'), -('Matthew', 'Martinez', 'Matt', 3.70, 11, 2023, 2, 23, TRUE, FALSE, 'link_to_resume_16', 'matthew.martinez@gmail.com', '555-678-9012', 'Focus on AI in education and training systems.'), -('Grace', 'Young', 'Gracie', 3.75, 16, 2024, 1, 15, TRUE, FALSE, 'link_to_resume_17', 'grace.young@gmail.com', '555-789-0123', 'Experienced in event planning and management.'), -('Jack', 'White', 'Jacky', 3.80, 17, 2026, 2, 45, TRUE, FALSE, 'link_to_resume_18', 'jack.white@gmail.com', '555-890-1234', 'Sales and CRM expert.'), -('Harper', 'Lee', 'Harp', 3.65, 20, 2025, 1, 44, TRUE, FALSE, 'link_to_resume_19', 'harper.lee@gmail.com', '555-901-2345', 'Excited to work in environmental engineering.'), -('Alexander', 'Harris', 'Alex', 3.85, 3, 2024, 2, 11, TRUE, FALSE, 'link_to_resume_20', 'alexander.harris@gmail.com', '555-012-3456', 'Business operations and strategic planning.'), -('Zoey', 'Clark', 'Zoe', 3.90, 2, 2026, 1, 33, TRUE, FALSE, 'link_to_resume_21', 'zoey.clark@gmail.com', '555-234-5678', 'Expert in social media marketing and branding.'), -('Daniel', 'Hall', 'Dan', 3.75, 5, 2025, 2, 38, TRUE, FALSE, 'link_to_resume_22', 'daniel.hall@gmail.com', '555-345-6789', 'Focused on renewable energy solutions.'), -('Scarlett', 'Brown', 'Scar', 3.80, 8, 2024, 1, 12, TRUE, FALSE, 'link_to_resume_23', 'scarlett.brown@gmail.com', '555-456-7890', 'Graphic design and creative storytelling.'), -('Henry', 'Adams', NULL, 3.95, 10, 2023, 2, 31, TRUE, FALSE, 'link_to_resume_24', 'henry.adams@gmail.com', '555-567-8901', 'Data visualization and analytics enthusiast.'), -('Victoria', 'Sanchez', 'Vicky', 3.65, 14, 2026, 1, 21, TRUE, FALSE, 'link_to_resume_25', 'victoria.sanchez@gmail.com', '555-678-9012', 'Excited to contribute to AI research.'), -('Owen', 'Roberts', NULL, 3.70, 6, 2024, 2, 25, TRUE, FALSE, 'link_to_resume_26', 'owen.roberts@gmail.com', '555-789-0123', 'Focused on machine learning applications in robotics.'), -('Ella', 'Turner', 'Ellie', 3.85, 11, 2025, 1, 14, TRUE, TRUE, 'link_to_resume_27', 'ella.turner@gmail.com', '555-890-1234', 'Marketing and customer engagement specialist.'), -('Jackson', 'Phillips', 'Jack', 3.80, 13, 2026, 2, 9, TRUE, FALSE, 'link_to_resume_28', 'jackson.phillips@gmail.com', '555-901-2345', 'Interested in cloud computing and DevOps.'), -('Zoe', 'Campbell', 'Zoe', 3.75, 4, 2024, 1, 42, TRUE, FALSE, 'link_to_resume_29', 'zoe.campbell@gmail.com', '555-012-3456', 'Experienced in video editing and content creation.'), -('Logan', 'Evans', 'Log', 3.70, 7, 2025, 2, 28, TRUE, FALSE, 'link_to_resume_30', 'logan.evans@gmail.com', '555-123-4567', 'Software engineer with a focus on AI systems.'), -('Leah', 'Murphy', 'Lea', 3.85, 9, 2026, 1, 40, TRUE, FALSE, 'link_to_resume_31', 'leah.murphy@gmail.com', '555-234-5678', 'Event planner with an eye for detail.'), -('Liam', 'Stewart', 'Liam', 3.65, 20, 2023, 2, 13, TRUE, FALSE, 'link_to_resume_32', 'liam.stewart@gmail.com', '555-345-6789', 'Excited to work in environmental engineering.'), -('Samantha', 'Morris', 'Sam', 3.90, 22, 2024, 1, 34, TRUE, FALSE, 'link_to_resume_33', 'samantha.morris@gmail.com', '555-456-7890', 'Marketing and content strategy specialist.'), -('Ethan', 'Wright', 'Ethan', 3.75, 6, 2026, 2, 29, TRUE, FALSE, 'link_to_resume_34', 'ethan.wright@gmail.com', '555-567-8901', 'Interested in cybersecurity and data privacy.'), -('Olivia', 'King', 'Liv', 3.85, 15, 2025, 1, 16, TRUE, FALSE, 'link_to_resume_35', 'olivia.king@gmail.com', '555-678-9012', 'Healthcare and biotech enthusiast.'), -('Andrew', 'Parker', 'Andy', 3.80, 11, 2024, 2, 7, TRUE, FALSE, 'link_to_resume_36', 'andrew.parker@gmail.com', '555-789-0123', 'Software engineering with a focus on SaaS.'), -('Avery', 'Collins', 'Av', 3.95, 3, 2023, 1, 5, TRUE, FALSE, 'link_to_resume_37', 'avery.collins@gmail.com', '555-890-1234', 'Passionate about education technology.'), -('Chloe', 'Morgan', 'Chlo', 3.85, 16, 2025, 2, 18, TRUE, FALSE, 'link_to_resume_38', 'chloe.morgan@gmail.com', '555-901-2345', 'Financial analyst with passion for data insights.'), -('Nathan', 'Green', 'Nate', 3.70, 10, 2026, 1, 26, TRUE, FALSE, 'link_to_resume_39', 'nathan.green@gmail.com', '555-012-3456', 'Data scientist focused on AI applications.'), -('Lila', 'Perez', NULL, 3.65, 8, 2024, 2, 43, TRUE, FALSE, 'link_to_resume_40', 'lila.perez@gmail.com', '555-123-4567', 'Content marketing and storytelling specialist.'), -('Gabriel', 'Diaz', 'Gabe', 3.90, 5, 2023, 1, 37, TRUE, FALSE, 'link_to_resume_41', 'gabriel.diaz@gmail.com', '555-234-5678', 'AI and machine learning researcher.'), -('Ella', 'Ramirez', 'Ellie', 3.85, 9, 2025, 2, 6, TRUE, FALSE, 'link_to_resume_42', 'ella.ramirez@gmail.com', '555-345-6789', 'Web development and front-end design expert.'), -('Zoe', 'Martinez', 'Zoe', 3.80, 12, 2024, 1, 15, TRUE, FALSE, 'link_to_resume_43', 'zoe.martinez@gmail.com', '555-456-7890', 'Graphic design and digital media enthusiast.'), -('Aiden', 'Lee', 'Aid', 3.65, 18, 2026, 2, 48, TRUE, FALSE, 'link_to_resume_44', 'aiden.lee@gmail.com', '555-567-8901', 'Focused on DevOps and cloud infrastructure.'), -('Madison', 'Harris', 'Maddie', 3.70, 7, 2023, 1, 39, TRUE, FALSE, 'link_to_resume_45', 'madison.harris@gmail.com', '555-678-9012', 'Software engineering for healthcare systems.'), -('Logan', 'Clark', 'Logan', 3.85, 4, 2024, 2, 25, TRUE, FALSE, 'link_to_resume_46', 'logan.clark@gmail.com', '555-789-0123', 'Blockchain technology and security specialist.'), -('Nora', 'Thompson', 'Nor', 3.90, 2, 2025, 1, 20, TRUE, FALSE, 'link_to_resume_47', 'nora.thompson@gmail.com', '555-890-1234', 'Environmental engineering and green solutions.'), -('Sophia', 'Walker', 'Sophie', 3.65, 14, 2026, 2, 11, TRUE, FALSE, 'link_to_resume_48', 'sophia.walker@gmail.com', '555-901-2345', 'Project management and operations specialist.'), -('Elliot', 'Moore', NULL, 3.70, 20, 2024, 1, 9, TRUE, FALSE, 'link_to_resume_49', 'elliot.moore@gmail.com', '555-012-3456', 'AI and robotics enthusiast.'), -('Violet', 'Brooks', 'Vi', 3.85, 19, 2025, 2, 13, TRUE, FALSE, 'link_to_resume_50', 'violet.brooks@gmail.com', '555-123-4567', 'Marketing analytics and strategy expert.'); - - - -- Major Insert Statements -INSERT INTO Student_Majors (Student_ID, FieldOfStudy_ID) VALUES -(1, 1), (1, 15), -(2, 3), -(3, 7), (3, 12), -(4, 2), -(5, 8), (5, 22), -(6, 4), -(7, 9), -(8, 5), (8, 18), -(9, 10), -(10, 6), -(11, 11), (11, 25), -(12, 13), -(13, 14), (13, 28), -(14, 16), -(15, 17), (15, 30), -(16, 19), -(17, 20), -(18, 21), (18, 35), -(19, 23), -(20, 24), -(21, 26), -(22, 27), (22, 38), -(23, 29), -(24, 31), -(25, 32), (25, 40), -(26, 33), -(27, 34), -(28, 36), -(29, 37), (29, 42), -(30, 39), -(31, 1), -(32, 3), (32, 15), -(33, 5), -(34, 7), -(35, 9), (35, 22), -(36, 11), -(37, 13), (37, 25), -(38, 2), -(39, 4), -(40, 6), (40, 28), -(41, 8), -(42, 10), -(43, 12), (43, 30), -(44, 14), -(45, 16), -(46, 18), (46, 33), -(47, 20), -(48, 24), (48, 35), -(49, 26), -(50, 28); - --- Minor Table Entries -INSERT INTO Student_Minors (Student_ID, FieldOfStudy_ID) VALUES -(1, 2), -(2, 4), (2, 16), -(3, 6), -(4, 8), (4, 20), -(5, 10), -(6, 12), (6, 24), -(7, 14), -(8, 1), -(9, 3), (9, 27), -(10, 5), -(11, 7), -(12, 9), (12, 30), -(13, 11), -(14, 13), -(15, 15), (15, 33), -(16, 17), -(17, 19), (17, 36), -(18, 21), -(19, 23), (19, 39), -(20, 25), -(21, 28), -(22, 31), -(23, 34), (23, 43), -(24, 37), -(25, 40), -(26, 44), (26, 45), -(27, 46), -(28, 47), (28, 48), -(29, 49), -(30, 50), -(31, 2), -(32, 4), -(33, 6), (33, 17), -(34, 8), -(35, 10), (35, 19), -(36, 12), -(37, 14), -(38, 16), (38, 21), -(39, 18), -(40, 20), -(41, 22), (41, 23), -(42, 24), -(43, 26), -(44, 28), (44, 25), -(45, 30), -(46, 32), -(47, 34), (47, 27), -(48, 36), -(49, 38), (49, 29), -(50, 40); - - --- Posting_Skills Insert Statements -INSERT INTO Posting_Skills (Position_ID, Skill_ID) -VALUES --- Backend Developer Intern (Python, Cloud Computing, Programming) -(1, 1), (1, 24), (1, 22), - --- Frontend Developer (JavaScript, Web Development, UX Design) -(2, 50), (2, 9), (2, 13), - --- ML Engineer Intern (Python, Machine Learning, AI) -(3, 1), (3, 4), (3, 29), - --- Data Scientist (Data Analysis, Python for Data Science, Statistics) -(4, 3), (4, 37), (4, 40), - --- Software QA Intern (Programming, Testing skills) -(5, 22), (5, 9), (5, 24), - --- DevOps Engineer (Cloud Computing, Linux Administration, Programming) -(6, 24), (6, 51), (6, 22), - --- Product Manager (Product Management, Leadership, Strategic Planning) -(7, 56), (7, 2), (7, 41), - --- Business Analyst Intern (Data Analysis, Financial Analysis, Business Development) -(8, 3), (8, 17), (8, 48), - --- Marketing Intern (Digital Marketing, Social Media Marketing, Content Writing) -(9, 8), (9, 16), (9, 14), - --- Content Strategist (Content Writing, SEO, Digital Marketing) -(10, 14), (10, 7), (10, 8), - --- Data Engineer (Python, SQL, Cloud Computing) -(11, 1), (11, 36), (11, 24), - --- Cloud Engineer Intern (Cloud Computing, Cloud Architecture, Linux Administration) -(12, 24), (12, 52), (12, 51), - --- UX Designer (UX Design, Graphic Design, Research) -(13, 13), (13, 12), (13, 26), - --- UI Developer Intern (Web Development, JavaScript, UX Design) -(14, 9), (14, 50), (14, 13), - --- Full Stack Developer (Programming, Web Development, JavaScript) -(15, 22), (15, 9), (15, 50), - --- Systems Engineer Intern (Cloud Computing, Linux Administration, Programming) -(16, 24), (16, 51), (16, 22), - --- Finance Analyst (Financial Analysis, Data Analysis, Financial Reporting) -(17, 17), (17, 3), (17, 35), - --- Accounting Intern (Financial Analysis, Financial Reporting) -(18, 17), (18, 35), (18, 3), - --- HR Coordinator (Human Resources, Leadership, Team Management) -(19, 39), (19, 2), (19, 19), - --- Recruitment Intern (Human Resources, Communication skills) -(20, 39), (20, 27), (20, 19), - --- Android Developer (Mobile Development, Programming, UI/UX) -(21, 34), (21, 22), (21, 13), - --- iOS Developer Intern (Mobile Development, Programming) -(22, 34), (22, 22), (22, 13), - --- Research Scientist (AI, Machine Learning, Research) -(23, 29), (23, 4), (23, 26), - --- Research Assistant (Research, Data Analysis, Statistics) -(24, 26), (24, 3), (24, 40), - --- Security Engineer (Cybersecurity, Cloud Computing, Programming) -(25, 25), (25, 24), (25, 22), - --- Security Analyst Intern (Cybersecurity, Data Analysis) -(26, 25), (26, 3), (26, 24), - --- Operations Manager (Operations Management, Leadership, Strategic Planning) -(27, 28), (27, 2), (27, 41), - --- Operations Intern (Operations Management, Time Management) -(28, 28), (28, 18), (28, 19), - --- Sales Representative (Customer Service, Negotiation, Sales) -(29, 15), (29, 11), (29, 47), - --- Sales Intern (Customer Service, Communication, Sales) -(30, 15), (30, 27), (30, 47), - --- Backend Developer (Programming, Cloud Computing, Python) -(31, 22), (31, 24), (31, 1), - --- Frontend Developer Intern (JavaScript, Web Development, UX Design) -(32, 50), (32, 9), (32, 13), - --- Data Analyst (Data Analysis, Python for Data Science, Statistics) -(33, 3), (33, 37), (33, 40), - --- Analytics Intern (Data Analysis, Python, Statistics) -(34, 3), (34, 1), (34, 40), - --- Product Designer (UX Design, Graphic Design, Research) -(35, 13), (35, 12), (35, 26), - --- Design Intern (UX Design, Graphic Design) -(36, 13), (36, 12), (36, 27), - --- Project Coordinator (Project Management, Time Management, Team Management) -(37, 6), (37, 18), (37, 19), - --- Project Management Intern (Project Management, Time Management) -(38, 6), (38, 18), (38, 27), - --- Marketing Manager (Marketing Strategy, Digital Marketing, Leadership) -(39, 5), (39, 8), (39, 2), - --- Digital Marketing Intern (Digital Marketing, Social Media Marketing) -(40, 8), (40, 16), (40, 14), - --- Software Architect (Cloud Architecture, Programming, Strategic Planning) -(41, 52), (41, 22), (41, 41), - --- Architecture Intern (Cloud Architecture, Programming) -(42, 52), (42, 22), (42, 24), - --- Business Intelligence Analyst (Data Analysis, SQL, Business Development) -(43, 3), (43, 36), (43, 48), - --- BI Intern (Data Analysis, SQL) -(44, 3), (44, 36), (44, 40), - --- Cloud Solutions Architect (Cloud Architecture, Cloud Computing, Linux Administration) -(45, 52), (45, 24), (45, 51), - --- Cloud Infrastructure Intern (Cloud Computing, Linux Administration) -(46, 24), (46, 51), (46, 22), - --- Financial Analyst (Financial Analysis, Data Analysis, Financial Reporting) -(47, 17), (47, 3), (47, 35), - --- Finance Intern (Financial Analysis, Data Analysis) -(48, 17), (48, 3), (48, 35), - --- Software Development Manager (Programming, Leadership, Team Management) -(49, 22), (49, 2), (49, 19), - --- Development Team Intern (Programming, Team Management) -(50, 22), (50, 19), (50, 18); - --- Student_Skills Insert Statements --- Student Skills Insert Statements based on descriptions -INSERT INTO Student_Skills (Student_ID, Skill_ID) VALUES --- Emma Johnson - AI research -(1, 1), -- Computer Science -(1, 50), -- Artificial Intelligence -(1, 18), -- Data Science - --- Liam Smith - cloud computing and cybersecurity -(2, 1), -- Computer Science -(2, 19), -- Cybersecurity -(2, 18), -- Data Science - --- Sophia Brown - data scientist -(3, 18), -- Data Science -(3, 1), -- Computer Science -(3, 2), -- Mathematics - --- Noah Taylor - web development -(4, 1), -- Computer Science -(4, 24), -- Graphic Design - --- Isabella Davis - graphic design and marketing -(5, 24), -- Graphic Design -(5, 20), -- Marketing -(5, 23), -- Public Relations - --- Oliver Jones - financial modeling and analytics -(6, 22), -- Finance -(6, 18), -- Data Science -(6, 2), -- Mathematics - --- Mia Wilson - renewable energy -(7, 17), -- Environmental Science -(7, 40), -- Environmental Engineering -(7, 39), -- Sustainability Studies - --- Lucas Garcia - software engineering with cloud -(8, 1), -- Computer Science -(8, 19), -- Cybersecurity - --- Ava Martinez - marketing and customer engagement -(9, 20), -- Marketing -(9, 23), -- Public Relations - --- Ethan Rodriguez - AI and robotics -(10, 50), -- Artificial Intelligence -(10, 1), -- Computer Science -(10, 43), -- Mechanical Engineering - --- Continue for remaining students... -(11, 24), -- Emily Lopez - Graphic Design -(11, 20), -- Marketing - -(12, 22), -- Benjamin Thomas - Finance -(12, 18), -- Data Science - -(13, 48), -- Ella Anderson - Supply Chain Management -(13, 3), -- Business Administration - -(14, 22), -- James Hernandez - Fintech -(14, 1), -- Computer Science - -(15, 27), -- Lily Moore - Healthcare Technology -(15, 42), -- Biomedical Engineering - --- And so on for all 50 students... -(16, 50), -- Matthew Martinez - AI in education -(16, 28), -- Education - -(17, 47), -- Grace Young - Event Planning -(17, 3), -- Business Administration - -(18, 20), -- Jack White - Sales and CRM -(18, 3), -- Business Administration - -(19, 40), -- Harper Lee - Environmental Engineering -(19, 17), -- Environmental Science - -(20, 3), -- Alexander Harris - Business Operations -(20, 38), -- Public Policy - --- Continue with remaining students... -(21, 20), -- Zoey Clark - Social Media Marketing -(21, 23), -- Public Relations - -(22, 40), -- Daniel Hall - Renewable Energy -(22, 39), -- Sustainability Studies - -(23, 24), -- Scarlett Brown - Graphic Design -(23, 20), -- Marketing - -(24, 18), -- Henry Adams - Data Analytics -(24, 2), -- Mathematics - -(25, 50), -- Victoria Sanchez - AI Research -(25, 1), -- Computer Science - --- And the rest of the students... -(26, 50), -- Owen Roberts - Machine Learning -(26, 43), -- Mechanical Engineering - -(27, 20), -- Ella Turner - Marketing -(27, 23), -- Public Relations - -(28, 1), -- Jackson Phillips - Cloud Computing -(28, 19), -- Cybersecurity - -(29, 24), -- Zoe Campbell - Video Editing -(29, 34), -- Film Studies - -(30, 1), -- Logan Evans - Software Engineering -(30, 50), -- AI Systems - -(31, 47), -- Leah Murphy - Event Planning -(31, 3), -- Business Administration - -(32, 40), -- Liam Stewart - Environmental Engineering -(32, 17), -- Environmental Science - -(33, 20), -- Samantha Morris - Marketing -(33, 23), -- Public Relations - -(34, 19), -- Ethan Wright - Cybersecurity -(34, 1), -- Computer Science - -(35, 27), -- Olivia King - Healthcare -(35, 42), -- Biomedical Engineering - -(36, 1), -- Andrew Parker - Software Engineering -(36, 18), -- Data Science - -(37, 28), -- Avery Collins - Education Technology -(37, 1), -- Computer Science - -(38, 22), -- Chloe Morgan - Financial Analysis -(38, 18), -- Data Science - -(39, 18), -- Nathan Green - Data Science -(39, 50), -- AI Applications - -(40, 20), -- Lila Perez - Content Marketing -(40, 23), -- Public Relations - -(41, 50), -- Gabriel Diaz - AI Research -(41, 1), -- Computer Science - -(42, 1), -- Ella Ramirez - Web Development -(42, 24), -- Graphic Design - -(43, 24), -- Zoe Martinez - Graphic Design -(43, 20), -- Marketing - -(44, 1), -- Aiden Lee - DevOps -(44, 19), -- Cybersecurity - -(45, 1), -- Madison Harris - Software Engineering -(45, 27), -- Health Sciences - -(46, 1), -- Logan Clark - Blockchain -(46, 19), -- Cybersecurity - -(47, 40), -- Nora Thompson - Environmental Engineering -(47, 39), -- Sustainability Studies - -(48, 48), -- Sophia Walker - Project Management -(48, 3), -- Business Administration - -(49, 50), -- Elliot Moore - AI and Robotics -(49, 43), -- Mechanical Engineering - -(50, 20), -- Violet Brooks - Marketing Analytics -(50, 18) -- Data Science -; - --- Status INSERT statements -INSERT INTO Status (Status_Description) -VALUES -('Under Review'), -('Rejected'), -('Accepted'); - -INSERT INTO Application (Student_ID, Position_ID, submittedDate, Status_ID) -VALUES --- AI/ML focused students -(1, 3, '2024-02-15', 1), -- Emma Johnson -> ML Engineer Intern -(41, 52, '2024-02-16', 1), -- Gabriel Diaz -> AI Research Scientist -(49, 51, '2024-02-15', 1), -- Elliot Moore -> AI Research Intern -(25, 3, '2024-02-17', 2), -- Victoria Sanchez -> ML Engineer Intern -(10, 52, '2024-02-18', 1), -- Ethan Rodriguez -> AI Research Scientist - --- Software Development focused -(8, 1, '2024-02-15', 1), -- Lucas Garcia -> Backend Developer Intern -(30, 31, '2024-02-16', 1), -- Logan Evans -> Backend Developer -(4, 2, '2024-02-17', 1), -- Noah Taylor -> Frontend Developer -(42, 14, '2024-02-18', 1), -- Ella Ramirez -> UI Developer Intern -(36, 15, '2024-02-19', 1), -- Andrew Parker -> Full Stack Developer - --- Data Science/Analytics -(3, 4, '2024-02-15', 1), -- Sophia Brown -> Data Scientist -(39, 33, '2024-02-16', 1), -- Nathan Green -> Data Analyst -(24, 34, '2024-02-17', 1), -- Henry Adams -> Analytics Intern -(12, 4, '2024-02-18', 2), -- Benjamin Thomas -> Data Scientist -(38, 33, '2024-02-19', 1), -- Chloe Morgan -> Data Analyst - --- Cybersecurity/DevOps -(2, 6, '2024-02-15', 1), -- Liam Smith -> DevOps Engineer -(34, 25, '2024-02-16', 1), -- Ethan Wright -> Security Engineer -(44, 54, '2024-02-17', 1), -- Aiden Lee -> DevOps Manager -(46, 26, '2024-02-18', 1), -- Logan Clark -> Security Analyst Intern -(28, 12, '2024-02-19', 1), -- Jackson Phillips -> Cloud Engineer Intern - --- Marketing/Content -(5, 9, '2024-02-15', 1), -- Isabella Davis -> Marketing Intern -(21, 10, '2024-02-16', 1), -- Zoey Clark -> Content Strategist -(40, 40, '2024-02-17', 1), -- Lila Perez -> Digital Marketing Intern -(27, 39, '2024-02-18', 1), -- Ella Turner -> Marketing Manager -(33, 9, '2024-02-19', 1), -- Samantha Morris -> Marketing Intern - --- Design/UX -(11, 13, '2024-02-15', 1), -- Emily Lopez -> UX Designer -(23, 36, '2024-02-16', 1), -- Scarlett Brown -> Product Designer -(43, 14, '2024-02-17', 1), -- Zoe Martinez -> UI Developer Intern -(29, 56, '2024-02-18', 1), -- Zoe Campbell -> UX Research Intern -(35, 13, '2024-02-19', 1), -- Olivia King -> UX Designer - --- Business/Finance -(6, 17, '2024-02-15', 1), -- Oliver Jones -> Finance Analyst -(17, 8, '2024-02-16', 1), -- Grace Young -> Business Analyst Intern -(18, 29, '2024-02-17', 1), -- Jack White -> Sales Representative -(31, 28, '2024-02-18', 2), -- Leah Murphy -> Operations Intern -(48, 37, '2024-02-19', 1), -- Sophia Walker -> Project Coordinator - --- Environmental/Sustainability -(7, 11, '2024-02-15', 1), -- Mia Wilson -> Data Engineer -(19, 28, '2024-02-16', 1), -- Harper Lee -> Operations Intern -(22, 11, '2024-02-17', 1), -- Daniel Hall -> Data Engineer -(32, 28, '2024-02-18', 1), -- Liam Stewart -> Operations Intern -(47, 37, '2024-02-19', 1), -- Nora Thompson -> Project Coordinator - --- Technology/Engineering -(45, 1, '2024-02-15', 1), -- Madison Harris -> Backend Developer Intern -(26, 16, '2024-02-16', 1), -- Owen Roberts -> Systems Engineer Intern -(37, 5, '2024-02-17', 1), -- Avery Collins -> Software QA Intern -(14, 31, '2024-02-18', 1), -- James Hernandez -> Backend Developer -(16, 3, '2024-02-19', 1), -- Matthew Martinez -> ML Engineer Intern - --- Research/Academic -(15, 24, '2024-02-15', 1), -- Lily Moore -> Research Assistant -(20, 43, '2024-02-16', 1), -- Alexander Harris -> BI Intern -(13, 37, '2024-02-17', 1), -- Ella Anderson -> Project Coordinator -(9, 10, '2024-02-18', 1), -- Ava Martinez -> Content Strategist -(50, 33, '2024-02-19', 1); -- Violet Brooks -> Data Analyst - - --- Question Insert Statements -INSERT INTO Question (Question, Answer, Application_ID) -VALUES --- AI/ML focused students -('Why do you want this internship?', 'To gain real-world experience in machine learning.', 1), -('What is your greatest strength?', 'Critical thinking and perseverance.', 1), -('How do you stay updated with AI advancements?', 'I follow AI research journals and attend webinars.', 2), -('What excites you about AI research?', 'The potential to solve complex real-world problems.', 2), -('What was your favorite ML project?', 'Building a recommendation system using collaborative filtering.', 3), - --- Software Development focused -('Why do you want this position?', 'To deepen my backend development skills.', 6), -('What is your favorite programming language and why?', 'Java, because of its versatility and robust libraries.', 6), -('Describe a time you optimized a system.', 'Improved API response times by implementing caching.', 7), -('What motivates you about frontend development?', 'Creating user-friendly interfaces that improve accessibility.', 8), -('Describe a UI/UX improvement you made.', 'Redesigned a dashboard for better usability.', 9), - --- Data Science/Analytics -('How do you approach data cleaning?', 'By systematically identifying outliers and missing values.', 11), -('What is your experience with predictive modeling?', 'Developed predictive models for sales forecasting.', 12), -('How do you ensure the accuracy of your analysis?', 'By cross-validating results and using multiple datasets.', 13), -('What excites you about analytics?', 'Uncovering actionable insights from data.', 14), -('Describe a challenging dataset you worked with.', 'Cleaned and analyzed unstructured text data for sentiment analysis.', 15), - --- Cybersecurity/DevOps -('What interests you about DevOps?', 'Streamlining software development and deployment.', 16), -('Describe a security issue you solved.', 'Identified and patched a vulnerability in a web application.', 17), -('What is your experience with CI/CD?', 'Built and maintained CI/CD pipelines using Jenkins.', 18), -('Why is cybersecurity important to you?', 'To protect sensitive data and prevent breaches.', 19), -('What is your experience with cloud security?', 'Implemented security protocols for AWS deployments.', 20), - --- Marketing/Content -('Why are you passionate about marketing?', 'Connecting with audiences and creating impactful campaigns.', 21), -('What is your favorite digital marketing tool?', 'Google Analytics for its insightful data visualizations.', 22), -('How do you create effective social media campaigns?', 'By analyzing audience engagement and trends.', 23), -('Describe a successful content strategy you implemented.', 'Developed a blog series that increased traffic by 30%.', 24), -('What interests you about digital marketing?', 'The combination of creativity and analytics.', 25), - --- Design/UX -('What excites you about UX design?', 'Improving the user experience through thoughtful design.', 26), -('Describe your design process.', 'Empathize, define, ideate, prototype, and test.', 27), -('How do you handle feedback on your designs?', 'By embracing it as an opportunity for improvement.', 28), -('What is your favorite design project?', 'Creating a mobile app for budget tracking.', 29), -('How do you ensure accessibility in design?', 'Following WCAG guidelines and conducting user testing.', 30), - --- Business/Finance -('What interests you about finance?', 'Helping organizations make informed financial decisions.', 31), -('How do you manage competing priorities?', 'By prioritizing tasks based on impact and deadlines.', 32), -('Describe a financial analysis you performed.', 'Evaluated profitability and cost structure for a project.', 33), -('Why do you want this position?', 'To gain hands-on experience in financial modeling.', 34), -('What motivates you about business analysis?', 'Uncovering insights to drive strategic decisions.', 35), - --- Environmental/Sustainability -('Why do you care about sustainability?', 'To create a better future for the planet.', 36), -('Describe a sustainability project you worked on.', 'Designed a system for reducing water usage in agriculture.', 37), -('What is your experience with environmental engineering?', 'Developed renewable energy solutions for small businesses.', 38), -('How do you measure the success of sustainability initiatives?', 'Using KPIs like energy savings and waste reduction.', 39), -('What motivates you about sustainability?', 'Making a tangible impact on environmental health.', 40), - --- Technology/Engineering -('Why do you enjoy backend development?', 'The challenge of building scalable systems.', 41), -('What is your experience with API development?', 'Built RESTful APIs for a financial application.', 42), -('Describe a technical challenge you overcame.', 'Optimized database queries to reduce load times.', 43), -('What excites you about engineering?', 'Solving complex problems through innovative solutions.', 44), -('How do you stay updated with technology trends?', 'Following tech blogs and participating in hackathons.', 45), - --- Research/Academic -('Why do you enjoy research?', 'The opportunity to explore and discover new knowledge.', 46), -('What is your favorite area of study?', 'Machine learning and its applications.', 47), -('Describe a research project you led.', 'Developed a novel algorithm for image recognition.', 48), -('What motivates you about academic research?', 'Contributing to the advancement of knowledge.', 49), -('What do you enjoy about being a research assistant?', 'Learning from experts and contributing to meaningful projects.', 50); - - --- Ticket Insert Statements -INSERT INTO Ticket (Reporter_ID, Message, Completed) -VALUES -(1, 'Error in application submission.', FALSE), -(2, 'Duplicate entries in the alumni table.', TRUE), -(3, 'Skill data not populating correctly.', FALSE), -(4, 'Incorrect data in student GPA field.', TRUE), -(5, 'Resume link is broken for some students.', FALSE), -(6, 'Advisor information not linked properly.', TRUE), -(7, 'Missing values in posting location.', FALSE), -(8, 'Application status ID mismatch.', TRUE), -(9, 'Issue with the frontend rendering of postings.', FALSE), -(10, 'Database connection timeout on login.', TRUE), -(11, 'Bug in the search functionality for postings.', FALSE), -(12, 'Duplicate values in major and minor tables.', TRUE), -(13, 'Error during status update for applications.', FALSE), -(14, 'Advisor cannot assign students.', TRUE), -(15, 'Internship pay field accepts negative values.', FALSE), -(16, 'Pagination not working in student list view.', TRUE), -(17, 'Broken links in the alumni section.', FALSE), -(18, 'Incorrect data formatting in posting descriptions.', TRUE), -(19, 'Error during file upload for student resumes.', FALSE), -(20, 'Bug in the reporting system for tickets.', TRUE), -(21, 'Incomplete data migration for skills.', FALSE), -(22, 'Search filters in postings not functioning.', TRUE), -(23, 'Advisor IDs not being assigned correctly.', FALSE), -(24, 'Major table schema mismatch.', TRUE), -(25, 'Notification system not sending updates.', FALSE), -(26, 'Incorrect SQL constraints on applications.', TRUE), -(27, 'Field validation missing for GPA inputs.', FALSE), -(28, 'Missing dropdown options for application statuses.', TRUE), -(29, 'Broken layout on mobile devices.', FALSE), -(30, 'Advisor college IDs not displaying.', TRUE), -(31, 'Frontend crashes during student application.', FALSE), -(32, 'Skill description field accepts invalid characters.', TRUE), -(33, 'Duplicate entries allowed in alumni positions.', FALSE), -(34, 'Error in the calculation of internship durations.', TRUE), -(35, 'Auto-complete in posting search is too slow.', FALSE), -(36, 'Application status updates are not saving.', TRUE), -(37, 'Broken links in the advisor profiles.', FALSE), -(38, 'Error in displaying applicant details.', TRUE), -(39, 'Bug in the password reset functionality.', FALSE), -(40, 'Posting pay field not validating inputs.', TRUE), -(41, 'UI issue with the dashboard view.', FALSE), -(42, 'Broken images in alumni section.', TRUE), -(43, 'Advisor dropdown list not populating.', FALSE), -(44, 'Timeout during data sync for applications.', TRUE), -(45, 'Student table missing graduation year.', FALSE), -(46, 'Search results displaying incorrect order.', TRUE), -(47, 'Error during database backup.', FALSE), -(48, 'Date validation missing for internship postings.', TRUE), -(49, 'Incorrect query result for student applications.', FALSE), -(50, 'Bug in sorting alumni by graduation year.', TRUE); - -INSERT INTO Message (RE, Student_ID, Message, Alumni_ID) -VALUES --- Conversation 1 -(NULL, 1, 'Congratulations on your application!', 1), -(1, 1, 'Thank you! I am excited about this opportunity.', 1), -(2, 1, 'Do you have any tips for the interview process?', 1), -(3, 1, 'Be confident and prepare examples from past experiences.', 1), -(4, 1, 'Thank you for the advice!', 1), - --- Conversation 2 -(NULL, 2, 'Welcome to the platform!', 2), -(6, 2, 'Thank you! Can you tell me more about the internship program?', 2), -(7, 2, 'Sure! The program focuses on hands-on projects and mentorship.', 2), -(8, 2, 'That sounds amazing! I look forward to applying.', 2), -(9, 2, 'Feel free to reach out if you have questions.', 2), - --- Conversation 3 -(NULL, 3, 'We noticed your interest in data analytics.', 3), -(11, 3, 'Yes, I am passionate about exploring insights from data.', 3), -(12, 3, 'Great! I recommend practicing SQL and Python.', 3), -(13, 3, 'Thank you! Do you have any resources to share?', 3), -(14, 3, 'Yes, I will send you some links shortly.', 3), - --- Conversation 4 -(NULL, 4, 'How can I assist you with your application?', 4), -(16, 4, 'I need help refining my resume.', 4), -(17, 4, 'Focus on highlighting your technical skills and achievements.', 4), -(18, 4, 'Thank you! Can I send you a draft for review?', 4), -(19, 4, 'Of course, feel free to send it anytime.', 4), - --- Conversation 5 -(NULL, 5, 'Have you completed your profile on the platform?', 5), -(21, 5, 'Not yet, but I plan to finish it this weekend.', 5), -(22, 5, 'Let me know if you need any guidance.', 5), -(23, 5, 'Thank you! Is there anything specific I should include?', 5), -(24, 5, 'Include any relevant projects and certifications.', 5), - --- Conversation 6 -(NULL, 6, 'What do you enjoy most about software development?', 6), -(26, 6, 'I enjoy solving challenging problems and building useful tools.', 6), -(27, 6, 'That’s great! Have you tried working on open-source projects?', 6), -(28, 6, 'Not yet, but I’d like to explore that soon.', 6), -(29, 6, 'It’s a good way to learn and collaborate with others.', 6), - --- Conversation 7 -(NULL, 7, 'Have you started applying for internships?', 7), -(31, 7, 'Yes, I have applied to three positions so far.', 7), -(32, 7, 'Good luck! Keep track of application deadlines.', 7), -(33, 7, 'Thank you! Do you know how long it takes to hear back?', 7), -(34, 7, 'Usually a few weeks, but it varies by company.', 7), - --- Conversation 8 -(NULL, 8, 'What are your career goals in AI?', 8), -(36, 8, 'I want to specialize in natural language processing.', 8), -(37, 8, 'That’s a fascinating field! Have you started any projects?', 8), -(38, 8, 'Yes, I built a chatbot as a personal project.', 8), -(39, 8, 'Impressive! Keep working on those skills.', 8), - --- Conversation 9 -(NULL, 9, 'Did you find the resources I sent helpful?', 9), -(41, 9, 'Yes, they were very informative. Thank you!', 9), -(42, 9, 'Glad to hear that! Let me know if you need more.', 9), -(43, 9, 'I will! Are there any other tools I should learn?', 9), -(44, 9, 'Consider exploring Tableau for data visualization.', 9), - --- Conversation 10 -(NULL, 10, 'How are your preparations going for the interview?', 10), -(46, 10, 'I’m reviewing common questions and practicing my answers.', 10), -(47, 10, 'Good! Don’t forget to research the company.', 10), -(48, 10, 'I’ve noted that. Thank you for the reminder!', 10), -(49, 10, 'You’re welcome. Best of luck!', 10); - - -Show TABLES; - -DROP DATABASE IF EXISTS Career_Compass; - -CREATE DATABASE IF NOT EXISTS Career_Compass; - -USE Career_Compass; - - --- Create the Skill table -CREATE TABLE Skill -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Name VARCHAR(255) NOT NULL, - Description TEXT, - Industry VARCHAR(255) -); - - -CREATE TABLE System_Admin -( - ID INT AUTO_INCREMENT PRIMARY KEY, - First_Name VARCHAR(255), - Last_Name VARCHAR(255), - Preferred_Name VARCHAR(255) -); - --- Create the Company table -CREATE TABLE Company -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Name VARCHAR(255) NOT NULL, - Industry VARCHAR(255), - Description TEXT -); - -CREATE TABLE College -( - Name VARCHAR(255), - ID INT AUTO_INCREMENT PRIMARY KEY -); - -CREATE TABLE FieldOfStudy ( - ID INT AUTO_INCREMENT PRIMARY KEY, - Name VARCHAR(255) NOT NULL, - Description TEXT -); - --- Create the Advisor table -CREATE TABLE Advisor -( - ID INT AUTO_INCREMENT PRIMARY KEY, - First_Name VARCHAR(255), - Last_Name VARCHAR(255), - Preferred_Name VARCHAR(255), -- optional - College_ID INT NOT NULL, - FOREIGN KEY (College_ID) REFERENCES College (ID) -); - - -CREATE TABLE Alumni -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Grad_Year INT NOT NULL, - First_Name VARCHAR(255), - Last_Name VARCHAR(255), - Email VARCHAR(255), - College_ID INT NOT NULL, - FOREIGN KEY (College_ID) REFERENCES College (ID) -); - -CREATE TABLE Alumni_Majors -( - Alumni_ID INT NOT NULL, - FieldOfStudy_ID INT NOT NULL, - PRIMARY KEY (Alumni_ID, FieldOfStudy_ID), - FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID), - FOREIGN KEY (FieldOfStudy_ID) REFERENCES FieldOfStudy(ID) -); - -CREATE TABLE Alumni_Minors -( - Alumni_ID INT NOT NULL, - FieldOfStudy_ID INT NOT NULL, - PRIMARY KEY (Alumni_ID, FieldOfStudy_ID), - FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID), - FOREIGN KEY (FieldOfStudy_ID) REFERENCES FieldOfStudy(ID) -); - - - -CREATE TABLE Posting_Location -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Region VARCHAR(255), - State VARCHAR(100), - Zip_Code CHAR(10), - Address_Number INT, - Street VARCHAR(255), - City VARCHAR(255), - Country VARCHAR(100) -); - - -CREATE TABLE Posting -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Name VARCHAR(255) NOT NULL, - Company_ID INT NOT NULL, - Industry VARCHAR(255), - Location INT NOT NULL, - FOREIGN KEY (Company_ID) REFERENCES Company (ID), - FOREIGN KEY (Location) REFERENCES Posting_Location (ID), - Date_Start DATE, - Date_End DATE, - Filled BOOLEAN, - Minimum_GPA DECIMAL(3, 2) CHECK (Minimum_GPA >= 0 AND Minimum_GPA <= 4.0), - Title VARCHAR(255), - Description TEXT, - Pay INT NOT NULL -); - - -CREATE TABLE Alumni_Position -( - Position_ID INT NOT NULL, - Alumni_ID INT NOT NULL, - PRIMARY KEY (Position_ID, Alumni_ID), - FOREIGN KEY (Position_ID) REFERENCES Posting (ID), - FOREIGN KEY (Alumni_ID) REFERENCES Alumni (ID) -); - -CREATE TABLE Cycle +CREATE TABLE Alumni_Student ( - ID INT AUTO_INCREMENT PRIMARY KEY, - cycle VARCHAR(50) NOT NULL -); + Alumni_ID INT NOT NULL, + Student_ID INT NOT NULL, --- Create the Student table -CREATE TABLE Student -( - ID INT AUTO_INCREMENT PRIMARY KEY, - First_Name VARCHAR(255) NOT NULL, - Last_Name VARCHAR(255) NOT NULL, - Preferred_Name VARCHAR(255), - GPA DECIMAL(3, 2) CHECK (GPA >= 0 AND GPA <= 4.0), - College_ID INT NOT NULL, - FOREIGN KEY (College_ID) REFERENCES College (ID), - Grad_Year INT NOT NULL, - Cycle INT NOT NULL, - Advisor_ID INT NOT NULL, - Eligibility BOOLEAN, - Hired BOOLEAN, - FOREIGN KEY (Advisor_ID) REFERENCES Advisor (ID), - FOREIGN KEY (Cycle) REFERENCES Cycle (ID), - Resume_Link VARCHAR(255), - Email VARCHAR(255), - Phone_Number VARCHAR(255), - Description TEXT + PRIMARY KEY (Alumni_ID, Student_ID), + FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID) ON DELETE CASCADE, + FOREIGN KEY (Student_ID) REFERENCES Student(ID) ON DELETE CASCADE ); -CREATE TABLE Student_Majors -( - Student_ID INT NOT NULL, - FieldOfStudy_ID INT NOT NULL, - PRIMARY KEY (Student_ID, FieldOfStudy_ID), - FOREIGN KEY (Student_ID) REFERENCES Student(ID), - FOREIGN KEY (FieldOfStudy_ID) REFERENCES FieldOfStudy(ID) -); -CREATE TABLE Student_Minors -( - Student_ID INT NOT NULL, - FieldOfStudy_ID INT NOT NULL, - PRIMARY KEY (Student_ID, FieldOfStudy_ID), - FOREIGN KEY (Student_ID) REFERENCES Student(ID), - FOREIGN KEY (FieldOfStudy_ID) REFERENCES FieldOfStudy(ID) -); +ALTER TABLE Student_Skills DROP FOREIGN KEY Student_Skills_ibfk_1; +ALTER TABLE Student_Skills ADD FOREIGN KEY (Student_ID) REFERENCES Student(ID) ON DELETE CASCADE; --- Create the Posting_Skills table (junction table) -CREATE TABLE Posting_Skills -( - Position_ID INT NOT NULL, - Skill_ID INT NOT NULL, - PRIMARY KEY (Position_ID, Skill_ID), - FOREIGN KEY (Position_ID) REFERENCES Posting (ID), - FOREIGN KEY (Skill_ID) REFERENCES Skill (ID) -); +ALTER TABLE Student_Majors DROP FOREIGN KEY Student_Majors_ibfk_1; +ALTER TABLE Student_Majors ADD FOREIGN KEY (Student_ID) REFERENCES Student(ID) ON DELETE CASCADE; --- Create the Student_Skills table (junction table) -CREATE TABLE Student_Skills -( - Student_ID INT NOT NULL, - Skill_ID INT NOT NULL, - PRIMARY KEY (Student_ID, Skill_ID), - FOREIGN KEY (Student_ID) REFERENCES Student (ID), - FOREIGN KEY (Skill_ID) REFERENCES Skill (ID) -); +ALTER TABLE Student_Minors DROP FOREIGN KEY Student_Minors_ibfk_1; +ALTER TABLE Student_Minors ADD FOREIGN KEY (Student_ID) REFERENCES Student(ID) ON DELETE CASCADE; --- Create the Status table -CREATE TABLE Status -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Status_Description VARCHAR(50) NOT NULL -); +ALTER TABLE Application DROP FOREIGN KEY Application_ibfk_1; +ALTER TABLE Application ADD FOREIGN KEY (Student_ID) REFERENCES Student(ID) ON DELETE CASCADE; +ALTER TABLE Message DROP FOREIGN KEY Message_ibfk_2; +ALTER TABLE Message ADD FOREIGN KEY (Student_ID) REFERENCES Student(ID) ON DELETE CASCADE; --- Create the Application table -CREATE TABLE Application -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Student_ID INT NOT NULL, - Position_ID INT NOT NULL, - submittedDate DATETIME NOT NULL, - Status_ID INT NOT NULL, - FOREIGN KEY (Student_ID) REFERENCES Student (ID), - FOREIGN KEY (Position_ID) REFERENCES Posting (ID), - FOREIGN KEY (Status_ID) REFERENCES Status (ID) -); +-- Modify Alumni-related foreign keys +ALTER TABLE Alumni_Position DROP FOREIGN KEY Alumni_Position_ibfk_2; +ALTER TABLE Alumni_Position ADD FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID) ON DELETE CASCADE; +ALTER TABLE Alumni_Majors DROP FOREIGN KEY Alumni_Majors_ibfk_1; +ALTER TABLE Alumni_Majors ADD FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID) ON DELETE CASCADE; -CREATE TABLE Question -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Question TEXT NOT NULL, - Answer TEXT, - Application_ID INT NOT NULL, - FOREIGN KEY (Application_ID) REFERENCES Application (ID) -); +ALTER TABLE Alumni_Minors DROP FOREIGN KEY Alumni_Minors_ibfk_1; +ALTER TABLE Alumni_Minors ADD FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID) ON DELETE CASCADE; +ALTER TABLE Message DROP FOREIGN KEY Message_ibfk_4; +ALTER TABLE Message ADD FOREIGN KEY (Alumni_ID) REFERENCES Alumni(ID) ON DELETE CASCADE; -CREATE TABLE Ticket -( - ID INT AUTO_INCREMENT PRIMARY KEY, - Reporter_ID INT NOT NULL, - FOREIGN KEY (Reporter_ID) REFERENCES System_Admin (ID), - Message VARCHAR(255), - Completed BOOLEAN -); +-- Note: For Advisor, we need to handle the Student table since it references Advisor +ALTER TABLE Student DROP FOREIGN KEY Student_ibfk_2; +ALTER TABLE Student ADD FOREIGN KEY (Advisor_ID) REFERENCES Advisor(ID) ON DELETE CASCADE; -CREATE TABLE Message -( - ID INT AUTO_INCREMENT PRIMARY KEY, - RE INT, - FOREIGN KEY (RE) REFERENCES Message (ID), - Student_ID INT NOT NULL, - FOREIGN KEY (Student_ID) REFERENCES Student (ID), - Message TEXT, - Alumni_ID INT NOT NULL, - FOREIGN KEY (Alumni_ID) REFERENCES Alumni (ID) -); +ALTER TABLE Question DROP FOREIGN KEY Question_ibfk_1; +ALTER TABLE Question +ADD CONSTRAINT Question_ibfk_1 +FOREIGN KEY (Application_ID) REFERENCES Application(ID) ON DELETE CASCADE; -- Insert Statements @@ -2107,7 +366,7 @@ VALUES -- System_Admin Insert Statements INSERT INTO System_Admin (First_Name, Last_Name, Preferred_Name) VALUES -('John', 'Doe', 'Johnny'), +('Tarini', 'McAdmin', 'Tarini'), ('Jane', 'Smith', 'Janie'), ('Michael', 'Johnson', 'Mike'), ('Emily', 'Brown', 'Em'), @@ -3574,5 +1833,106 @@ VALUES (49, 10, 'You’re welcome. Best of luck!', 10); -Show TABLES; +insert into Alumni_Student (Alumni_ID, Student_ID) values (17, 14); +insert into Alumni_Student (Alumni_ID, Student_ID) values (49, 11); +insert into Alumni_Student (Alumni_ID, Student_ID) values (45, 48); +insert into Alumni_Student (Alumni_ID, Student_ID) values (48, 5); +insert into Alumni_Student (Alumni_ID, Student_ID) values (17, 24); +insert into Alumni_Student (Alumni_ID, Student_ID) values (25, 1); +insert into Alumni_Student (Alumni_ID, Student_ID) values (26, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (30, 47); +insert into Alumni_Student (Alumni_ID, Student_ID) values (37, 1); +insert into Alumni_Student (Alumni_ID, Student_ID) values (13, 44); +insert into Alumni_Student (Alumni_ID, Student_ID) values (6, 8); +insert into Alumni_Student (Alumni_ID, Student_ID) values (41, 39); +insert into Alumni_Student (Alumni_ID, Student_ID) values (43, 28); +insert into Alumni_Student (Alumni_ID, Student_ID) values (7, 8); +insert into Alumni_Student (Alumni_ID, Student_ID) values (6, 11); +insert into Alumni_Student (Alumni_ID, Student_ID) values (47, 2); +insert into Alumni_Student (Alumni_ID, Student_ID) values (3, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (22, 37); +insert into Alumni_Student (Alumni_ID, Student_ID) values (14, 20); +insert into Alumni_Student (Alumni_ID, Student_ID) values (19, 46); +insert into Alumni_Student (Alumni_ID, Student_ID) values (26, 31); +insert into Alumni_Student (Alumni_ID, Student_ID) values (44, 4); +insert into Alumni_Student (Alumni_ID, Student_ID) values (26, 16); +insert into Alumni_Student (Alumni_ID, Student_ID) values (11, 23); +insert into Alumni_Student (Alumni_ID, Student_ID) values (8, 14); +insert into Alumni_Student (Alumni_ID, Student_ID) values (32, 14); +insert into Alumni_Student (Alumni_ID, Student_ID) values (40, 16); +insert into Alumni_Student (Alumni_ID, Student_ID) values (32, 16); +insert into Alumni_Student (Alumni_ID, Student_ID) values (37, 6); +insert into Alumni_Student (Alumni_ID, Student_ID) values (10, 42); +insert into Alumni_Student (Alumni_ID, Student_ID) values (23, 13); +insert into Alumni_Student (Alumni_ID, Student_ID) values (37, 25); +insert into Alumni_Student (Alumni_ID, Student_ID) values (48, 50); +insert into Alumni_Student (Alumni_ID, Student_ID) values (38, 38); +insert into Alumni_Student (Alumni_ID, Student_ID) values (32, 28); +insert into Alumni_Student (Alumni_ID, Student_ID) values (44, 21); +insert into Alumni_Student (Alumni_ID, Student_ID) values (50, 17); +insert into Alumni_Student (Alumni_ID, Student_ID) values (22, 14); +insert into Alumni_Student (Alumni_ID, Student_ID) values (27, 5); +insert into Alumni_Student (Alumni_ID, Student_ID) values (38, 14); +insert into Alumni_Student (Alumni_ID, Student_ID) values (36, 38); +insert into Alumni_Student (Alumni_ID, Student_ID) values (9, 25); +insert into Alumni_Student (Alumni_ID, Student_ID) values (31, 41); +insert into Alumni_Student (Alumni_ID, Student_ID) values (44, 35); +insert into Alumni_Student (Alumni_ID, Student_ID) values (28, 49); +insert into Alumni_Student (Alumni_ID, Student_ID) values (38, 44); +insert into Alumni_Student (Alumni_ID, Student_ID) values (49, 48); +insert into Alumni_Student (Alumni_ID, Student_ID) values (22, 18); +insert into Alumni_Student (Alumni_ID, Student_ID) values (24, 42); +insert into Alumni_Student (Alumni_ID, Student_ID) values (26, 17); +insert into Alumni_Student (Alumni_ID, Student_ID) values (22, 47); +insert into Alumni_Student (Alumni_ID, Student_ID) values (17, 16); +insert into Alumni_Student (Alumni_ID, Student_ID) values (20, 17); +insert into Alumni_Student (Alumni_ID, Student_ID) values (37, 22); +insert into Alumni_Student (Alumni_ID, Student_ID) values (8, 9); +insert into Alumni_Student (Alumni_ID, Student_ID) values (36, 46); +insert into Alumni_Student (Alumni_ID, Student_ID) values (45, 38); +insert into Alumni_Student (Alumni_ID, Student_ID) values (11, 44); +insert into Alumni_Student (Alumni_ID, Student_ID) values (13, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (20, 20); +insert into Alumni_Student (Alumni_ID, Student_ID) values (16, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (47, 38); +insert into Alumni_Student (Alumni_ID, Student_ID) values (26, 46); +insert into Alumni_Student (Alumni_ID, Student_ID) values (22, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (35, 29); +insert into Alumni_Student (Alumni_ID, Student_ID) values (7, 36); +insert into Alumni_Student (Alumni_ID, Student_ID) values (41, 29); +insert into Alumni_Student (Alumni_ID, Student_ID) values (41, 28); +insert into Alumni_Student (Alumni_ID, Student_ID) values (25, 26); +insert into Alumni_Student (Alumni_ID, Student_ID) values (49, 10); +insert into Alumni_Student (Alumni_ID, Student_ID) values (21, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (32, 24); +insert into Alumni_Student (Alumni_ID, Student_ID) values (32, 5); +insert into Alumni_Student (Alumni_ID, Student_ID) values (49, 33); +insert into Alumni_Student (Alumni_ID, Student_ID) values (43, 11); +insert into Alumni_Student (Alumni_ID, Student_ID) values (36, 6); +insert into Alumni_Student (Alumni_ID, Student_ID) values (48, 43); +insert into Alumni_Student (Alumni_ID, Student_ID) values (16, 11); +insert into Alumni_Student (Alumni_ID, Student_ID) values (2, 4); +insert into Alumni_Student (Alumni_ID, Student_ID) values (21, 31); +insert into Alumni_Student (Alumni_ID, Student_ID) values (14, 17); +insert into Alumni_Student (Alumni_ID, Student_ID) values (44, 18); +insert into Alumni_Student (Alumni_ID, Student_ID) values (49, 50); +insert into Alumni_Student (Alumni_ID, Student_ID) values (34, 26); +insert into Alumni_Student (Alumni_ID, Student_ID) values (4, 21); +insert into Alumni_Student (Alumni_ID, Student_ID) values (10, 3); +insert into Alumni_Student (Alumni_ID, Student_ID) values (26, 22); +insert into Alumni_Student (Alumni_ID, Student_ID) values (44, 15); +insert into Alumni_Student (Alumni_ID, Student_ID) values (9, 39); +insert into Alumni_Student (Alumni_ID, Student_ID) values (36, 15); +insert into Alumni_Student (Alumni_ID, Student_ID) values (22, 28); +insert into Alumni_Student (Alumni_ID, Student_ID) values (44, 9); +insert into Alumni_Student (Alumni_ID, Student_ID) values (6, 28); +insert into Alumni_Student (Alumni_ID, Student_ID) values (23, 33); +insert into Alumni_Student (Alumni_ID, Student_ID) values (17, 26); +insert into Alumni_Student (Alumni_ID, Student_ID) values (6, 4); +insert into Alumni_Student (Alumni_ID, Student_ID) values (41, 30); +insert into Alumni_Student (Alumni_ID, Student_ID) values (41, 49); +insert into Alumni_Student (Alumni_ID, Student_ID) values (9, 2); + + +Show TABLES; \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 72fb6ccbb..d8045d92f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,7 @@ services: volumes: ['./app/src:/appcode'] ports: - 8501:8501 - + api: build: ./api container_name: web-api @@ -25,5 +25,3 @@ services: - ./database-files:/docker-entrypoint-initdb.d/:ro ports: - 3200:3306 - -