fusenapi/model/gmodel/ldap_user_gen.go

21 lines
591 B
Go
Raw Permalink Normal View History

2023-11-16 08:57:29 +00:00
package gmodel
import (
"gorm.io/gorm"
"time"
2023-11-16 08:57:29 +00:00
)
// ldap_user ldap_用户id递增表
type LdapUser struct {
2023-11-24 07:02:11 +00:00
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"` //
2023-11-16 08:57:29 +00:00
}
type LdapUserModel struct {
db *gorm.DB
name string
}
func NewLdapUserModel(db *gorm.DB) *LdapUserModel { return &LdapUserModel{db: db, name: "ldap_user"} }