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,54 @@
package domain
import "time"
type Weather struct {
id string
source WeatherSource
targetDate time.Time
forecastDate time.Time
condition WeatherCondition
temperature Temperature
}
func NewWeather(
id string,
source WeatherSource,
targetDate time.Time,
forecastDate time.Time,
condition WeatherCondition,
temperature Temperature,
) *Weather {
return &Weather{
id: id,
source: source,
targetDate: targetDate,
forecastDate: forecastDate,
condition: condition,
temperature: temperature,
}
}
func (w *Weather) ID() string {
return w.id
}
func (w *Weather) Source() WeatherSource {
return w.source
}
func (w *Weather) TargetDate() time.Time {
return w.targetDate
}
func (w *Weather) ForecastDate() time.Time {
return w.forecastDate
}
func (w *Weather) Condition() WeatherCondition {
return w.condition
}
func (w *Weather) Temperature() Temperature {
return w.temperature
}