added unique subspace name

This commit is contained in:
hannathkadher
2024-12-11 11:46:30 +04:00
parent 02faca3397
commit 69d0065ee6
6 changed files with 56 additions and 3 deletions

View File

@ -1,9 +1,10 @@
import { Column, Entity, ManyToOne } from 'typeorm';
import { Column, Entity, ManyToOne, Unique } from 'typeorm';
import { AbstractEntity } from '../../abstract/entities/abstract.entity';
import { SpaceModelEntity } from './space-model.entity';
import { SubSpaceModelDto } from '../dtos';
@Entity({ name: 'subspace-model' })
@Unique(['subspaceName', 'spaceModel'])
export class SubspaceModelEntity extends AbstractEntity<SubSpaceModelDto> {
@Column({
type: 'uuid',