27 lines
387 B
Go
Raw Normal View History

2025-04-22 15:46:48 +08:00
package model
import (
"admin/internal/db"
"gorm.io/gorm"
"time"
)
func init() {
db.RegisterTableModels(Role{})
}
type Role struct {
ID int `gorm:"primarykey"`
RoleID string
Name string
Account string `gorm:"primarykey"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
2025-04-24 20:39:31 +08:00
func (lm *Role) TableName() string {
return "mock_role"
}