from __future__ import annotations
import sys
from pathlib import Path
from werkzeug.security import generate_password_hash
from flask import Flask

# 앱/DB/모델 임포트
from config import Config
from backend.models.user import db, User

BASE_DIR = Path(__file__).resolve().parent


def is_hashed(password: str) -> bool:
    return password.startswith("pbkdf2:sha256")


def main() -> int:
    # 별도 Flask 앱 컨텍스트 구성
    app = Flask(__name__)
    app.config.from_object(Config)
    db.init_app(app)


if __name__ == "__main__":
    raise SystemExit(main())