answer/internal/entity/role_entity.go

18 lines
477 B
Go
Raw Normal View History

2022-11-29 15:10:57 +08:00
package entity
import "time"
// Role role
type Role struct {
ID int `xorm:"not null pk autoincr INT(11) id"`
CreatedAt time.Time `xorm:"created TIMESTAMP created_at"`
UpdatedAt time.Time `xorm:"updated TIMESTAMP updated_at"`
Name string `xorm:"not null default '' VARCHAR(50) name"`
Description string `xorm:"not null default '' VARCHAR(200) description"`
}
// TableName user table name
func (Role) TableName() string {
return "role"
}