package model import ( "time" ) // CompanyNote represents a note attached to a company. // Reference: P2B M1 spec — follows ContactNote pattern type CompanyNote struct { ID uint `gorm:"primaryKey" json:"id"` CompanyID uint `gorm:"not null;index" json:"company_id"` UserID uint `gorm:"not null" json:"user_id"` Content string `gorm:"type:text" json:"content"` CreatedAt time.Time `gorm:"autoCreateTime" json:"created_at"` UpdatedAt time.Time `gorm:"autoUpdateTime" json:"updated_at"` Company Company `gorm:"foreignKey:CompanyID" json:"company,omitempty"` User User `gorm:"foreignKey:UserID" json:"user,omitempty"` } func (CompanyNote) TableName() string { return "company_notes" }