package models // ClimateRegion represents an IECC climate zone for regional task templates type ClimateRegion struct { BaseModel Name string `gorm:"column:name;size:100;not null;uniqueIndex" json:"name"` ZoneNumber int `gorm:"column:zone_number;not null;index" json:"zone_number"` Description string `gorm:"column:description;type:text" json:"description"` IsActive bool `gorm:"column:is_active;default:true;index" json:"is_active"` } // TableName returns the table name for GORM func (ClimateRegion) TableName() string { return "task_climateregion" } // ZipClimateRegion maps ZIP codes to climate regions (static lookup) type ZipClimateRegion struct { BaseModel ZipCode string `gorm:"column:zip_code;size:10;uniqueIndex;not null" json:"zip_code"` ClimateRegionID uint `gorm:"column:climate_region_id;index;not null" json:"climate_region_id"` ClimateRegion ClimateRegion `gorm:"foreignKey:ClimateRegionID" json:"climate_region,omitempty"` } // TableName returns the table name for GORM func (ZipClimateRegion) TableName() string { return "task_zipclimateregion" }