|
|
@@ -1,14 +1,13 @@
|
|
|
import { AssetType } from '@vendure/common/lib/generated-types';
|
|
|
import { DeepPartial } from '@vendure/common/lib/shared-types';
|
|
|
-import { Column, Entity, JoinColumn, JoinTable, ManyToMany, OneToMany, OneToOne } from 'typeorm';
|
|
|
+import { Column, Entity, JoinTable, ManyToMany } from 'typeorm';
|
|
|
|
|
|
-import { Channel } from '..';
|
|
|
import { ChannelAware, Taggable } from '../../common/types/common-types';
|
|
|
-import { Address } from '../address/address.entity';
|
|
|
+import { HasCustomFields } from '../../config/custom-field/custom-field-types';
|
|
|
import { VendureEntity } from '../base/base.entity';
|
|
|
-import { CustomCustomerFields } from '../custom-entity-fields';
|
|
|
+import { Channel } from '../channel/channel.entity';
|
|
|
+import { CustomAssetFields } from '../custom-entity-fields';
|
|
|
import { Tag } from '../tag/tag.entity';
|
|
|
-import { User } from '../user/user.entity';
|
|
|
|
|
|
/**
|
|
|
* @description
|
|
|
@@ -18,7 +17,7 @@ import { User } from '../user/user.entity';
|
|
|
* @docsCategory entities
|
|
|
*/
|
|
|
@Entity()
|
|
|
-export class Asset extends VendureEntity implements Taggable, ChannelAware {
|
|
|
+export class Asset extends VendureEntity implements Taggable, ChannelAware, HasCustomFields {
|
|
|
constructor(input?: DeepPartial<Asset>) {
|
|
|
super(input);
|
|
|
}
|
|
|
@@ -49,4 +48,7 @@ export class Asset extends VendureEntity implements Taggable, ChannelAware {
|
|
|
@ManyToMany(type => Channel)
|
|
|
@JoinTable()
|
|
|
channels: Channel[];
|
|
|
+
|
|
|
+ @Column(type => CustomAssetFields)
|
|
|
+ customFields: CustomAssetFields;
|
|
|
}
|