#!/usr/bin/env python3
"""Script to update admin password"""

from app import app, db
from models import Admin

def update_admin_password():
    with app.app_context():
        # Find existing admin
        admin = Admin.query.filter_by(username='admin').first()
        if admin:
            admin.set_password('@sisiafashionhouse30')
            db.session.commit()
            print("Admin password updated successfully!")
        else:
            print("Admin user not found!")

if __name__ == "__main__":
    update_admin_password()
