production
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Entity, Enum, Property } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../../common/entities/base.entity';
|
||||
import { AttributeType } from '../interface/product.interface';
|
||||
|
||||
@Entity({ tableName: 'attributes' })
|
||||
export class Attribute extends BaseEntity {
|
||||
@Property({ primary: true })
|
||||
id: bigint;
|
||||
|
||||
@Property()
|
||||
name: string;
|
||||
|
||||
@Enum()
|
||||
type: AttributeType;
|
||||
|
||||
@Property({ type: 'boolean', default: false })
|
||||
isRequired: boolean = false;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user