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

import com.qqchen.deploy.backend.framework.annotation.LogicDelete;
import com.qqchen.deploy.backend.framework.domain.Entity;
import jakarta.persistence.Column;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper = true)
@jakarta.persistence.Entity
@Table(name = "sys_tenant")
@LogicDelete
public class Tenant extends Entity<Long> {
    
    @NotBlank(message = "租户名称不能为空")
    @Column(nullable = false)
    private String name;
    
    @NotBlank(message = "租户编码不能为空")
    @Column(nullable = false, unique = true)
    private String code;
    
    @Column(name = "contact_name")
    private String contactName;
    
    @Column(name = "contact_phone")
    private String contactPhone;
    
    private String email;
    
    private String address;
    
    @Column(nullable = false)
    private Boolean enabled = true;

} 