mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-23 10:51:09 +00:00
27 lines
402 B
Go
27 lines
402 B
Go
package models
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
"go-admin/common/models"
|
|
)
|
|
|
|
type Student struct {
|
|
gorm.Model
|
|
models.ControlBy
|
|
|
|
Name string `json:"name" gorm:"type:varchar(255);comment:姓名"` //
|
|
}
|
|
|
|
func (Student) TableName() string {
|
|
return "student"
|
|
}
|
|
|
|
func (e *Student) Generate() models.ActiveRecord {
|
|
o := *e
|
|
return &o
|
|
}
|
|
|
|
func (e *Student) GetId() interface{} {
|
|
return e.ID
|
|
}
|