1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-18 20:59:43 +02:00

PRovide basic in-app purchase/renewal flow

This commit is contained in:
Harvey Kandola 2018-11-05 19:48:50 +00:00
parent e116d3b000
commit d1b803b246
39 changed files with 1211 additions and 1154 deletions

View file

@ -16,6 +16,7 @@ import (
"time"
"github.com/documize/community/core/env"
"github.com/documize/community/domain"
"github.com/documize/community/model"
"github.com/documize/community/model/org"
)
@ -30,7 +31,7 @@ type Manifest struct {
OrgID string `json:"org"`
// Product edition at the time of the backup.
Edition env.Edition `json:"edition"`
Edition domain.Edition `json:"edition"`
// When the backup took place.
Created time.Time `json:"created"`

6
model/doc.go Normal file
View file

@ -0,0 +1,6 @@
package model
// Model contains data structures used throughout Documize.
//
// Models can be used by any other package hence this package
// should not import other packages to avoid cyclical dependencies.

View file

@ -15,6 +15,7 @@ import (
"time"
"github.com/documize/community/core/env"
"github.com/documize/community/domain"
)
// SitemapDocument details a document that can be exposed via Sitemap.
@ -28,19 +29,18 @@ type SitemapDocument struct {
// SiteMeta holds information associated with an Organization.
type SiteMeta struct {
OrgID string `json:"orgId"`
Title string `json:"title"`
Message string `json:"message"`
URL string `json:"url"`
AllowAnonymousAccess bool `json:"allowAnonymousAccess"`
AuthProvider string `json:"authProvider"`
AuthConfig string `json:"authConfig"`
Version string `json:"version"`
Revision int `json:"revision"`
MaxTags int `json:"maxTags"`
Edition env.Edition `json:"edition"`
Valid bool `json:"valid"`
ConversionEndpoint string `json:"conversionEndpoint"`
License env.License `json:"license"`
Storage env.StoreType `json:"storageProvider"`
OrgID string `json:"orgId"`
Title string `json:"title"`
Message string `json:"message"`
URL string `json:"url"`
AllowAnonymousAccess bool `json:"allowAnonymousAccess"`
AuthProvider string `json:"authProvider"`
AuthConfig string `json:"authConfig"`
Version string `json:"version"`
Revision int `json:"revision"`
MaxTags int `json:"maxTags"`
Edition domain.Edition `json:"edition"`
ConversionEndpoint string `json:"conversionEndpoint"`
Storage env.StoreType `json:"storageProvider"`
Location string `json:"location"` // reserved for internal use
}

View file

@ -13,7 +13,7 @@ package org
import "github.com/documize/community/model"
// Organization defines a company that uses this app.
// Organization defines a tenant that uses this app.
type Organization struct {
model.BaseEntity
Company string `json:"company"`
@ -28,4 +28,5 @@ type Organization struct {
MaxTags int `json:"maxTags"`
Serial string `json:"serial"`
Active bool `json:"active"`
Subscription string
}