Browse Source

🐛 fix(advertisement): add unique constraint to advertisement type code

- 添加code字段的唯一约束,防止重复的广告类型调用别名
yourname 1 tháng trước cách đây
mục cha
commit
766b7d6558

+ 1 - 0
packages/advertisements-module/src/entities/advertisement-type.entity.ts

@@ -17,6 +17,7 @@ export class AdvertisementType {
     name: 'code',
     type: 'varchar',
     length: 20,
+    unique: true,
     comment: '调用别名'
   })
   code!: string;