SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil.
(id *int)
| 205 | |
| 206 | // SetNillableFileID sets the "file" edge to the File entity by ID if the given value is not nil. |
| 207 | func (su *ShareUpdate) SetNillableFileID(id *int) *ShareUpdate { |
| 208 | if id != nil { |
| 209 | su = su.SetFileID(*id) |
| 210 | } |
| 211 | return su |
| 212 | } |
| 213 | |
| 214 | // SetFile sets the "file" edge to the File entity. |
| 215 | func (su *ShareUpdate) SetFile(f *File) *ShareUpdate { |