File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import {faker} from '@faker-js/faker';
77 * @class
88 */
99export default class FakerShop {
10+ public id : number ;
11+
1012 public readonly name : string ;
1113
1214 public readonly shopGroup : string ;
@@ -15,11 +17,16 @@ export default class FakerShop {
1517
1618 public readonly categoryRoot : string ;
1719
20+ public readonly theme : string ;
21+
1822 /**
1923 * Constructor for class ShopGroupData
2024 * @param shopToCreate {ShopCreator} Could be used to force the value of some members
2125 */
2226 constructor ( shopToCreate : ShopCreator ) {
27+ /** @type {number } ID of the shop */
28+ this . id = 0 ;
29+
2330 /** @type {string } Name of the shop */
2431 this . name = shopToCreate . name || `shop_${ faker . lorem . word ( ) } ` ;
2532
@@ -31,5 +38,17 @@ export default class FakerShop {
3138
3239 /** @type {string } Root category of the shop */
3340 this . categoryRoot = shopToCreate . categoryRoot ;
41+
42+ /** @type {string } Front Theme of the shop */
43+ this . theme = shopToCreate . theme || 'classic' ;
44+ }
45+
46+ /**
47+ * @param {number } id
48+ */
49+ setID ( id : number ) : this {
50+ this . id = id ;
51+
52+ return this ;
3453 }
3554}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ type ShopCreator = {
33 shopGroup : string
44 color ?: string
55 categoryRoot : string
6+ theme ?: string
67} ;
78
89export default ShopCreator ;
You can’t perform that action at this time.
0 commit comments