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")
public class Script implements Serializable {

    private static final long serialVersionUID = 7878805062919342891L;

    @Id
    @Column(name = "uuid")
    private String uuid;

    /**
     * APP
     */
    @Column(name = "app")
    private String app;

    @OneToOne
    @JoinColumn(name = "app", referencedColumnName = "package_name", insertable = false, updatable = false)
    private AppInfo appInfo;
    /**
     * 模块
     */
    @Column(name = "module")
    private String module;

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

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


    /**
     * 调用次数
     */
    @Column(name = "call_count")
    private Long callCount;

    @Column(name = "encrypt")
    private Boolean encrypt;


    @Column(name = "group_name")
    private String groupName;

    @Column(name = "created_time")
    private Date createdTime;

}
