import { BaseEntity } from '../../../comm/entity/base'; import { Column, Entity, Index } from 'typeorm'; import { DomainSslStatus, TenantDomain } from '../../../comm/types/omni'; /** * 租户自定义域名 * 表名: team_domain */ @Entity('team_domain') export class TeamDomainEntity extends BaseEntity implements TenantDomain { @Index({ unique: true }) @Column({ name: 'custom_domain', comment: '自定义主域名', length: 255, }) customDomain: string; @Column({ name: 'ssl_status', comment: 'SSL 状态 pending/active/failed', length: 16, default: 'pending', }) sslStatus: DomainSslStatus; @Column({ name: 'cname_target', comment: '解析目标 CNAME', length: 255, nullable: true, }) cnameTarget?: string | null; @Column({ name: 'ssl_expire_time', comment: 'SSL 证书到期时间', length: 32, nullable: true, }) sslExpireTime?: string | null; }