const table name

This commit is contained in:
xjasonlyu committed 2022-05-21 21:15:55 +08:00
1 parent 2c0e8d72ea
commit 38d1c81154
1 file changed
+7 -2
+7 -2
View File
@@ -5,6 +5,11 @@ import (
"gorm.io/datatypes"
)
const (
ActorTableName = "actor_metadata"
MovieTableName = "movie_metadata"
)
type MovieSearchResult struct {
ID string `json:"id"`
Number string `json:"number"`
@@ -52,7 +57,7 @@ type MovieInfo struct {
}
func (*MovieInfo) TableName() string {
return "movie_metadata"
return MovieTableName
}
func (m *MovieInfo) Valid() bool {
@@ -106,7 +111,7 @@ type ActorInfo struct {
}
func (*ActorInfo) TableName() string {
return "actor_metadata"
return ActorTableName
}
func (a *ActorInfo) Valid() bool {