tessl install tessl/golang-gorm-io--gorm@1.31.0Full-featured ORM library for Golang with associations, hooks, transactions, migrations, and developer-friendly chainable API
Agent Success
Agent success rate when using this tile
81%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.13x
Baseline
Agent success rate without this tile
72%
Build a simple user management system that tracks users with automatic timestamp management.
The system should manage user records with the following capabilities:
User Model: Create a user data structure that includes:
Database Operations: Implement the following operations:
Timestamp Behavior:
@generates
The implementation should include:
package main
import (
"gorm.io/gorm"
)
// User represents a user in the system
type User struct {
// Struct fields will be defined in implementation
}
// UserManager handles user-related database operations
type UserManager struct {
db *gorm.DB
}
// NewUserManager creates a new UserManager instance
func NewUserManager(db *gorm.DB) *UserManager
// CreateUser creates a new user in the database
func (m *UserManager) CreateUser(username, email string) (*User, error)
// UpdateUser updates an existing user's information
func (m *UserManager) UpdateUser(id uint, username, email string) (*User, error)
// DeleteUser soft deletes a user
func (m *UserManager) DeleteUser(id uint) error
// GetUser retrieves a user by ID (excludes soft-deleted users)
func (m *UserManager) GetUser(id uint) (*User, error)
// ListUsers returns all active (non-deleted) users
func (m *UserManager) ListUsers() ([]User, error)Provides ORM functionality with automatic timestamp management and soft delete support.