Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClientCollection = "clients" InvitationCollection = "invitations" PermissionCollection = "permissions" RoleCollection = "roles" KeyCollection = "keys" UserCollection = "users" )
Variables ¶
View Source
var AllExpenseStatus = []ExpenseStatus{ ExpenseStatusDraft, ExpenseStatusSubmitted, ExpenseStatusApproved, ExpenseStatusRejected, ExpenseStatusPaid, }
View Source
var AllExpenseType = []ExpenseType{ ExpenseTypeDebit, ExpenseTypeCredit, }
View Source
var AllPayer = []Payer{ PayerEmployee, PayerCompany, }
Functions ¶
This section is empty.
Types ¶
type Expense ¶
type Expense struct { Model `bson:",inline"` User primitive.ObjectID `json:"user" bson:"user"` Type string `json:"type" bson:"type"` Code string `json:"code" bson:"code"` Description string `json:"description,omitempty" bson:"description,omitempty"` Amount float64 `json:"amount" bson:"amount"` Currency string `json:"currency" bson:"currency"` Date primitive.DateTime `json:"date" bson:"date"` Notes string `json:"notes,omitempty" bson:"notes,omitempty"` Status string `json:"status" bson:"status"` }
func (*Expense) Collection ¶
func (*Expense) Index ¶
func (i *Expense) Index() []mongo.IndexModel
func (*Expense) MarshalBSON ¶
type ExpenseStatus ¶
type ExpenseStatus string
const ( ExpenseStatusDraft ExpenseStatus = "DRAFT" ExpenseStatusSubmitted ExpenseStatus = "SUBMITTED" ExpenseStatusApproved ExpenseStatus = "APPROVED" ExpenseStatusRejected ExpenseStatus = "REJECTED" ExpenseStatusPaid ExpenseStatus = "PAID" )
func (ExpenseStatus) IsValid ¶
func (e ExpenseStatus) IsValid() bool
func (ExpenseStatus) MarshalGQL ¶
func (e ExpenseStatus) MarshalGQL(w io.Writer)
func (ExpenseStatus) String ¶
func (e ExpenseStatus) String() string
func (*ExpenseStatus) UnmarshalGQL ¶
func (e *ExpenseStatus) UnmarshalGQL(v interface{}) error
type ExpenseType ¶
type ExpenseType string
const ( ExpenseTypeDebit ExpenseType = "DEBIT" ExpenseTypeCredit ExpenseType = "CREDIT" )
func (ExpenseType) IsValid ¶
func (e ExpenseType) IsValid() bool
func (ExpenseType) MarshalGQL ¶
func (e ExpenseType) MarshalGQL(w io.Writer)
func (ExpenseType) String ¶
func (e ExpenseType) String() string
func (*ExpenseType) UnmarshalGQL ¶
func (e *ExpenseType) UnmarshalGQL(v interface{}) error
type Invoice ¶
type Invoice struct { Model `bson:",inline"` User primitive.ObjectID `json:"user" bson:"user"` Code string `json:"code" bson:"code"` Template string `json:"template" bson:"template"` Amount float64 `json:"amount" bson:"amount"` Currency string `json:"currency" bson:"currency"` DueDate primitive.Timestamp `json:"dueDate" bson:"due_date"` Billing primitive.M `json:"billing" bson:"billing"` Notes string `json:"notes,omitempty" bson:"notes,omitempty"` Status string `json:"status" bson:"status"` }
func (*Invoice) Collection ¶
func (*Invoice) Index ¶
func (i *Invoice) Index() []mongo.IndexModel
func (*Invoice) MarshalBSON ¶
type Model ¶
type Model struct { ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"` Workspace primitive.ObjectID `json:"workspace,omitempty" bson:"workspace,omitempty"` Metadata primitive.M `json:"metadata,omitempty" bson:"metadata,omitempty"` Created primitive.Timestamp `json:"created,omitempty" bson:"created,omitempty"` Updated primitive.Timestamp `json:"updated,omitempty" bson:"updated,omitempty"` Deleted primitive.Timestamp `json:"deleted,omitempty" bson:"deleted,omitempty"` Timestamp primitive.Timestamp `json:"timestamp,omitempty" bson:"timestamp,omitempty"` }
type NewExpense ¶
type NewExpense struct { Type string `json:"type"` Code *string `json:"code,omitempty"` Description string `json:"description"` Amount float64 `json:"amount"` Currency string `json:"currency"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Date string `json:"date"` User string `json:"user"` Notes *string `json:"notes,omitempty"` Categories []string `json:"categories,omitempty"` }
type NewInvoice ¶
type NewInvoice struct { Code *string `json:"code,omitempty"` Template *string `json:"template,omitempty"` Amount *int `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` Billing map[string]interface{} `json:"billing,omitempty"` DueDate *string `json:"due_date,omitempty"` Notes *string `json:"notes,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
type UpdateExpense ¶
type UpdateExpense struct { Type *string `json:"type,omitempty"` Code *string `json:"code,omitempty"` Description *string `json:"description,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` Status *string `json:"status,omitempty"` Date *string `json:"date,omitempty"` Amount *float64 `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` User *string `json:"user,omitempty"` Notes *string `json:"notes,omitempty"` Categories []string `json:"categories,omitempty"` }
type UpdateInvoice ¶
type UpdateInvoice struct { Code *string `json:"code,omitempty"` Template *string `json:"template,omitempty"` Amount *int `json:"amount,omitempty"` Currency *string `json:"currency,omitempty"` Billing map[string]interface{} `json:"billing,omitempty"` DueDate *string `json:"due_date,omitempty"` Notes *string `json:"notes,omitempty"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
Click to show internal directories.
Click to hide internal directories.