chore(release): snapshot 1.4.2
This commit is contained in:
53
backend/internal/domain/crm.go
Normal file
53
backend/internal/domain/crm.go
Normal file
@@ -0,0 +1,53 @@
|
||||
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"`
|
||||
}
|
||||
20
backend/internal/domain/solution.go
Normal file
20
backend/internal/domain/solution.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type Solution struct {
|
||||
ID string `json:"id" db:"id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Slug string `json:"slug" db:"slug"`
|
||||
Icon string `json:"icon" db:"icon"`
|
||||
Description string `json:"description" db:"description"`
|
||||
IsActive bool `json:"is_active" db:"is_active"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
|
||||
}
|
||||
|
||||
type PlanSolution struct {
|
||||
PlanID string `json:"plan_id" db:"plan_id"`
|
||||
SolutionID string `json:"solution_id" db:"solution_id"`
|
||||
CreatedAt time.Time `json:"created_at" db:"created_at"`
|
||||
}
|
||||
@@ -45,7 +45,15 @@ type CreateTenantRequest struct {
|
||||
|
||||
// AgencyDetails aggregates tenant info with its admin user for superadmin view
|
||||
type AgencyDetails struct {
|
||||
Tenant *Tenant `json:"tenant"`
|
||||
Admin *User `json:"admin,omitempty"`
|
||||
AccessURL string `json:"access_url"`
|
||||
Tenant *Tenant `json:"tenant"`
|
||||
Admin *User `json:"admin,omitempty"`
|
||||
Subscription *AgencySubscriptionInfo `json:"subscription,omitempty"`
|
||||
AccessURL string `json:"access_url"`
|
||||
}
|
||||
|
||||
type AgencySubscriptionInfo struct {
|
||||
PlanID string `json:"plan_id"`
|
||||
PlanName string `json:"plan_name"`
|
||||
Status string `json:"status"`
|
||||
Solutions []Solution `json:"solutions"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user