import { GenericCrudService } from '@d8d/shared-crud';
import { DataSource } from 'typeorm';
import { GoodsMt } from '../entities/goods.entity.mt';

export class GoodsServiceMt extends GenericCrudService<GoodsMt> {
  constructor(dataSource: DataSource) {
    super(dataSource, GoodsMt, {
      userTracking: {
        createdByField: 'createdBy',
        updatedByField: 'updatedBy'
      },
      relationFields: {
        slideImageIds: {
          relationName: 'slideImages',
          targetEntity: Object // 这里需要替换为实际的File实体
        }
      }
    });
  }
}