entity

package
v0.0.0-...-064cf75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 14

Documentation

Index

Constants

View Source
const GSUITE_SERVICE_EMAIL_ADDRESS = "GSUITE_SERVICE_EMAIL_ADDRESS"
View Source
const GSUITE_SERVICE_PRIVATE_KEY = "GSUITE_SERVICE_PRIVATE_KEY"

Variables

This section is empty.

Functions

This section is empty.

Types

type AiPromptLog

type AiPromptLog struct {
	ID                      string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt               time.Time `gorm:"default:CURRENT_TIMESTAMP"`
	AppSource               string    `gorm:"column:app_source;type:varchar(50);NOT NULL;" json:"appSource" binding:"required"`
	Provider                string    `gorm:"column:provider;type:varchar(50);NOT NULL;" json:"provider" binding:"required"`
	Model                   string    `gorm:"column:model;type:varchar(100);NOT NULL;" json:"model" binding:"required"`
	PromptType              string    `gorm:"column:prompt_type;type:varchar(255);NOT NULL;" json:"promptType" binding:"required"`
	PromptTemplate          *string   `gorm:"column:prompt_template;type:text;" json:"promptTemplate" binding:"required"`
	Tenant                  *string   `gorm:"column:tenant;type:varchar(100);" json:"tenant" binding:"required"`
	NodeId                  *string   `gorm:"column:node_id;type:varchar(255);" json:"nodeId" binding:"required"`
	NodeLabel               *string   `gorm:"column:node_label;type:varchar(100);" json:"nodeLabel" binding:"required"`
	Prompt                  string    `gorm:"column:prompt;type:text;NOT NULL;" json:"prompt" binding:"required"`
	RawResponse             string    `gorm:"column:raw_response;type:text;NOT NULL;" json:"rawResponse" binding:"required"`
	PostProcessError        bool      `gorm:"column:post_process_error;" json:"postProcessError" binding:"required"`
	PostProcessErrorMessage *string   `gorm:"column:post_process_error_message;type:text;" json:"postProcessErrorMessage" binding:"required"`
}

func (AiPromptLog) TableName

func (AiPromptLog) TableName() string

type AppKey

type AppKey struct {
	ID     uint64 `gorm:"primary_key;autoIncrement:true" json:"id"`
	AppId  string `gorm:"column:app_id;type:varchar(255);NOT NULL" json:"appId" binding:"required"`
	Key    string `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	Active bool   `gorm:"column:active;type:bool;NOT NULL" json:"active" binding:"required"`
}

func (AppKey) TableName

func (AppKey) TableName() string

type ColumnView

type ColumnView struct {
	ColumnType string `json:"columnType"`
	Width      int    `json:"width"`
	Visible    bool   `json:"visible"`
}

type Columns

type Columns struct {
	Columns []ColumnView `json:"columns"`
}

type CurrencyRate

type CurrencyRate struct {
	ID        uint64    `gorm:"primary_key;autoIncrement:true"`
	Currency  string    `gorm:"type:varchar(3);not null"` // Currency code (e.g., EUR, GBP, etc.)
	Rate      float64   `gorm:"not null"`                 // Exchange rate relative to USD
	Date      time.Time `gorm:"not null"`                 // Date of the exchange rate
	CreatedAt time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:timestamp"`
	Source    string    `gorm:"type:varchar(255);not null"` // Source of the exchange rate (e.g., ECB, etc.)
}

All rates are relative to USD, i.e., 1 USD = Rate Currency (1 USD = 0.93 EUR)

func (CurrencyRate) TableName

func (CurrencyRate) TableName() string

func (CurrencyRate) UniqueIndex

func (CurrencyRate) UniqueIndex() [][]string

type EventBuffer

