user

package
v0.0.0-...-e248b5d Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FindUserOptions

type FindUserOptions struct {
	// github.com/jou66jou/go-ggen/internal/pagination
	pagination.Pagination

	ID int64 `gorm:"column:id;primary_key" json:"id" query:"id"`

	Status int64 `gorm:"column:status" json:"status" query:"status"`

	PublicSetting string `gorm:"column:public_setting" json:"publicSetting" query:"publicSetting"`

	Username string `gorm:"column:username" json:"username" query:"username"`

	Password string `gorm:"column:password" json:"password" query:"password"`

	Name string `gorm:"column:name" json:"name" query:"name"`

	Gender int64 `gorm:"column:gender" json:"gender" query:"gender"`

	Email string `gorm:"column:email" json:"email" query:"email"`

	Mobile string `gorm:"column:mobile" json:"mobile" query:"mobile"`

	Address string `gorm:"column:address" json:"address" query:"address"`

	Education string `gorm:"column:education" json:"education" query:"education"`

	Job string `gorm:"column:job" json:"job" query:"job"`

	JobCat string `gorm:"column:job_cat" json:"jobCat" query:"jobCat"`

	ResumeURL string `gorm:"column:resume_url" json:"resumeURL" query:"resumeURL"`

	ProfilePicURL string `gorm:"column:profile_pic_url" json:"profilePicURL" query:"profilePicURL"`

	Interest string `gorm:"column:interest" json:"interest" query:"interest"`

	AboutMe string `gorm:"column:about_me" json:"aboutMe" query:"aboutMe"`

	LoginCount int64 `gorm:"column:login_count" json:"loginCount" query:"loginCount"`

	LastLoginStartAt time.Time `json:"lastLoginStartAt" query:"lastLoginStartAt"`
	LastLoginEndAt   time.Time `json:"lastLoginEndAt" query:"lastLoginEndAt"`

	CreatedStartAt time.Time `json:"createdStartAt" query:"createdStartAt"`
	CreatedEndAt   time.Time `json:"createdEndAt" query:"createdEndAt"`

	UpdatedStartAt time.Time `json:"updatedStartAt" query:"updatedStartAt"`
	UpdatedEndAt   time.Time `json:"updatedEndAt" query:"updatedEndAt"`
}

type Repository

type Repository interface {
	GetUsers(opts FindUserOptions) (users []User, err error)
	GetUser(id int64) (user User, err error)
	CreateUser(user *User) error
	UpdateUser(user *User) error
	DeleteUser(id int64) error
}

Repository by ggen

type Servicer

type Servicer interface {
	GetUsers(opts FindUserOptions) (users []User, err error)
	GetUser(id int64) (user User, err error)
	CreateUser(user *User) error
	UpdateUser(user *User) error
	DeleteUser(id int64) error
}

Service by ggen

type User

type User struct {
	ID            int64     `gorm:"column:id;primary_key" json:"id"`
	Status        int64     `gorm:"column:status" json:"status"`
	PublicSetting string    `gorm:"column:public_setting" json:"publicSetting"`
	Username      string    `gorm:"column:username" json:"username"`
	Password      string    `gorm:"column:password" json:"password"`
	Name          string    `gorm:"column:name" json:"name"`
	Gender        int64     `gorm:"column:gender" json:"gender"`
	Email         string    `gorm:"column:email" json:"email"`
	Mobile        string    `gorm:"column:mobile" json:"mobile"`
	Address       string    `gorm:"column:address" json:"address"`
	Education     string    `gorm:"column:education" json:"education"`
	Job           string    `gorm:"column:job" json:"job"`
	JobCat        string    `gorm:"column:job_cat" json:"jobCat"`
	ResumeURL     string    `gorm:"column:resume_url" json:"resumeURL"`
	ProfilePicURL string    `gorm:"column:profile_pic_url" json:"profilePicURL"`
	Interest      string    `gorm:"column:interest" json:"interest"`
	AboutMe       string    `gorm:"column:about_me" json:"aboutMe"`
	LoginCount    int64     `gorm:"column:login_count" json:"loginCount"`
	LastLoginAt   time.Time `gorm:"column:last_login_at" json:"lastLoginAt"`
	CreatedAt     time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt     time.Time `gorm:"column:updated_at" json:"updatedAt"`
}

func (*User) TableName

func (u *User) TableName() string

TableName sets the insert table name for this struct type

Directories

Path Synopsis
delivery

Jump to

Keyboard shortcuts

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