Add media filed in custom model

Hi, I do not have to much expirance in Shopware and biggest problem for me is ExtJs and backend. I create custom Models where one field should be image. How I can upload image from backend? My custom media field is set as association with Model\Media. I also try to set it as string, no results in both cases. Can anyone give some direction how to make  it?