feat: add default value for entity

This commit is contained in:
ilhamtahir committed 2024-12-25 11:43:39 +08:00
1 parent 60df57ceb2
commit 23beaf9574
2 files changed
+9 -3

No files matched your search

+6 -2
View File
@@ -24,10 +24,14 @@ export class User extends BaseEntity {
})
enabled: boolean = true;
@Column()
@Column({
nullable: true,
})
trueName: string;
@Column()
@Column({
nullable: true,
})
age: number;
@Column({
+3 -1
View File
@@ -10,7 +10,9 @@ async function bootstrap() {
parseInt(process.env.WORKER_ID, 10),
parseInt(process.env.DATACENTER_ID, 10),
);
const app = await NestFactory.create(AppModule);
const app = await NestFactory.create(AppModule, {
logger: ['log'],
});
if (['development', 'test'].includes(process.env.NODE_ENV)) {
const config = new DocumentBuilder()
.setTitle(process.env.APP_TITLE)