db/specs/modelsold/mcc/contacts.v

112 lines
2.5 KiB
V

module biz
import base
import freeflowuniverse.herolib.data.ourtime
// ContactLabelType represents the type of label for contact information
pub enum ContactLabelType {
home
work
mobile
other
main
personal
business
school
custom // For user-defined labels
}
// SocialPlatformType represents the type of social media platform
pub enum SocialPlatformType {
facebook
twitter
linkedin
instagram
github
youtube
tiktok
reddit
pinterest
snapchat
whatsapp
telegram
discord
mastodon
other
}
// Contact represents a contact with all their information
pub struct Contact {
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
name string // Display name of the contact
first_name string
last_name string
nickname string
email []ContactEmail // Multiple email addresses with labels
phone []ContactPhone // Multiple phone numbers with labels
address []ContactAddress // Multiple addresses with labels
company string
job_title string
notes string
birthday ourtime.OurTime
website []string
social_profiles []SocialProfile
photo u32 // link to the attachment in the circle
custom_fields []CustomField // User-defined fields
}
// ContactEmail represents an email address with a label
pub struct ContactEmail {
pub mut:
email string
label ContactLabelType // Type of email address
primary bool
}
// ContactPhone represents a phone number with a label
pub struct ContactPhone {
pub mut:
number string
label ContactLabelType // Type of phone number
primary bool
}
// ContactAddress represents a physical address with a label
pub struct ContactAddress {
pub mut:
street string
city string
state string
postal_code string
country string
label ContactLabelType // Type of address
primary bool
}
// SocialProfile represents a social media profile
pub struct SocialProfile {
pub mut:
platform SocialPlatformType // Type of social media platform
username string
url string
}
// CustomField represents a user-defined field
pub struct CustomField {
pub mut:
label string
value string
}
// ContactGroup represents a group of contacts
pub struct ContactGroup {
base.Base // Provides id u32, creation_time, mod_time, comments []u32
pub mut:
name string
description string
contacts []u32 // IDs of contacts in this group
owner_id u32 // User who owns this group
shared_with []u32 // Users this group is shared with
}