package repository

import "github.com/ajaxray/geek-life/model"

// UserRepository interface defines methods for user data access
type UserRepository interface {
	GetByID(id int64) (*model.User, error)
	GetByUsername(tenantID int64, username string) (*model.User, error)
	GetByEmail(tenantID int64, email string) (*model.User, error)
	Create(tenantID int64, username, email, passwordHash string) (*model.User, error)
	Update(user *model.User) error
	Delete(user *model.User) error
}

// TenantRepository interface defines methods for tenant data access
type TenantRepository interface {
	GetByID(id int64) (*model.Tenant, error)
	GetByName(name string) (*model.Tenant, error)
	Create(name string) (*model.Tenant, error)
	Update(tenant *model.Tenant) error
	Delete(tenant *model.Tenant) error
}

// SessionRepository interface defines methods for session management
type SessionRepository interface {
	GetByToken(token string) (*model.UserSession, error)
	Create(userID int64, token string, expiresAt int64) (*model.UserSession, error)
	Delete(session *model.UserSession) error
	DeleteExpired() error
}