first commit
This commit is contained in:
21
internal/models/tag.go
Normal file
21
internal/models/tag.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// Tag model structure
|
||||
type Tag struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
|
||||
Tag string `gorm:"type:varchar(254);not null" json:"tag"`
|
||||
IsActive bool `gorm:"default:true" json:"is_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
// TableName overrides the table name used by User to `tags`
|
||||
func (Tag) TableName() string {
|
||||
return "tags"
|
||||
}
|
||||
Reference in New Issue
Block a user