using ZhonTai.Admin.Core.Entities;
using FreeSql;
using FreeSql.DataAnnotations;
using System;
using ZhonTai.Admin.Domain.User;
namespace ZhonTai.Admin.Domain.Tenant;
/// 
/// 租户
/// 
[Table(Name = "ad_tenant")]
[Index("idx_{tablename}_01", nameof(Name), true)]
[Index("idx_{tablename}_02", nameof(Code), true)]
public partial class TenantEntity : EntityBase
{
    /// 
    /// 企业名称
    /// 
    [Column(StringLength = 50)]
    public string Name { get; set; }
    /// 
    /// 编码
    /// 
    [Column(StringLength = 50)]
    public string Code { get; set; }
    /// 
    /// 姓名
    /// 
    [Column(StringLength = 50)]
    public string RealName { get; set; }
    /// 
    /// 手机号码
    /// 
    [Column(StringLength = 20)]
    public string Phone { get; set; }
    /// 
    /// 邮箱地址
    /// 
    [Column(StringLength = 50)]
    public string Email { get; set; }
    /// 
    /// 授权用户
    /// 
    public long? UserId { get; set; }
    public UserEntity User { get; set; }
    /// 
    /// 租户类型
    /// 
    public TenantType? TenantType { get; set; } = Core.Entities.TenantType.Tenant;
    /// 
    /// 数据库注册键
    /// 
    [Column(StringLength = 50)]
    public string DbKey { get; set; }
    /// 
    /// 数据库
    /// 
    [Column(MapType = typeof(int?))]
    public DataType? DbType { get; set; }
    /// 
    /// 连接字符串
    /// 
    [Column(StringLength = 500)]
    public string ConnectionString { get; set; }
    /// 
    /// 启用
    /// 
	public bool Enabled { get; set; } = true;
    /// 
    /// 说明
    /// 
    [Column(StringLength = 500)]
    public string Description { get; set; }
}