|
|
@@ -2,6 +2,7 @@ package cn.reghao.tnb.content.app.data.model.po;
|
|
|
|
|
|
import cn.reghao.jutil.jdk.db.BaseObject;
|
|
|
import cn.reghao.oss.sdk.model.dto.media.ImageInfo;
|
|
|
+import cn.reghao.tnb.content.app.geo.model.po.CameraPhoto;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
@@ -38,4 +39,16 @@ public class ImageFile extends BaseObject<Integer> {
|
|
|
this.height = imageInfo.getHeight();
|
|
|
this.horizontal = imageInfo.getWidth() > imageInfo.getHeight();
|
|
|
}
|
|
|
+
|
|
|
+ public ImageFile(long albumId, CameraPhoto cameraPhoto) {
|
|
|
+ this.albumId = albumId;
|
|
|
+ this.channelCode = cameraPhoto.getChannelCode();
|
|
|
+ this.imageFileId = cameraPhoto.getObjectId();
|
|
|
+ this.objectId = cameraPhoto.getObjectId();
|
|
|
+ this.format = "jpg";
|
|
|
+ this.url = cameraPhoto.getPhotoUrl();
|
|
|
+ this.width = 0;
|
|
|
+ this.height = 0;
|
|
|
+ this.horizontal = false;
|
|
|
+ }
|
|
|
}
|