SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
(id *int)
| 170 | |
| 171 | // SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil. |
| 172 | func (sc *ShareCreate) SetNillableFileID(id *int) *ShareCreate { |
| 173 | if id != nil { |
| 174 | sc = sc.SetFileID(*id) |
| 175 | } |
| 176 | return sc |
| 177 | } |
| 178 | |
| 179 | // SetFile sets the "file" edge to the File entity. |
| 180 | func (sc *ShareCreate) SetFile(f *File) *ShareCreate { |