21 lines
591 B
Go
21 lines
591 B
Go
package gmodel
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
// ldap_user ldap_用户id递增表
|
|
type LdapUser struct {
|
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` //
|
|
UserDn *string `gorm:"index;default:'';" json:"user_dn"` //
|
|
Ctime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"ctime"` //
|
|
Utime *time.Time `gorm:"default:'0000-00-00 00:00:00';" json:"utime"` //
|
|
}
|
|
type LdapUserModel struct {
|
|
db *gorm.DB
|
|
name string
|
|
}
|
|
|
|
func NewLdapUserModel(db *gorm.DB) *LdapUserModel { return &LdapUserModel{db: db, name: "ldap_user"} }
|