sql: Refactor use of tables
This commit is contained in:
parent
85fe5b5c5a
commit
73d821e320
19 changed files with 191 additions and 83 deletions
18
internal/dis/component/table.go
Normal file
18
internal/dis/component/table.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package component
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
)
|
||||
|
||||
// Table is a component that manages a provided sql table
|
||||
type Table interface {
|
||||
Component
|
||||
|
||||
// TableInfo returns information about a specific table
|
||||
TableInfo() TableInfo
|
||||
}
|
||||
|
||||
type TableInfo struct {
|
||||
Model reflect.Type // model is the model this type manages
|
||||
Name string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue