package com.qqchen.deploy.backend.deploy.entity;

import com.qqchen.deploy.backend.deploy.enums.BuildTypeEnum;
import com.qqchen.deploy.backend.deploy.enums.DeployTypeEnum;
import com.qqchen.deploy.backend.framework.domain.Entity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;

/**
 * 环境实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@jakarta.persistence.Entity
@Table(name = "deploy_environment")
public class Environment extends Entity<Long> {

    /**
     * 租户编码
     */
    @Column(name = "tenant_code")
    private String tenantCode;

    /**
     * 环境编码
     */
    @Column(name = "env_code", nullable = false)
    private String envCode;

    /**
     * 环境名称
     */
    @Column(name = "env_name", nullable = false)
    private String envName;

    /**
     * 环境描述
     */
    @Column(name = "env_desc")
    private String envDesc;

    /**
     * 构建方式
     */
    @Enumerated(EnumType.STRING)
    @Column(name = "build_type")
    private BuildTypeEnum buildType;

    /**
     * 部署方式
     */
    @Enumerated(EnumType.STRING)
    @Column(name = "deploy_type")
    private DeployTypeEnum deployType;

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

    /**
     * 排序号
     */
    @Column(name = "sort", nullable = false)
    private Integer sort;

}