From 9f40cacb11333987f8dafcbefe6fc20bfb324028 Mon Sep 17 00:00:00 2001 From: xiaopeng Date: Tue, 4 Feb 2025 18:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=A7=9F=E6=88=B7ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/entity/base.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/entity/base.ts b/core/src/entity/base.ts index b9c8a03..67e101b 100644 --- a/core/src/entity/base.ts +++ b/core/src/entity/base.ts @@ -3,6 +3,7 @@ import { UpdateDateColumn, CreateDateColumn, PrimaryGeneratedColumn, + Column, } from 'typeorm'; import { CoolBaseEntity } from './typeorm'; @@ -23,4 +24,8 @@ export abstract class BaseEntity extends CoolBaseEntity { @Index() @UpdateDateColumn({ comment: '更新时间' }) updateTime: Date; + + @Index() + @Column({ comment: '租户ID', nullable: true }) + tenantId: number; }