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

import com.qqchen.deploy.backend.deploy.enums.DevelopmentModeEnum;
import com.qqchen.deploy.backend.framework.domain.Entity;
import jakarta.persistence.Column;
import jakarta.persistence.Enumerated;
import jakarta.persistence.EnumType;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 团队实体
 */
@Data
@EqualsAndHashCode(callSuper = true)
@jakarta.persistence.Entity
@Table(name = "deploy_team")
public class Team extends Entity<Long> {

    @Column(name = "team_code", nullable = false, length = 50)
    private String teamCode;

    @Column(name = "team_name", nullable = false, length = 100)
    private String teamName;

    @Column(name = "description", length = 500)
    private String description;

    @Column(name = "owner_id")
    private Long ownerId;

    @Column(name = "owner_name", length = 50)
    private String ownerName;

    @Column(name = "enabled", nullable = false)
    private Boolean enabled = true;

    @Column(name = "sort", nullable = false)
    private Integer sort = 0;

    /**
     * 开发模式
     */
    @Enumerated(EnumType.STRING)
    @Column(name = "development_mode", length = 30, nullable = false)
    private DevelopmentModeEnum developmentMode = DevelopmentModeEnum.STANDARD;

    /**
     * 是否启用Git同步检测（仅SYNC_MODE模式有效）
     */
    @Column(name = "enable_git_sync_check", nullable = false)
    private Boolean enableGitSyncCheck = false;
}

