fix: refactor layout init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type News struct {
|
||||
ID uuid.UUID `gorm:"type:uuid;primaryKey" json:"id"`
|
||||
AuthorID uuid.UUID `gorm:"type:uuid;not null" json:"author_id"`
|
||||
Title string `gorm:"default:null" json:"title"`
|
||||
Content string `gorm:"default:null" json:"content"`
|
||||
IsPremium bool `gorm:"default:false" json:"is_premium"`
|
||||
Slug string `gorm:"default:null" json:"slug"`
|
||||
FeaturedImage string `gorm:"default:null" json:"featured_image"`
|
||||
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user