コアモデルの作成・DB接続をGORMを利用する形に変更

This commit is contained in:
2025-12-26 12:49:02 +09:00
parent e34602514b
commit a1f0e62530
8 changed files with 230 additions and 27 deletions

View File

@@ -0,0 +1,13 @@
package model
import "time"
type Comment struct {
ID uint `gorm:"primaryKey"`
PageURL string `gorm:"index;size:255;not null"`
AuthorName string `gorm:"size:100;not null"`
Content string `gorm:"type:varchar(5000);not null"`
UserIdentifier string `gorm:"size:255"`
IsSpam bool `gorm:"default:false"`
CreatedAt time.Time `gorm:"index"`
}