type EventBuffer struct {
	Tenant          string    `gorm:"column:tenant;size:50"`
	UUID            string    `gorm:"column:uuid;size:250;primaryKey"`
	ExpiryTimestamp time.Time `gorm:"column:expiry_timestamp;size:100"`
	CreatedDate     time.Time `gorm:"default:current_timestamp"`
	// event store Event fields
	EventType          string    `gorm:"column:event_type;size:250"`
	EventData          []byte    `gorm:"column:event_data;"`
	EventID            string    `gorm:"column:event_id;size:50"`
	EventTimestamp     time.Time `gorm:"column:event_timestamp;size:100"`
	EventAggregateType string    `gorm:"column:event_aggregate_type;size:250"`
	EventAggregateID   string    `gorm:"column:event_aggregate_id;size:250"`
	EventVersion       int64     `gorm:"column:event_version;"`
	EventMetadata      []byte    `gorm:"column:event_metadata;"`
}

func (EventBuffer) TableName

func (EventBuffer) TableName() string

type GoogleServiceAccountKey

type GoogleServiceAccountKey struct {
	ID         uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	TenantName string    `gorm:"size:255;not null;index:idx_tenant_api_keys"`
	Key        string    `gorm:"size:255;not null;index:idx_tenant_api_keys"`
	Value      string    `gorm:"type:text"`
}

func (GoogleServiceAccountKey) TableName

func (GoogleServiceAccountKey) TableName() string

type PersonalEmailProvider

type PersonalEmailProvider struct {
	ID             uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	ProviderName   string    `gorm:"size:255;not null;"`
	ProviderDomain string    `gorm:"size:255;not null;index:idx_provider_domain"`
	CreatedAt      time.Time `gorm:"default:CURRENT_TIMESTAMP"`
}

func (PersonalEmailProvider) TableName

func (PersonalEmailProvider) TableName() string

type PersonalIntegration

type PersonalIntegration struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	Name       string    `gorm:"column:name;type:varchar(255);NOT NULL" json:"name" binding:"required"`
	Email      string    `gorm:"column:email;type:varchar(255);NOT NULL" json:"email" binding:"required"`
	Secret     string    `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
}

func (PersonalIntegration) TableName

func (PersonalIntegration) TableName() string

func (PersonalIntegration) UniqueIndex

func (PersonalIntegration) UniqueIndex() [][]string

type PostmarkApiKey

type PostmarkApiKey struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	Key        string    `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
}

func (PostmarkApiKey) TableName

func (PostmarkApiKey) TableName() string

type SlackChannel

type SlackChannel struct {
	ID             uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey"`
	Source         string    `gorm:"column:source;type:varchar(255);"`
	CreatedAt      time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp"`
	UpdatedAt      time.Time `gorm:"column:updated_at;type:timestamp"`
	TenantName     string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL"`
	ChannelId      string    `gorm:"column:channel_id;type:varchar(255);NOT NULL"`
	ChannelName    string    `gorm:"column:channel_name;type:varchar(255);"`
	OrganizationId *string   `gorm:"column:organization_id;type:varchar(255);"`
}

func (SlackChannel) TableName

func (SlackChannel) TableName() string

func (SlackChannel) UniqueIndex

func (SlackChannel) UniqueIndex() [][]string

type TableViewDefinition

type TableViewDefinition struct {
	ID          uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	CreatedAt   time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt   time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	Tenant      string    `gorm:"column:tenant;type:varchar(255);NOT NULL;index:idx_def_unique,unique" json:"tenant"`
	UserId      string    `gorm:"column:user_id;type:varchar(255);index:idx_def_unique,unique" json:"userId"`
	TableId     string    `gorm:"column:table_id;type:varchar(255);NOT NULL;DEFAULT:''" json:"tableId"`
	TableType   string    `gorm:"column:table_type;type:varchar(255);NOT NULL;index:idx_def_unique,unique" json:"tableType"`
	Name        string    `gorm:"column:table_name;type:varchar(255);NOT NULL;index:idx_def_unique,unique" json:"tableName"`
	Order       int       `gorm:"column:position;type:int;NOT NULL" json:"order"`
	Icon        string    `gorm:"column:icon;type:varchar(255)" json:"icon"`
	Filters     string    `gorm:"column:filters;type:text" json:"filters"`
	Sorting     string    `gorm:"column:sorting;type:text" json:"sorting"`
	ColumnsJson string    `gorm:"column:columns;type:text" json:"columns"`
}

