Andriy-Yahello / shop

Angular Training Shop Project
0 stars 0 forks source link

src\app\products\models\product.model.ts #14

Open VZhyrytskiy opened 5 years ago

VZhyrytskiy commented 5 years ago

Избыточный код. Тело конструктора лишнее

constructor(
        public id: number = null,
        public name: string = '',
        public description: string= '',
        public price: number = 0,
        public category: Category = Category.BestSeller,
        public available: boolean = false,
        public quantity: number = 0,
        public updated: Date = new Date(),
        public feedbackList: FeedBackModel[] = []
        ) {

            this.id = id;
            this.name = name;
            this.description = description;
            this.price = price;
            this.category = category;
            this.available = available;
            this.quantity = quantity;
            this.updated = updated;
            this.feedbackList = feedbackList;
        }
VZhyrytskiy commented 5 years ago

Аналогично src\app\products\models\feedback.model.ts

VZhyrytskiy commented 5 years ago

Аналогично src\app\core\models\order.model.ts