def serialize(self): return { 'userid': self.ownerid, 'workid': self.id, 'title': self.title, 'thumbnail': getUploadFileUrl(file_type.workThumbnail, self.ownerid, self.thumbnail), 'image': getUploadFileUrl(file_type.work, self.ownerid, self.image), 'file': getUploadFileUrl(file_type.workFile, self.ownerid, self.file), 'description': self.description, 'copyright': self.copyright, 'status': self.status, 'publish_date': self.publish_date.isoformat(), 'owner': url_for('.userep', _external=True, userid=self.ownerid), 'tags': url_for('.workTags', _external=True, workid=self.id) }
def getImage(self, imageType=file_type.profileSmall): if self.imageLarge and imageType == file_type.profileLarge: return getUploadFileUrl(imageType, self.id, self.imageLarge) elif self.imageMedium and imageType == file_type.profileMedium: return getUploadFileUrl(imageType, self.id, self.imageMedium) elif self.imageSmall and imageType == file_type.profileSmall: return getUploadFileUrl(imageType, self.id, self.imageSmall) else: return getDefaultImageUrl(self.defaultImage)
def serialize(self): return { 'id': self.id, 'name': self.name, 'authenticateDate': self.authenticateDate, 'identityID': self.identityID, 'identityFrontImage': getUploadFileUrl(file_type.privateFront, self.ownerid, self.identityFrontImage), 'identityBackImage': getUploadFileUrl(file_type.privateBack, self.ownerid, self.identityBackImage), 'userid': self.ownerid, 'status': self.approvalStatus }
def serialize(self): return { 'id': self.id, 'name': self.name, 'authenticateDate': self.authenticateDate, 'businessScope': self.businessScope, 'licenseID':self.licenseID, 'licenseImage': getUploadFileUrl(file_type.companyLience, self.ownerid, self.licenseImage), 'contactImage': getUploadFileUrl(file_type.companyContactCard, self.ownerid, self.contactImage), 'verifyType': self.verifyType, 'userid': self.ownerid, 'status': self.approvalStatus }
def serialize(self): return { 'userid': self.ownerid, 'workid': self.id, 'title': self.title, 'thumbnail': getUploadFileUrl(file_type.workThumbnail, self.ownerid, self.thumbnail), 'image': getUploadFileUrl(file_type.work, self.ownerid, self.image), 'file': getUploadFileUrl(file_type.workFile, self.ownerid, self.file), 'description': self.description, 'copyright': self.copyright, 'status': self.status, 'publish_date': self.publish_date.isoformat(), 'owner':url_for('.userep', _external=True, userid=self.ownerid), 'tags':url_for('.workTags', _external=True, workid=self.id) }
def serialize(self): return { 'id': self.id, 'title': self.title, 'description': self.description, 'image': getUploadFileUrl(file_type.recommend, self.typeid, self.image), 'url':self.url, 'orderid': self.orderid }
def serialize(self): return { 'id': self.id, 'title': self.title, 'description': self.description, 'image': getUploadFileUrl(file_type.recommend, self.typeid, self.image), 'url': self.url, 'orderid': self.orderid }
def serialize(self): return { 'id': self.id, 'image': getUploadFileUrl(file_type.version, self.user_id, self.image), 'title': self.title, 'description': self.description, 'publish_date': self.publish_date, 'status': self.status, 'user_id': self.user_id, 'task_id': self.task_id }