mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-10-25 09:03:53 +00:00
- Update all SQL queries to add missing columns - Update the create conversation API to allow setting the initiator of a conversation. For example, we might want to use this API to create a conversation on behalf of a customer, with the first message coming from the customer instead of the agent. This param allows this. - Minor refactors and clean up - Tidy go.mod - Rename structs to reflect purpose - Create focus structs for scanning JSON payloads for clarity.
22 lines
734 B
Go
22 lines
734 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/lib/pq"
|
|
)
|
|
|
|
type CustomAttribute struct {
|
|
ID int `db:"id" json:"id"`
|
|
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
|
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
|
Name string `db:"name" json:"name"`
|
|
Description string `db:"description" json:"description"`
|
|
AppliesTo string `db:"applies_to" json:"applies_to"`
|
|
Key string `db:"key" json:"key"`
|
|
Values pq.StringArray `db:"values" json:"values"`
|
|
DataType string `db:"data_type" json:"data_type"`
|
|
Regex string `db:"regex" json:"regex"`
|
|
RegexHint string `db:"regex_hint" json:"regex_hint"`
|
|
}
|