Skip to content

Auth: Add basic user entity and storage #24

@sugan0tech

Description

@sugan0tech

Summary\n- Add a basic models.User entity and migrate it via GORM.\n\nModel\n- Fields: id (uuid), email (unique, indexed), password_hash (string), display_name (string), role (string; default viewer), timestamps.\n\nStorage\n- Extend storage.Init to AutoMigrate(&models.User{}).\n- Add store methods: CreateUser, GetUserByEmail, ListUsers.\n\nReferences\n- internal/storage/store.go (migrations, store methods)\n- internal/models (add user.go)\n\nAcceptance Criteria\n- DB migration creates users with unique email.\n- Can create and fetch a user via the store layer.\n- No API endpoints yet (handled in Auth sub-issue).\n\nNotes\n- Use uuid for id, consistent with servers.\n- Do not expose password_hash in any JSON marshal tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions