Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { ID string `gorm:"primaryKey,size:36" json:"id,omitempty"` UserName string `gorm:"size:20" json:"userName,omitempty"` Name string `gorm:"size:200;not null;uniqueIndex:idx_parent_name" json:"name"` ParentId string `gorm:"size:36;default:'';uniqueIndex:idx_parent_name" json:"parentId"` AbsolutePath string `gorm:"size:300;not null;" json:"absolutePath"` IsDict sql.NullBool `gorm:"not null;default:false" json:"isDict"` Children []*File `gorm:"-" json:"children"` FileType string `gorm:"size:100;not null;default:''" json:"fileType"` FileSize int64 `gorm:"not null;default:0" json:"fileSize"` Permission Permission `grom:"not null;default:0" json:"permission,omitempty"` FileStatus FileStatus `grom:"not null;default:1" json:"fileStatus,omitempty"` LastModifyTime time.Time `gorm:"not null;" json:"createAt,omitempty"` DownloadUrls []*driver.DownloadUrl `gorm:"-" json:"downloadUrls"` Password string `gorm:"size:30" json:"-"` }
type PageResult ¶
type Permission ¶
type Permission int
const ( PUBLICREAD Permission = 0 USERREAD Permission = 1 MEREAD Permission = 2 PASSWORD Permission = 3 )
type User ¶
type User struct { ID string `gorm:"primaryKey,size:36" json:"id,omitempty"` UserName string `gorm:"size:20;uniqueIndex:idx_username" json:"userName,omitempty" validate:"required,min=5,max=20"` ShowName string `gorm:"size:40" json:"showName,omitempty" validate:"min=5,max=40"` Email string `gorm:"size:40;uniqueIndex:idx_email" json:"email,omitempty" validate:"required,email,max=40"` Tel string `gorm:"size:11;uniqueIndex:idx_tel" json:"tel,omitempty" validate:"required,len=11"` Password string `gorm:"size:32" json:"password,omitempty" validate:"required,min=10,max=20"` Role Role `gorm:"size:15" json:"role,omitempty"` Enable sql.NullBool `json:"enable,omitempty"` CreatedAt time.Time `json:"createAt,omitempty"` }
Click to show internal directories.
Click to hide internal directories.