#import "Product.h"

@implementation Product
@synthesize productId;
@synthesize name;
@synthesize price;
@synthesize description;
@synthesize image;
@synthesize thumb;
@synthesize productImage;

- (void)dealloc
{
   [productId release], productId = nil;
   [name release], name = nil;
   [price release], price = nil;
   [description release], description = nil;
   [image release], image = nil;
   [thumb release], thumb = nil;
   [productImage release], productImage = nil;
	
   [super dealloc];
}

- (id) initWithDictionary:(NSDictionary *)data
{
   self = [super init];
   if(self)
   {
      productId = [[data objectForKey:@"id"] copy];
      name = [[data objectForKey:@"name"] copy];
      price = [[data objectForKey:@"price"] copy];
      description = [[data objectForKey:@"description"] copy];
      image = [[data objectForKey:@"image"] copy];
      thumb = [[data objectForKey:@"thumb"] copy];
   }

   return self;
}

@end
