package cn.lihongjie.coal.excelGenerator.entity;

import cn.lihongjie.coal.base.entity.CommonEntity;
import cn.lihongjie.coal.excelGeneratorSheetInfo.entity.ExcelGeneratorSheetInfoEntity;
import cn.lihongjie.coal.excelTemplate.entity.ExcelTemplateEntity;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;

import lombok.Data;

import org.hibernate.annotations.Comment;

import java.util.List;

@Data
@Entity
public class ExcelGeneratorEntity extends CommonEntity {


    @ManyToOne
    private ExcelTemplateEntity template;

    @OneToMany(mappedBy = "generator", cascade = {CascadeType.ALL})
    private List<ExcelGeneratorSheetInfoEntity> sheets;


    @Comment("数据源耗时")
    private Long dataSourceCostTime;

    @Comment("模板耗时")
    private Long templateCostTime;

    @Comment("生成耗时")
    private Long generateCostTime;

    
    



}
