package com.dtok.entity;

import javax.persistence.*;
import java.io.Serializable;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import java.util.Date;

/**
 * @Description  
 * @Author  C.J
 * @Date 2024-03-09 
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table ( name ="script_history" )
public class ScriptHistory  implements Serializable {

	private static final long serialVersionUID =  6852446363573994158L;

	@Id
   	@Column(name = "id" )
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

   	@Column(name = "script_id" )
	private String scriptId;


	@OneToOne
	@JoinColumn(name = "script_id", referencedColumnName = "uuid", insertable = false, updatable = false)
	private Script script;

   	@Column(name = "version" )
	private Long version;

	/**
	 * 脚本内容
	 */
   	@Column(name = "script_content" )
	private String scriptContent;

   	@Column(name = "app" )
	private String app;

	/**
	 * 创建时间
	 */
   	@Column(name = "created_at" )
	private Date createdAt;

}
