package entity type DeleteStrategy int const ( _ DeleteStrategy = iota None Cascade Nullable ) func deleteStrategyFromAlias(alias string) DeleteStrategy { switch alias { case "cascade": return Cascade case "nullable": return Nullable default: return None } } type RelationType int const ( _ RelationType = iota Lazy Eager SmartLazy ) func relationTypeFromAlias(alias string) RelationType { switch alias { case "lazy": return Lazy case "eager": return Eager default: return Lazy } } type Relation interface { Type() RelationType DeleteStrategy() DeleteStrategy RelationWith() Name Field() *FieldInfo setField(f *FieldInfo) fillFromTag(tag *parsedTag, parent *MetaInfo) }