23 lines
483 B
Go
23 lines
483 B
Go
package manage
|
|
|
|
import (
|
|
"SciencesServer/app/basic/config"
|
|
model2 "SciencesServer/app/common/model"
|
|
)
|
|
|
|
// BasicParams 基本信息
|
|
type BasicParams struct {
|
|
ID, TenantID uint64
|
|
Name, Image, Code, Mobile, Introduce string
|
|
config.Area
|
|
Industrys, Keywords []string
|
|
}
|
|
|
|
func (c *BasicParams) isExist(iModel model2.IModel, where ...*model2.ModelWhere) (bool, error) {
|
|
var count int64
|
|
|
|
err := model2.Count(iModel, &count, where...)
|
|
|
|
return count > 0, err
|
|
}
|