package attach // Relation declares one WinterCMS attachOne or attachMany relation of an // Owner model. Name is the relation name stored in system_files.field, Many // is true for attachMany (false for attachOne), and Public decides the // is_public flag of files stored through the relation: a protected relation // (Public false) stores is_public=false rows, for which the framework never // builds a public URL. type Relation struct { Name string Many bool Public bool } // HasRelations is implemented by an Owner model that declares its // attachment relations, the Go form of WinterCMS's $attachOne and // $attachMany arrays. A form field that edits attachments must name one of // the declared relations. type HasRelations interface { AttachRelations() []Relation }