Files
2025-07-27 19:12:46 +02:00

37 lines
682 B
Go

package user
import (
"fmt"
"time"
)
type UserState struct {
SomeValue string
}
type User struct {
Id int `db:"id"`
Email string `db:"email"`
State UserState `db:"state"`
Admin bool `db:"admin"`
Password string `db:"password"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (s User) String() string {
return fmt.Sprint("User{ ",
"Id: ", s.Id, ", ",
"Email: ", s.Email, ", ",
"State: ", s.State, ", ",
"Admin: ", s.Admin, ", ",
"Password: ", s.Password, ", ",
"CreatedAt: ", s.CreatedAt, ", ",
"UpdatedAt: ", s.UpdatedAt, ", ",
"}")
}
func (s User) GetId() int {
return s.Id
}