-
Notifications
You must be signed in to change notification settings - Fork 0
Add user model and SQLite storage to core service #213
Copy link
Copy link
Closed
Labels
complexity:largeLarge scope: 200+ lines, multiple filesLarge scope: 200+ lines, multiple filesenhancementNew feature or requestNew feature or requestneeds-testsArea needs dedicated test coverageArea needs dedicated test coveragetriagedIssue has been triaged, ready for planning or implementationIssue has been triaged, ready for planning or implementation
Metadata
Metadata
Assignees
Labels
complexity:largeLarge scope: 200+ lines, multiple filesLarge scope: 200+ lines, multiple filesenhancementNew feature or requestNew feature or requestneeds-testsArea needs dedicated test coverageArea needs dedicated test coveragetriagedIssue has been triaged, ready for planning or implementationIssue has been triaged, ready for planning or implementation
Context
The core service (#211) requires a user model for multi-user authentication support. This builds on the scaffolded core crate (#212).
Acceptance Criteria
Usermodel struct with fields:id(UUID, primary key)username(TEXT, unique, not null)email(TEXT, unique, not null)full_name(TEXT, not null)password_hash(TEXT, not null)active_organization_id(UUID, nullable, foreign key to organizations)created_at(TEXT/datetime)updated_at(TEXT/datetime)UserStoragewith SQLite schema initializationcreate,get_by_id,get_by_username,get_by_email,update,deletelist_paginatedusingagentd_common::types::PaginatedResponseargon2crate (hash on create, verify on login)set_active_organizationmethodagentd_common::storage::{get_db_path, create_pool}for DB setupRelevant Files
crates/orchestrator/src/storage.rs— reference pattern for storage implementationcrates/common/src/storage.rs— shared storage utilitiescrates/core/src/models/user.rs,crates/core/src/storage/users.rsDependencies