package gmodel

import (
	"gorm.io/gorm"
	"time"
)

// ldap_menus
type LdapMenus struct {
	Id      int64      `gorm:"primary_key;default:0;auto_increment;" json:"id"`   //
	Name    *string    `gorm:"default:'';" json:"name"`                           //
	Title   *string    `gorm:"default:'';" json:"title"`                          //
	Icon    *string    `gorm:"default:'';" json:"icon"`                           //
	Path    *string    `gorm:"default:'';" json:"path"`                           //
	Sort    *int64     `gorm:"default:999;" json:"sort"`                          //
	Status  *int64     `gorm:"default:1;" json:"status"`                          //
	Creator *string    `gorm:"default:'';" json:"creator"`                        //
	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"`       //
	Dtime   *time.Time `gorm:"index;default:'0000-00-00 00:00:00';" json:"dtime"` //
}
type LdapMenusModel struct {
	db   *gorm.DB
	name string
}

func NewLdapMenusModel(db *gorm.DB) *LdapMenusModel {
	return &LdapMenusModel{db: db, name: "ldap_menus"}
}