mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
64 lines
1.8 KiB
JavaScript
64 lines
1.8 KiB
JavaScript
|
/**
|
||
|
* Subscription.js
|
||
|
*
|
||
|
* @description :: A model definition represents a database table/collection.
|
||
|
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
||
|
*/
|
||
|
|
||
|
module.exports = {
|
||
|
|
||
|
attributes: {
|
||
|
|
||
|
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
||
|
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
||
|
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
||
|
|
||
|
nextBillingAt: {
|
||
|
type: 'number',
|
||
|
description: 'A JS Timestamp representing the next billing date for this subscription',
|
||
|
required: true,
|
||
|
},
|
||
|
|
||
|
numberOfHosts: {
|
||
|
type: 'number',
|
||
|
description: 'The number of hosts this subscription is valid for',
|
||
|
required: true,
|
||
|
},
|
||
|
|
||
|
subscriptionPrice: {
|
||
|
type: 'number',
|
||
|
description: 'The price of this Fleet Premium subscription',
|
||
|
required: true,
|
||
|
},
|
||
|
|
||
|
stripeSubscriptionId: {
|
||
|
type: 'string',
|
||
|
description: 'The stripe id for this subscription',
|
||
|
required: true,
|
||
|
},
|
||
|
|
||
|
fleetLicenseKey: {
|
||
|
type: 'string',
|
||
|
example:'1234 1234 1234 1234 1234',
|
||
|
description: 'The user\'s Fleet Premium license key'
|
||
|
},
|
||
|
|
||
|
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
||
|
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
||
|
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
||
|
|
||
|
|
||
|
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||
|
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
||
|
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
||
|
user: {
|
||
|
model: 'User',
|
||
|
description: 'The user who started this subscription.',
|
||
|
required: true
|
||
|
}
|
||
|
|
||
|
},
|
||
|
|
||
|
};
|
||
|
|