Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { Id uuid.UUID `gorm:"primaryKey;type:uuid"` Name string `gorm:"not null;default:'unknown'"` Email string `gorm:"not null;unique"` Phone string `gorm:"unique"` Deactivated bool AuthId uuid.UUID `gorm:"uniqueIndex:authid_unique,where:deleted_at is null;not null;type:uuid"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` }
type UserRepo ¶
type UserRepo interface { Add(user *User, nestedFunc func(*User, *gorm.DB) error) error Get(id uuid.UUID) (*User, error) GetByAuthId(id uuid.UUID) (*User, error) Update(user *User, nestedFunc func(*User, *gorm.DB) error) error Delete(id uuid.UUID, nestedFunc func(uuid.UUID, *gorm.DB) error) error GetUserCount() (int64, int64, error) GetByEmail(email string) (*User, error) }
func NewUserRepo ¶
Click to show internal directories.
Click to hide internal directories.