repository와 subscribe까지 잘 됨

This commit is contained in:
2025-12-08 21:57:18 +09:00
parent 619cdc7d6a
commit 94fae7c4fd
13 changed files with 336 additions and 11 deletions

View File

@@ -0,0 +1,27 @@
package gorm
import (
"time"
"github.com/neatflowcv/seven-skies/internal/pkg/domain"
)
type Weather struct {
ID string `gorm:"primaryKey"`
Source string
TargetDate time.Time
ForecastDate time.Time
Condition string
Temperature float64
}
func newModelWeather(weather *domain.Weather) *Weather {
return &Weather{
ID: weather.ID(),
Source: string(weather.Source()),
TargetDate: weather.TargetDate(),
ForecastDate: weather.ForecastDate(),
Condition: string(weather.Condition()),
Temperature: float64(weather.Temperature().Value),
}
}