ifixkart-backend/check_user.py
adithiyan 10bfba7d58 feat: add warranties, refunds, notifications, CRM calendar, system config & delivery modules
- New models: WarrantyModel, WalletModel, SystemConfigModel
- New schemas: WarrantySchema, RefundSchema, SystemConfig, CrmTaskCalendar, NotificationTemplate, NotificationGateway, RepairErp, ReviewModeration, InventoryPos, MultiDashboard, BillingFinance
- New services: WarrantyService, RefundService, CrmService, CrmTaskCalendarService, DeliveryService, EmailTemplateService, InventoryPosService, MultiDashboardService, NotificationGatewayService, RepairErpService, ReviewModerationService, SystemConfigService, TemplateService, CreditService
- Updated routers: AdminOrder, BillingFinance, Cart, Catalog, Checkout, Crm, InventoryPos, NotificationGateway, RolePermission, ServiceJob, Settings, Storefront, UserCreation
- Updated models: Inventory, Notification, Order, Product, Service, Setting, SystemConfig, User
- Updated core: database init, invoice generator, main app
- Added WarrantyRouter with full CRUD and claim flow
2026-10-13 22:05:16 +05:30

14 lines
631 B
Python

from app.core.database.db_session import engine_core
from sqlalchemy import text
from app.utils.Hash_util import hash_password
def check():
pwd_hash = hash_password('Admin$2026Setup')
with engine_core.connect() as conn:
conn.execute(text("UPDATE users SET password_hash = :pwd, is_locked = 0, is_active = 1, failed_login_attempts = 0 WHERE email='admin@ifixkart.com'"), {'pwd': pwd_hash})
conn.commit()
res = conn.execute(text("SELECT user_id, email, is_locked, is_active FROM users WHERE email='admin@ifixkart.com'")).fetchone()
print('User:', res)
if __name__ == '__main__':
check()