{"size": 1491, "ext": "js", "max_stars_repo_path": "app/models/discountCode.server.model.js", "max_stars_repo_name": "alvarojoao/musicamise-cli", "max_stars_repo_stars_event_min_datetime": "2015-09-02T03:00:38.000Z", "max_stars_repo_stars_event_max_datetime": "2015-09-02T03:00:38.000Z", "max_issues_repo_path": "app/models/discountCode.server.model.js", "max_issues_repo_name": "alvarojoao/musicamise-cli", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/models/discountCode.server.model.js", "max_forks_repo_name": "alvarojoao/musicamise-cli", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 13.8055555556, "max_line_length": 66, "alphanum_fraction": 0.6203890007}
'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
	Schema = mongoose.Schema;
/**
 * Product Schema
 */
 var objectDiscountCode = {
	startDate: {
		type: Date,
		default: Date.now
	},
	endDate: {
		type: Date,
		default: Date.now
	},
	createdDate: {
		type: Date,
		default: Date.now
	},
	_id: {
		type: String,
		default: '',
		trim: true
	},
	valueOf: {
		type: Number,
		default: '',
		trim: true
	},
	typeForPay: {
		type: String,
		default: '',
		trim: true
	},
	ordersValidation: {
		type: String,
		default: '',
		trim: true
	},
	timesLeft: {
		type: Number,
		default:0
	},
	timesUsed: {
		type: Number,
		default:0
	},
	noTimesLimits: {
		type: Boolean,
		default:false
	},
	whereApply: {
		type: String,
		default: '',
		trim: true
	},
	noDateLimits: {
		type: Boolean,
		default: false,
		trim: true
	},
	active: {
		type: Boolean,
		default: false,
		trim: true
	},
	onLineVisible: {
		type: Boolean,
		default: false,
		trim: true
	},
	onLocalStore: {
		type: Boolean,
		default: false,
		trim: true
	},
	overValueOf: {
		type: Number,
		default: '',
		trim: true
	},
	collectionsSlug: {
		type: [String],
		default: [],
		trim: true
	},
	productSlugs: {
		type: [String],
		default: [],
		trim: true
	},
	description: {
		type: String
	},
}; 
var DiscountCodeSchema = new Schema(objectDiscountCode);

exports.getDiscountCodeSchema = function(){
	return objectDiscountCode;
};

mongoose.model('DiscountCode', DiscountCodeSchema,'discountCode');

