Commit 6f422bf3 authored by Tsvetelina Yordanova's avatar Tsvetelina Yordanova
Browse files

feat: #60 promotion forms

parent 0f503430
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ class Promotion extends DBObject<IPromotion, IPromotionCreateObject>
	 * @type {string}
	 * @memberof Promotion
	 */
	@Schema({ type: Date, required: false })
	@Schema({ type: String, required: false })
	@Column()
	description: string;

@@ -43,7 +43,7 @@ class Promotion extends DBObject<IPromotion, IPromotionCreateObject>
	 * @type {Date}
	 * @memberof Promotion
	 */
	@Schema({ type: Date, required: true })
	@Schema({ type: Date, required: false })
	@Column()
	activeFrom: Date;

@@ -63,12 +63,13 @@ class Promotion extends DBObject<IPromotion, IPromotionCreateObject>
	@Column()
	image: string;

	/**
	 * @type {Product}
	 * @memberof Promotion
	 */
	@Types.Ref(Product)
	product: Product;
	//tstodo
	// /**
	//  * @type {Product}
	//  * @memberof Promotion
	//  */
	// @Types.Ref(Product)
	// product: Product;

	/**
	 * @type {number}
@@ -77,6 +78,10 @@ class Promotion extends DBObject<IPromotion, IPromotionCreateObject>
	@Types.Number()
	@Column()
	purchasesCount: number;

	@Types.Boolean(false)
	@Column()
	isDeleted: boolean;
}

export default Promotion;
+6 −5
Original line number Diff line number Diff line
@@ -46,11 +46,12 @@ export interface IPromotionCreateObject extends DBCreateObject {
	 */
	image: string;

	/**
	 * @type {Product}
	 * @memberof IPromotionCreateObject
	 */
	product: Product;
	//tstodo
	// /**
	//  * @type {Product}
	//  * @memberof IPromotionCreateObject
	//  */
	// product: Product;

	/**
	 * @type {number}
+6 −6
Original line number Diff line number Diff line
type Promotion {
	_id: String!
	title: String!
	description: String!
	_id: String
	title: String
	description: String
	active: Boolean
	activeFrom: Date
	activeTo: Date
	image: String
	product: Product
	# product: Product
	purchasesCount: Int
}

input PromotionCreateInput {
	title: String!
	description: String!
	active: Boolean!
	description: String
	active: Boolean
	activeFrom: Date
	activeTo: Date
	image: String
+14 −0
Original line number Diff line number Diff line
@@ -168,6 +168,20 @@
				}
			}
		},
		"PROMOTIONS": {
			"PROMOTIONS": "Promotions",
			"BASIC_INFO": "Basic Info",
			"TITLE": "Title",
			"ACTIVE_FROM": "Active from",
			"ACTIVE_TO": "Active to",
			"PURCHASES_COUNT": "Purchases count",
			"IS_ACTIVE": "Is active",
			"SELECT_DATE": "Select date",
			"DESCRIPTION": "Description",
			"SAVE": "Save",
			"NEXT": "Next",
			"BACK": "Back"
		},
		"SELECT LANGUAGE": {
			"USA": "USA",
			"ISRAEL": "Israel",
+14 −0
Original line number Diff line number Diff line
@@ -168,6 +168,20 @@
				}
			}
		},
		"PROMOTIONS": {
			"PROMOTIONS": "Promotions",
			"BASIC_INFO": "Basic Info",
			"TITLE": "Title",
			"ACTIVE_FROM": "Active from",
			"ACTIVE_TO": "Active to",
			"PURCHASES_COUNT": "Purchases count",
			"IS_ACTIVE": "Is active",
			"SELECT_DATE": "Select date",
			"DESCRIPTION": "Description",
			"SAVE": "Save",
			"NEXT": "Next",
			"BACK": "Back"
		},
		"SELECT LANGUAGE": {
			"USA": "USA",
			"ISRAEL": "Israel",
Loading