lifetime is a member of PARTICLE* but not of ENTITY*. I think you messed up these 2. Look it up
in the manual more exactly.
To access objects in structs you should use the arrow operator "->" instead of a dot ".".
And you did something wrong: the struct doesn'T contain any object with the name 'function', so you can't access it. BUT the ENTITY* object in the struct contains such. So write:
my_box->model->function = i_am_fly;//moves the model on the x-axe