func (TableViewDefinition) TableName

func (TableViewDefinition) TableName() string

type TechLimit

type TechLimit struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	Key        string    `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key_unique,unique" json:"key"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp;DEFAULT:current_timestamp" json:"updatedAt"`
	UsageCount int       `gorm:"column:usage_count;type:int;NOT NULL" json:"limit"`
}

func (TechLimit) TableName

func (TechLimit) TableName() string

type TenantWebhook

type TenantWebhook struct {
	// tenant, event, webhook, api key
	ID              uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName      string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	CreatedAt       time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt       time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
	WebhookUrl      string    `gorm:"column:webhook_url;type:varchar(255);NOT NULL" json:"webhook" binding:"required"`
	ApiKey          string    `gorm:"column:api_key;type:varchar(255);NOT NULL" json:"apiKey" binding:"required"`
	Event           string    `gorm:"column:event;type:varchar(255);NOT NULL" json:"event" binding:"required"`
	AuthHeaderName  string    `gorm:"column:auth_header_name;type:varchar(255)" json:"authHeaderName"`
	AuthHeaderValue string    `gorm:"column:auth_header_value;type:varchar(255)" json:"authHeaderValue"`
	// data for notifying user if webhook fails
	UserId        string `gorm:"column:user_id;type:varchar(255)" json:"userId"`
	UserFirstName string `gorm:"column:user_first_name;type:varchar(255)" json:"userFirstName"`
	UserLastName  string `gorm:"column:user_last_name;type:varchar(255)" json:"userLastName"`
	UserEmail     string `gorm:"column:user_email;type:varchar(255)" json:"userEmail"`
}

func (TenantWebhook) TableName

func (TenantWebhook) TableName() string

func (TenantWebhook) UniqueIndex

func (TenantWebhook) UniqueIndex() [][]string

type TenantWebhookApiKey

type TenantWebhookApiKey struct {
	ID         uint64    `gorm:"primary_key;autoIncrement:true" json:"id"`
	TenantName string    `gorm:"column:tenant_name;type:varchar(255);NOT NULL" json:"tenantName" binding:"required"`
	Key        string    `gorm:"column:key;type:varchar(255);NOT NULL;index:idx_key,unique" json:"key" binding:"required"`
	CreatedAt  time.Time `gorm:"column:created_at;type:timestamp;DEFAULT:current_timestamp" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:timestamp" json:"updatedAt"`
}

func (TenantWebhookApiKey) TableName

func (TenantWebhookApiKey) TableName() string

type TrackingAllowedOrigin

type TrackingAllowedOrigin struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL;index:name_domain_idx,unique" json:"tenant" binding:"required"`
	Origin    string    `gorm:"column:origin;type:varchar(255);NOT NULL;index:name_domain_idx,unique" json:"name" binding:"required"`
}

func (TrackingAllowedOrigin) TableName

func (TrackingAllowedOrigin) TableName() string

type WhitelistDomain

type WhitelistDomain struct {
	ID        string    `gorm:"primary_key;type:uuid;default:gen_random_uuid()" json:"id"`
	CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP"`
	Tenant    string    `gorm:"column:tenant;type:varchar(255);NOT NULL;index:name_domain_idx,unique" json:"tenant" binding:"required"`
	Name      string    `gorm:"column:name;type:varchar(255);NOT NULL;index:name_domain_idx,unique" json:"name" binding:"required"`
	Domain    string    `gorm:"column:domain;type:varchar(100);NOT NULL;index:name_domain_idx,unique" json:"domain" binding:"required"`
	Allowed   bool      `gorm:"column:allowed;" json:"allowed" binding:"required"`
}

func (WhitelistDomain) TableName

func (WhitelistDomain) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL