import { VariationGroup } from "./variationGroup"; import { VariationArticle } from "./variationArticle"; import { Defaults } from "~/defaults"; /** * Represents a variation. * A variation is a set of articles that are similar in some way. * For example, a variation could be a set of articles that are all the same product but in different colors. */ export class Variation { /** * The public id of the variation. */ publicId: string = Defaults.Guid; /** * If this is set, the name of the variation will be overwritten with this name. Else the description of the first article will be used. */ overwriteDescription?: string; /** * If this is set, the image of the variation will be overwritten with this image. Else the first article image will be used. */ overwriteImage?: string; /** * The public ids of the articles that are part of this variation. */ articles: VariationArticle[] = []; /** * The variation groups that are part of this variation. */ groups: VariationGroup[] = []; }