mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 04:13:30 +03:00
Updated offers schema to allow free trials
refs https://github.com/TryGhost/Team/issues/1726 - updates offer type validation to include `trial` - add offer duration validation which includes `trial` for free trial offers
This commit is contained in:
parent
8a32efac1f
commit
27a89d4b0e
@ -440,9 +440,9 @@ module.exports = {
|
|||||||
stripe_coupon_id: {type: 'string', maxlength: 255, nullable: true, unique: true},
|
stripe_coupon_id: {type: 'string', maxlength: 255, nullable: true, unique: true},
|
||||||
interval: {type: 'string', maxlength: 50, nullable: false, validations: {isIn: [['month', 'year']]}},
|
interval: {type: 'string', maxlength: 50, nullable: false, validations: {isIn: [['month', 'year']]}},
|
||||||
currency: {type: 'string', maxlength: 50, nullable: true},
|
currency: {type: 'string', maxlength: 50, nullable: true},
|
||||||
discount_type: {type: 'string', maxlength: 50, nullable: false, validations: {isIn: [['percent', 'amount']]}},
|
discount_type: {type: 'string', maxlength: 50, nullable: false, validations: {isIn: [['percent', 'amount', 'trial']]}},
|
||||||
discount_amount: {type: 'integer', nullable: false},
|
discount_amount: {type: 'integer', nullable: false},
|
||||||
duration: {type: 'string', maxlength: 50, nullable: false},
|
duration: {type: 'string', maxlength: 50, nullable: false, validations: {isIn: [['trial', 'once', 'repeating', 'forever']]}},
|
||||||
duration_in_months: {type: 'integer', nullable: true},
|
duration_in_months: {type: 'integer', nullable: true},
|
||||||
portal_title: {type: 'string', maxlength: 191, nullable: true},
|
portal_title: {type: 'string', maxlength: 191, nullable: true},
|
||||||
portal_description: {type: 'string', maxlength: 2000, nullable: true},
|
portal_description: {type: 'string', maxlength: 2000, nullable: true},
|
||||||
|
Loading…
Reference in New Issue
Block a user