54 lines
1.8 KiB
Go
54 lines
1.8 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type CRMCustomer struct {
|
|
ID string `json:"id" db:"id"`
|
|
TenantID string `json:"tenant_id" db:"tenant_id"`
|
|
Name string `json:"name" db:"name"`
|
|
Email string `json:"email" db:"email"`
|
|
Phone string `json:"phone" db:"phone"`
|
|
Company string `json:"company" db:"company"`
|
|
Position string `json:"position" db:"position"`
|
|
Address string `json:"address" db:"address"`
|
|
City string `json:"city" db:"city"`
|
|
State string `json:"state" db:"state"`
|
|
ZipCode string `json:"zip_code" db:"zip_code"`
|
|
Country string `json:"country" db:"country"`
|
|
Notes string `json:"notes" db:"notes"`
|
|
Tags []string `json:"tags" db:"tags"`
|
|
IsActive bool `json:"is_active" db:"is_active"`
|
|
CreatedBy string `json:"created_by" db:"created_by"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
|
}
|
|
|
|
type CRMList struct {
|
|
ID string `json:"id" db:"id"`
|
|
TenantID string `json:"tenant_id" db:"tenant_id"`
|
|
Name string `json:"name" db:"name"`
|
|
Description string `json:"description" db:"description"`
|
|
Color string `json:"color" db:"color"`
|
|
CreatedBy string `json:"created_by" db:"created_by"`
|
|
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
|
}
|
|
|
|
type CRMCustomerList struct {
|
|
CustomerID string `json:"customer_id" db:"customer_id"`
|
|
ListID string `json:"list_id" db:"list_id"`
|
|
AddedAt time.Time `json:"added_at" db:"added_at"`
|
|
AddedBy string `json:"added_by" db:"added_by"`
|
|
}
|
|
|
|
// DTO com informações extras
|
|
type CRMCustomerWithLists struct {
|
|
CRMCustomer
|
|
Lists []CRMList `json:"lists"`
|
|
}
|
|
|
|
type CRMListWithCustomers struct {
|
|
CRMList
|
|
CustomerCount int `json:"customer_count"`
|
|
}
|