package cn.reghao.tnb.sb.multi.mybatis.model.two;

import cn.reghao.jutil.jdk.web.db.BaseObject;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author reghao
 * @date 2024-09-07 12:01:03
 */
@NoArgsConstructor
@Setter
@Getter
public class CameraPhoto extends BaseObject<Integer> {
    private Integer from;
    private Long albumId;
    private String objectId;
    private Integer channelId;
    private String photoUrl;
    private String manufacturer;
    private String model;
    private String software;
    private LocalDateTime shotAt;
    private BigDecimal longitude;
    private BigDecimal latitude;

    public CameraPhoto(MallReplyPhoto mallReplyPhoto) {
        this.from = 2;
        this.albumId = Long.parseLong(mallReplyPhoto.getReplyId());
        this.objectId = mallReplyPhoto.getUploadId();
        this.channelId = mallReplyPhoto.getChannelId();
        this.photoUrl = mallReplyPhoto.getPhotoUrl();
        this.manufacturer = mallReplyPhoto.getManufacturer();
        this.model = mallReplyPhoto.getModel();
        this.software = mallReplyPhoto.getSoftware();
        this.shotAt = mallReplyPhoto.getShotAt();
        this.longitude = mallReplyPhoto.getLongitude();
        this.latitude = mallReplyPhoto.getLatitude();
    }
}
