Removed db tags from compse & system
This commit is contained in:
+11
-11
@@ -12,19 +12,19 @@ import (
|
||||
|
||||
type (
|
||||
Attachment struct {
|
||||
ID uint64 `db:"id" json:"attachmentID,string"`
|
||||
OwnerID uint64 `db:"rel_owner" json:"ownerID,string"`
|
||||
Kind string `db:"kind" json:"-"`
|
||||
Url string `db:"url" json:"url,omitempty"`
|
||||
PreviewUrl string `db:"preview_url" json:"previewUrl,omitempty"`
|
||||
Name string `db:"name" json:"name,omitempty"`
|
||||
Meta attachmentMeta `db:"meta" json:"meta"`
|
||||
ID uint64 `json:"attachmentID,string"`
|
||||
OwnerID uint64 `json:"ownerID,string"`
|
||||
Kind string `json:"-"`
|
||||
Url string `json:"url,omitempty"`
|
||||
PreviewUrl string `json:"previewUrl,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Meta attachmentMeta `json:"meta"`
|
||||
|
||||
NamespaceID uint64 `db:"rel_namespace" json:"namespaceID,string"`
|
||||
NamespaceID uint64 `json:"namespaceID,string"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
// AttachmentFilter is used for filtering and as a return value from Find
|
||||
|
||||
@@ -14,16 +14,16 @@ import (
|
||||
|
||||
type (
|
||||
Chart struct {
|
||||
ID uint64 `json:"chartID,string" db:"id"`
|
||||
Handle string `json:"handle" db:"handle"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Config ChartConfig `json:"config" db:"config"`
|
||||
ID uint64 `json:"chartID,string"`
|
||||
Handle string `json:"handle"`
|
||||
Name string `json:"name"`
|
||||
Config ChartConfig `json:"config"`
|
||||
|
||||
NamespaceID uint64 `json:"namespaceID,string" db:"rel_namespace,string"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
ChartConfig struct {
|
||||
|
||||
@@ -12,17 +12,17 @@ import (
|
||||
|
||||
type (
|
||||
Module struct {
|
||||
ID uint64 `json:"moduleID,string" db:"id"`
|
||||
Handle string `json:"handle" db:"handle"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Meta types.JSONText `json:"meta" db:"json"`
|
||||
ID uint64 `json:"moduleID,string"`
|
||||
Handle string `json:"handle"`
|
||||
Name string `json:"name"`
|
||||
Meta types.JSONText `json:"meta"`
|
||||
Fields ModuleFieldSet `json:"fields" db:"-"`
|
||||
|
||||
NamespaceID uint64 `json:"namespaceID,string" db:"rel_namespace"`
|
||||
NamespaceID uint64 `json:"namespaceID,string"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
ModuleFilter struct {
|
||||
|
||||
@@ -12,25 +12,25 @@ import (
|
||||
type (
|
||||
// Modules - CRM module definitions
|
||||
ModuleField struct {
|
||||
ID uint64 `json:"fieldID,string" db:"id"`
|
||||
ModuleID uint64 `json:"moduleID,string" db:"rel_module"`
|
||||
Place int `json:"-" db:"place"`
|
||||
ID uint64 `json:"fieldID,string"`
|
||||
ModuleID uint64 `json:"moduleID,string"`
|
||||
Place int `json:"-"`
|
||||
|
||||
Kind string `json:"kind" db:"kind"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Label string `json:"label" db:"label"`
|
||||
Kind string `json:"kind"`
|
||||
Name string `json:"name"`
|
||||
Label string `json:"label"`
|
||||
|
||||
Options ModuleFieldOptions `json:"options" db:"options"`
|
||||
Options ModuleFieldOptions `json:"options"`
|
||||
|
||||
Private bool `json:"isPrivate" db:"is_private"`
|
||||
Required bool `json:"isRequired" db:"is_required"`
|
||||
Visible bool `json:"isVisible" db:"is_visible"`
|
||||
Multi bool `json:"isMulti" db:"is_multi"`
|
||||
DefaultValue RecordValueSet `json:"defaultValue" db:"default_value"`
|
||||
Private bool `json:"isPrivate"`
|
||||
Required bool `json:"isRequired"`
|
||||
Visible bool `json:"isVisible"`
|
||||
Multi bool `json:"isMulti"`
|
||||
DefaultValue RecordValueSet `json:"defaultValue"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@ import (
|
||||
|
||||
type (
|
||||
Namespace struct {
|
||||
ID uint64 `db:"id" json:"namespaceID,string"`
|
||||
Name string `db:"name" json:"name"`
|
||||
Slug string `db:"slug" json:"slug"`
|
||||
Enabled bool `db:"enabled" json:"enabled"`
|
||||
Meta NamespaceMeta `db:"meta" json:"meta"`
|
||||
ID uint64 `json:"namespaceID,string"`
|
||||
Name string `json:"name"`
|
||||
Slug string `json:"slug"`
|
||||
Enabled bool `json:"enabled"`
|
||||
Meta NamespaceMeta `json:"meta"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
NamespaceFilter struct {
|
||||
|
||||
+13
-13
@@ -15,27 +15,27 @@ import (
|
||||
type (
|
||||
// Page - page structure
|
||||
Page struct {
|
||||
ID uint64 `json:"pageID,string" db:"id"`
|
||||
SelfID uint64 `json:"selfID,string" db:"self_id"`
|
||||
ID uint64 `json:"pageID,string"`
|
||||
SelfID uint64 `json:"selfID,string"`
|
||||
|
||||
NamespaceID uint64 `json:"namespaceID,string" db:"rel_namespace"`
|
||||
NamespaceID uint64 `json:"namespaceID,string"`
|
||||
|
||||
ModuleID uint64 `json:"moduleID,string" db:"rel_module"`
|
||||
ModuleID uint64 `json:"moduleID,string"`
|
||||
|
||||
Handle string `json:"handle" db:"handle"`
|
||||
Title string `json:"title" db:"title"`
|
||||
Description string `json:"description" db:"description"`
|
||||
Handle string `json:"handle"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
|
||||
Blocks PageBlocks `json:"blocks" db:"blocks"`
|
||||
Blocks PageBlocks `json:"blocks"`
|
||||
|
||||
Children PageSet `json:"children,omitempty" db:"-"`
|
||||
|
||||
Visible bool `json:"visible" db:"visible"`
|
||||
Weight int `json:"weight" db:"weight"`
|
||||
Visible bool `json:"visible"`
|
||||
Weight int `json:"weight"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
PageBlocks []PageBlock
|
||||
|
||||
+10
-10
@@ -32,20 +32,20 @@ type (
|
||||
|
||||
// Record is a stored row in the `record` table
|
||||
Record struct {
|
||||
ID uint64 `json:"recordID,string" db:"id"`
|
||||
ModuleID uint64 `json:"moduleID,string" db:"module_id"`
|
||||
ID uint64 `json:"recordID,string"`
|
||||
ModuleID uint64 `json:"moduleID,string"`
|
||||
|
||||
Values RecordValueSet `json:"values,omitempty" db:"-"`
|
||||
|
||||
NamespaceID uint64 `json:"namespaceID,string" db:"rel_namespace"`
|
||||
NamespaceID uint64 `json:"namespaceID,string"`
|
||||
|
||||
OwnedBy uint64 `db:"owned_by" json:"ownedBy,string"`
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
CreatedBy uint64 `db:"created_by" json:"createdBy,string" `
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
UpdatedBy uint64 `db:"updated_by" json:"updatedBy,string,omitempty" `
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
DeletedBy uint64 `db:"deleted_by" json:"deletedBy,string,omitempty" `
|
||||
OwnedBy uint64 `json:"ownedBy,string"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
CreatedBy uint64 `json:"createdBy,string" `
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
UpdatedBy uint64 `json:"updatedBy,string,omitempty" `
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
DeletedBy uint64 `json:"deletedBy,string,omitempty" `
|
||||
}
|
||||
|
||||
RecordFilter struct {
|
||||
|
||||
@@ -12,12 +12,12 @@ import (
|
||||
type (
|
||||
// RecordValue is a stored row in the `record_value` table
|
||||
RecordValue struct {
|
||||
RecordID uint64 `db:"record_id" json:"-"`
|
||||
Name string `db:"name" json:"name"`
|
||||
Value string `db:"value" json:"value,omitempty"`
|
||||
Ref uint64 `db:"ref" json:"-"`
|
||||
Place uint `db:"place" json:"-"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
RecordID uint64 `json:"-"`
|
||||
Name string `json:"name"`
|
||||
Value string `json:"value,omitempty"`
|
||||
Ref uint64 `json:"-"`
|
||||
Place uint `json:"-"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
|
||||
Updated bool `db:"-" json:"-"`
|
||||
OldValue string `db:"-" json:"-"`
|
||||
|
||||
@@ -14,16 +14,16 @@ import (
|
||||
|
||||
type (
|
||||
Application struct {
|
||||
ID uint64 `json:"applicationID,string" db:"id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
OwnerID uint64 `json:"ownerID" db:"rel_owner"`
|
||||
Enabled bool `json:"enabled" db:"enabled"`
|
||||
ID uint64 `json:"applicationID,string"`
|
||||
Name string `json:"name"`
|
||||
OwnerID uint64 `json:"ownerID"`
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
Unify *ApplicationUnify `json:"unify,omitempty" db:"unify"`
|
||||
Unify *ApplicationUnify `json:"unify,omitempty"`
|
||||
|
||||
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"updated_at"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
ApplicationUnify struct {
|
||||
|
||||
+10
-10
@@ -11,17 +11,17 @@ import (
|
||||
|
||||
type (
|
||||
Attachment struct {
|
||||
ID uint64 `db:"id" json:"attachmentID,string"`
|
||||
OwnerID uint64 `db:"rel_owner" json:"ownerID,string"`
|
||||
Kind string `db:"kind" json:"-"`
|
||||
Url string `db:"url" json:"url,omitempty"`
|
||||
PreviewUrl string `db:"preview_url" json:"previewUrl,omitempty"`
|
||||
Name string `db:"name" json:"name,omitempty"`
|
||||
Meta attachmentMeta `db:"meta" json:"meta"`
|
||||
ID uint64 `json:"attachmentID,string"`
|
||||
OwnerID uint64 `json:"ownerID,string"`
|
||||
Kind string `json:"-"`
|
||||
Url string `json:"url,omitempty"`
|
||||
PreviewUrl string `json:"previewUrl,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Meta attachmentMeta `json:"meta"`
|
||||
|
||||
CreatedAt time.Time `db:"created_at" json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `db:"updated_at" json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `db:"deleted_at" json:"deletedAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
// AttachmentFilter is used for filtering and as a return value from Find
|
||||
|
||||
+11
-11
@@ -10,17 +10,17 @@ import (
|
||||
|
||||
type (
|
||||
Credentials struct {
|
||||
ID uint64 `json:"credentialsID,string" db:"id"`
|
||||
OwnerID uint64 `json:"ownerID,string" db:"rel_owner"`
|
||||
Label string `json:"label" db:"label"`
|
||||
Kind string `json:"kind" db:"kind"`
|
||||
Credentials string `json:"-" db:"credentials"`
|
||||
Meta types.JSONText `json:"-" db:"meta"`
|
||||
LastUsedAt *time.Time `json:"lastUsedAt,omitempty" db:"last_used_at"`
|
||||
ExpiresAt *time.Time `json:"expiresAt,omitempty" db:"expires_at"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"updated_at"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
|
||||
ID uint64 `json:"credentialsID,string"`
|
||||
OwnerID uint64 `json:"ownerID,string"`
|
||||
Label string `json:"label"`
|
||||
Kind string `json:"kind"`
|
||||
Credentials string `json:"-"`
|
||||
Meta types.JSONText `json:"-"`
|
||||
LastUsedAt *time.Time `json:"lastUsedAt,omitempty"`
|
||||
ExpiresAt *time.Time `json:"expiresAt,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
CredentialsFilter struct {
|
||||
|
||||
+13
-13
@@ -9,23 +9,23 @@ import (
|
||||
|
||||
type (
|
||||
Reminder struct {
|
||||
ID uint64 `json:"reminderID,string" db:"id"`
|
||||
Resource string `json:"resource" db:"resource"`
|
||||
Payload types.JSONText `json:"payload" db:"payload"`
|
||||
SnoozeCount uint `json:"snoozeCount" db:"snooze_count"`
|
||||
ID uint64 `json:"reminderID,string"`
|
||||
Resource string `json:"resource"`
|
||||
Payload types.JSONText `json:"payload"`
|
||||
SnoozeCount uint `json:"snoozeCount"`
|
||||
|
||||
AssignedTo uint64 `json:"assignedTo,string" db:"assigned_to"`
|
||||
AssignedBy uint64 `json:"assignedBy,string" db:"assigned_by"`
|
||||
AssignedAt time.Time `json:"assignedAt" db:"assigned_at"`
|
||||
AssignedTo uint64 `json:"assignedTo,string"`
|
||||
AssignedBy uint64 `json:"assignedBy,string"`
|
||||
AssignedAt time.Time `json:"assignedAt"`
|
||||
|
||||
DismissedBy uint64 `json:"dismissedBy,string" db:"dismissed_by"`
|
||||
DismissedAt *time.Time `json:"dismissedAt" db:"dismissed_at"`
|
||||
DismissedBy uint64 `json:"dismissedBy,string"`
|
||||
DismissedAt *time.Time `json:"dismissedAt"`
|
||||
|
||||
RemindAt *time.Time `json:"remindAt" db:"remind_at"`
|
||||
RemindAt *time.Time `json:"remindAt"`
|
||||
|
||||
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"updated_at"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
ReminderFilter struct {
|
||||
|
||||
@@ -11,13 +11,13 @@ import (
|
||||
type (
|
||||
// Role - An organisation may have many roles. Roles may have many channels available. Access to channels may be shared between roles.
|
||||
Role struct {
|
||||
ID uint64 `json:"roleID,string" db:"id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Handle string `json:"handle" db:"handle"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"updated_at"`
|
||||
ArchivedAt *time.Time `json:"archivedAt,omitempty" db:"archived_at"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
|
||||
ID uint64 `json:"roleID,string"`
|
||||
Name string `json:"name"`
|
||||
Handle string `json:"handle"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
ArchivedAt *time.Time `json:"archivedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
RoleFilter struct {
|
||||
|
||||
@@ -12,15 +12,15 @@ import (
|
||||
|
||||
type (
|
||||
SettingValue struct {
|
||||
Name string `json:"name" db:"name"`
|
||||
Value types.JSONText `json:"value" db:"value"`
|
||||
Name string `json:"name"`
|
||||
Value types.JSONText `json:"value"`
|
||||
|
||||
// Setting owner, 0 for global settings
|
||||
OwnedBy uint64 `json:"-" db:"rel_owner"`
|
||||
OwnedBy uint64 `json:"-"`
|
||||
|
||||
// Who updated & when
|
||||
UpdatedAt time.Time `json:"updatedAt" db:"updated_at"`
|
||||
UpdatedBy uint64 `json:"updatedBy" db:"updated_by"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
UpdatedBy uint64 `json:"updatedBy"`
|
||||
}
|
||||
|
||||
SettingsFilter struct {
|
||||
|
||||
+12
-12
@@ -15,21 +15,21 @@ import (
|
||||
|
||||
type (
|
||||
User struct {
|
||||
ID uint64 `json:"userID,string" db:"id"`
|
||||
Username string `json:"username" db:"username"`
|
||||
Email string `json:"email" db:"email"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Handle string `json:"handle" db:"handle"`
|
||||
Kind UserKind `json:"kind" db:"kind"`
|
||||
ID uint64 `json:"userID,string"`
|
||||
Username string `json:"username"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
Handle string `json:"handle"`
|
||||
Kind UserKind `json:"kind"`
|
||||
|
||||
Meta *UserMeta `json:"meta" db:"meta"`
|
||||
Meta *UserMeta `json:"meta"`
|
||||
|
||||
EmailConfirmed bool `json:"-" db:"email_confirmed"`
|
||||
EmailConfirmed bool `json:"-"`
|
||||
|
||||
CreatedAt time.Time `json:"createdAt,omitempty" db:"created_at"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty" db:"updated_at"`
|
||||
SuspendedAt *time.Time `json:"suspendedAt,omitempty" db:"suspended_at"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty" db:"deleted_at"`
|
||||
CreatedAt time.Time `json:"createdAt,omitempty"`
|
||||
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
|
||||
SuspendedAt *time.Time `json:"suspendedAt,omitempty"`
|
||||
DeletedAt *time.Time `json:"deletedAt,omitempty"`
|
||||
|
||||
// Hold list of roles this user is member of.
|
||||
// we're using this for auth/identifier purposes, to support Roles() func
|
||||
|
||||
Reference in New Issue
Block a user