Files

21 lines
455 B
Go
Raw Normal View History

2021-09-30 12:09:45 +08:00
package model
import (
"SciencesServer/app/common/model"
)
type UserTenant struct {
*model.UserTenant
}
2021-10-08 09:39:40 +08:00
func (m *UserTenant) LastChooseInfo(uid uint64) error {
2021-10-12 13:54:05 +08:00
_, err := model.FirstField(m.UserTenant, []string{"id", "tenant_id", "uuid", "identity"},
2021-10-08 09:39:40 +08:00
model.NewWhere("uid", uid),
model.NewWhere("selected", model.UserTenantSelectedForYes))
return err
}
2021-09-30 12:09:45 +08:00
func NewUserTenant() *UserTenant {
return &UserTenant{UserTenant: model.NewUserTenant()}
}