package cn.reghao.tnb.file.app.zdisk.model.vo;

import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.tnb.file.app.zdisk.model.po.CamRecord;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author reghao
 * @date 2024-02-03 18:10:01
 */
@NoArgsConstructor
@AllArgsConstructor
@Setter
@Getter
public class CamRecordDetail {
    private Long camId;
    private Long recordId;
    private String recordTime;
    private String url;

    public CamRecordDetail(CamRecord camRecord, String signedUrl) {
        this.camId = camRecord.getCamId();
        this.recordId = camRecord.getRecordId();
        this.recordTime = DateTimeConverter.format(camRecord.getStartAt());
        this.url = signedUrl;
    }
}
