30 lines
605 B
Go

package domain
import (
"context"
"time"
"github.com/google/uuid"
)
type UserRepo interface {
Create(ctx context.Context, user *User) error
GetByID(ctx context.Context, id uuid.UUID) (*User, error)
GetByPhone(ctx context.Context, phone string) (*User, error)
Update(ctx context.Context, user *User) error
Delete(ctx context.Context, id uuid.UUID) error
}
type User struct {
ID uuid.UUID
PubKey string
Name string
LastName string
PhoneNumber string
NationalID string
LastLogin *time.Time
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
}