user

package
v0.0.0-...-418b934 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	entity.Base
	Username string `gorm:"not null;unique_index"`
	Password string `gorm:"not null"`
	IsActive bool   `gorm:"not null;default:true"`
}

Service for service accounts

func (*Service) MarshalBinary

func (s *Service) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*Service) UnmarshalBinary

func (s *Service) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

type ThirdPartyAuth

type ThirdPartyAuth struct {
	entity.Base
	PartyName string `gorm:"not null"`
	AuthToken string `gorm:"not null"`

	User User
}

ThirdPartyAuth for google facebook and etc...

type User

type User struct {
	entity.Base
	EntityID    string `gorm:"not null"`
	Username    string `gorm:"not null"`
	Password    string `gorm:"not null"`
	Gender      string
	PhoneNumber string
	Email       string
	DOB         time.Time
	Avatar      string
	Bio         string
	Status      string
	ReferralID  uint64 `gorm:"not null;type:serial"`

	IsPrivacyPolicyAgreed       bool `gorm:"not null;default:false"`
	IsPhoneNumberVerified       bool `gorm:"not null;default:false"`
	IsEmailVerified             bool `gorm:"not null;default:false"`
	IsActive                    bool `gorm:"not null;default:true"`
	IsProfilePrivate            bool `gorm:"not null;default:false"`
	IsPhoneNotificationDisabled bool `gorm:"not null;default:false"`
	IsEmailNotificationDisabled bool `gorm:"not null;default:false"`

	ServiceID uuid.UUID `gorm:"not null"`
}

User database entity

func (*User) MarshalBinary

func (u *User) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*User) ToDTO

func (u *User) ToDTO() *user.DetailedUserDTO

ToDTO converter

func (*User) ToSimpleDTO

func (u *User) ToSimpleDTO() *user.UserSimpleDTO

ToSimpleDTO converter

func (*User) UnmarshalBinary

func (u *User) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL