DockerでMySQL、Caddyが利用されるよう変更したほか不具合を修正

This commit is contained in:
2026-01-11 23:16:01 +09:00
parent b982c8acee
commit 5b10b90bf5
6 changed files with 150 additions and 15 deletions

View File

@@ -8,7 +8,7 @@ import (
type User struct {
ID uint `gorm:"primarykey" json:"id"`
Email string `gorm:"uniqueIndex;not null" json:"email"`
Email string `gorm:"uniqueIndex;not null;size:255" json:"email"`
PasswordHash string `gorm:"not null" json:"-"`
Name string `gorm:"not null" json:"name"`
Role string `gorm:"not null;default:user" json:"role"` // "admin" or "user"