package cn.sagacloud.server.scheduler.models

import com.fasterxml.jackson.annotation.JsonProperty
import com.sybotan.service.models.SBaseEntity
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.io.Serializable
import javax.persistence.Column
import javax.persistence.Id
import javax.persistence.Table


@ApiModel(description = "下载子任务实体类")
@Table(name = "scheduler_str.download")
class DownloadEntity : SBaseEntity() {

    /** 所属任务id*/
    @ApiModelProperty(value = "所属任务id")
    @Column(name = "task_id", insertable = true, updatable = false)
    @Id
    @JsonProperty(value = "TaskId")
    var taskId: String? = null

    /** 下载子任务的url, 只能是http(s)协议 */
    @ApiModelProperty(value = "下载子任务的url, 只能是http(s)协议")
    @Column(name = "task_url")
    @JsonProperty(value = "HttpUrl")
    var httpUrl: String? = null


    /** task name */
    @ApiModelProperty(value = "任务名")
    @Column(name = "task_md5")
    @JsonProperty(value = "Md5")
    var md5: String? = null
}