Documentation ¶
Index ¶
- type Platform
- func (p Platform) Create(db *gorm.DB) (Platform, error)
- func (p Platform) Delete(db *gorm.DB) (*Platform, error)
- func (p Platform) Get(db *gorm.DB) (Platform, error)
- func (p Platform) GetList(db *gorm.DB, pager *page.Pager) ([]Platform, error)
- func (p Platform) TableName() string
- func (p Platform) Update(db *gorm.DB, values interface{}) error
- type User
- func (u User) Create(db *gorm.DB) error
- func (u User) Delete(db *gorm.DB) error
- func (u User) Get(db *gorm.DB) (User, error)
- func (u User) GetUserByEmail(db *gorm.DB) (User, error)
- func (u User) GetUserByName(db *gorm.DB) (User, error)
- func (u User) GetUserByPhone(db *gorm.DB) (User, error)
- func (u User) GetUserList(db *gorm.DB, pager *page.Pager) ([]UserRow, error)
- func (u User) TableName() string
- func (u User) Update(db *gorm.DB, values interface{}) error
- type UserAccount
- func (ua UserAccount) Create(db *gorm.DB) (UserAccount, error)
- func (ua UserAccount) Delete(db *gorm.DB) error
- func (ua UserAccount) DeleteList(db *gorm.DB) error
- func (ua UserAccount) Get(db *gorm.DB) (UserAccountRow, error)
- func (ua UserAccount) GetAccountsByUserID(db *gorm.DB, pager *page.Pager) ([]UserAccountRow, error)
- func (ua UserAccount) GetAll(db *gorm.DB, pager *page.Pager) ([]UserAccountRow, error)
- func (ua UserAccount) TableName() string
- func (ua UserAccount) Update(db *gorm.DB, values interface{}) (UserAccount, error)
- type UserAccountRow
- type UserRow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Platform ¶
type Platform struct { *database.BaseModel PlatformId int `gorm:"column:platform_id"` PlatformName string `gorm:"column:name"` PlatformAbbr string `gorm:"column:abbr"` PlatformType string `gorm:"column:type"` PlatformDesc string `gorm:"column:description"` PlatformDomain string `gorm:"column:domain"` PlatformImgUrl string `gorm:"column:img_url"` PlatformLoginUrl string `gorm:"column:login_url"` }
type User ¶
type User struct { UserId int `json:"user_id" gorm:"column:user_id"` UserName string `json:"user_name" gorm:"column:user_name"` Password string `json:"password" gorm:"column:password"` Salt string `json:"salt" gorm:"column:salt"` PhoneNumber string `json:"phone_number" gorm:"column:phone_number"` Email string `json:"email" gorm:"column:email; default:null"` Role int `json:"role" gorm:"column:role"` ProfileImgUrl string `json:"profile_img_url" gorm:"column:profile_img_url; default:''"` Description string `json:"description" gorm:"column:description; default:''"` Sex int `json:"sex" gorm:"column:sex; default:0"` *database.BaseModel }
func (User) GetUserList ¶
type UserAccount ¶
type UserAccount struct { *database.BaseModel UserId int `json:"user_id"` PlatformId int `json:"platform_id"` Password string `json:"password"` }
func (UserAccount) Create ¶
func (ua UserAccount) Create(db *gorm.DB) (UserAccount, error)
func (UserAccount) DeleteList ¶
func (ua UserAccount) DeleteList(db *gorm.DB) error
func (UserAccount) Get ¶
func (ua UserAccount) Get(db *gorm.DB) (UserAccountRow, error)
func (UserAccount) GetAccountsByUserID ¶
func (ua UserAccount) GetAccountsByUserID(db *gorm.DB, pager *page.Pager) ([]UserAccountRow, error)
func (UserAccount) GetAll ¶
func (ua UserAccount) GetAll(db *gorm.DB, pager *page.Pager) ([]UserAccountRow, error)
func (UserAccount) TableName ¶
func (ua UserAccount) TableName() string
func (UserAccount) Update ¶
func (ua UserAccount) Update(db *gorm.DB, values interface{}) (UserAccount, error)
type UserAccountRow ¶
type UserAccountRow struct { UserId int `gorm:"column:user_id"` PlatformId int `gorm:"column:platform_id"` PlatformName string `gorm:"column:name"` PlatformAbbr string `gorm:"column:abbr"` Password string `gorm:"column:password"` PlatformType string `gorm:"column:type"` PlatformDesc string `gorm:"column:description"` PlatformDomain string `gorm:"column:domain"` PlatformImgUrl string `gorm:"column:img_url"` PlatformLoginUrl string `gorm:"column:login_url"` }
type UserRow ¶
type UserRow struct { UserId int `json:"user_id" gorm:"column:user_id"` UserName string `json:"user_name" gorm:"column:user_name"` PhoneNumber string `json:"phone_number" gorm:"column:phone_number"` Email string `json:"email" gorm:"column:email"` Sex int `json:"sex" gorm:"column:sex"` Description string `json:"description" gorm:"column:description"` Role int `json:"role" gorm:"column:role"` }
Click to show internal directories.
Click to hide internal directories.