1. Property

    • property_id: Primary Key
    • property_name: String
    • property_type: Enum (Industrial, Office, Land)
    • address: String
    • city: String
    • state: String
    • postal_code: String
    • country: String
    • description: Text
    • owner_id: Foreign Key (Contact or Lead)
    • businessentityid: Foreign Key (Business_Entity)
  2. Property_Image

    • image_id: Primary Key
    • property_id: Foreign Key (Property)
    • image_url: String
    • description: Text
  3. Inquiry

    • inquiry_id: Primary Key
    • property_id: Foreign Key (Property)
    • lead_id: Foreign Key (Lead)
    • inquiry_date: Date
    • user_id: Foreign Key (User)
    • inquiry_status: Enum (New, In Progress, Closed)
  4. Viewing

    • viewing_id: Primary Key
    • property_id: Foreign Key (Property)
    • lead_id: Foreign Key (Lead)
    • viewing_date: Date
    • user_id: Foreign Key (User)
  5. Lease_Agreement

    • leaseagreementid: Primary Key
    • property_id: Foreign Key (Property)
    • lead_id: Foreign Key (Lead)
    • start_date: Date
    • end_date: Date
    • rent_amount: Currency
    • currency: String
    • user_id: Foreign Key (User)
  6. Sale_Transaction

    • saletransactionid: Primary Key
    • property_id: Foreign Key (Property)
    • lead_id: Foreign Key (Lead)
    • transaction_date: Date
    • sale_amount: Currency
    • currency: String
    • user_id: Foreign Key (User)
  7. User

    • user_id: Primary Key
    • first_name: String
    • last_name: String
    • email: String
    • phone: String
    • role: Enum (Admin, Broker, Agent)
    • team_id: Foreign Key (Team)
  8. Contact

    • contact_id: Primary Key
    • first_name: String
    • last_name: String
    • email: String
    • phone: String
    • company: String
    • lead_id: Foreign Key (Lead)
  9. Lead

    • lead_id: Primary Key
    • first_name: String
    • last_name: String
    • email: String
    • phone: String
    • company: String
    • source: Enum (Cold Call, Referral, Advertisement, etc.)
    • initialcontactdate: Date
    • user_id: Foreign Key (User)
  10. Opportunity

    • opportunity_id: Primary Key
    • lead_id: Foreign Key (Lead)
    • property_id: Foreign Key (Property)
    • opportunity_type: Enum (Sale, Lease)
    • stage: Enum (Customizable)
    • probability: Float
    • user_id: Foreign Key (User)
  11. Task

    • task_id: Primary Key
    • assignedtoid: Foreign Key (User)
    • property_id: Foreign Key (Property)
    • description: Text
    • due_date: Date
    • status: Enum (Not Started, In Progress, Completed, Deferred)
    • priority: Enum (Low, Medium, High)
  12. Meeting

    • meeting_id: Primary Key
    • property_id: Foreign Key (Property)
    • organizer_id: Foreign Key (User)
    • title: String
    • description: Text
    • start_time: DateTime
    • end_time: DateTime
    • location: String
    • attendees: Many-to-Many Relationship (User)
  13. Email

    • email_id: Primary Key
    • sender_id: Foreign Key (User)
    • recipient_id: Foreign Key (User, Contact or Lead)
    • subject: String
    • content: Text
    • timestamp: DateTime
    • status: Enum (Sent, Received, Opened, Clicked)
  14. SMS

    • sms_id: Primary Key
    • sender_id: Foreign Key (User)
    • recipient_id: Foreign Key (User, Contact or Lead)
    • content: Text
    • timestamp: DateTime
    • status: Enum (Sent, Received, Delivered)
  15. Reminder

    • reminder_id: Primary Key
    • user_id: Foreign Key (User)
    • title: String
    • description: Text
    • timestamp: DateTime
    • status: Enum (Pending, Completed, Dismissed)
  16. Commission

    • commission_id: Primary Key
    • user_id: Foreign Key (User)
    • opportunity_id: Foreign Key (Opportunity)
    • commission_amount: Currency
    • currency: String
    • commission_date: Date
  17. Document_Template

    • template_id: Primary Key
    • template_name: String
    • template_type: Enum (Proposal, Presentation, Lease Agreement, Sale Agreement, etc.)
    • content: Text (or use a separate table for storing template sections)
  18. Email_Campaign

    • campaign_id: Primary Key
    • campaign_name: String
    • target_segment: Text
    • templateid: Foreign Key (DocumentTemplate)
    • start_date: Date
    • end_date: Date
    • user_id: Foreign Key (User)
  19. Notification

    • notification_id: Primary Key
    • user_id: Foreign Key (User)
    • notification_type: Enum (Email, SMS, Reminder, Event, Task)
    • relatedentityid: Foreign Key (Lead, Contact, Property, Opportunity, etc.)
    • relatedentitytype: Enum (Lead, Contact, Property, Opportunity, etc.)
    • message: Text
    • timestamp: DateTime
    • status: Enum (Unread, Read, Archived)
  20. Team

    • team_id: Primary Key
    • team_name: String
    • members: Many-to-Many Relationship (User)
  21. Business_Entity

    • entity_id: Primary Key
    • entity_name: String
    • entity_type: Enum (LLC, Corporation, Partnership, etc.)
    • address: String
    • city: String
    • state: String
    • postal_code: String
    • country: String
  22. Property_Valuation

    • valuation_id: Primary Key
    • property_id: Foreign Key (Property)
    • valuation_date: Date
    • estimated_value: Currency
    • currency: String
    • valuation_method: Enum (Comparable Sales, Income Capitalization, Cost Approach, etc.)
    • user_id: Foreign Key (User)
  23. LeadPropertyAssociation

    • leadpropertyassociation_id: Primary Key
    • lead_id: Foreign Key (Lead)
    • property_id: Foreign Key (Property)
  24. LeadDealAssociation

    • leaddealassociation_id: Primary Key
    • lead_id: Foreign Key (Lead)
    • deal_id: Foreign Key (Opportunity)
  25. Bulk_Email

    • bulkemailid: Primary Key
    • emailtemplateid: Foreign Key (Document_Template)
    • recipient_list: Text (consider using a separate table for storing recipient email addresses)
    • sent_date: Date
    • user_id: Foreign Key (User)
  26. Email_Thread

    • thread_id: Primary Key
    • subject: String
    • relatedentityid: Foreign Key (Lead, Contact, Property, Opportunity, etc.)
    • relatedentitytype: Enum (Lead, Contact, Property, Opportunity, etc.)
  27. EmailThreadParticipant

    • participant_id: Primary Key
    • threadid: Foreign Key (EmailThread)
    • participant_email: String
  28. Call

    • call_id: Primary Key
    • caller_id: Foreign Key (User)
    • recipient_id: Foreign Key (User, Contact or Lead)
    • start_time: DateTime
    • end_time: DateTime
    • call_notes: Text
    • call_outcome: Enum (Successful, Unsuccessful, No Answer, etc.)
  29. Metrics

    • metric_id: Primary Key
    • user_id: Foreign Key (User)
    • metric_type: Enum (Calls, Meetings, Emails, SMS, Opportunities, Closed Deals, etc.)
    • metric_value: Integer
    • timestamp: DateTime
  30. Inbox_Item

    • inboxitemid: Primary Key
    • user_id: Foreign Key (User)
    • item_type: Enum (Email, Meeting, Call, SMS, Reminder, Event, Task)
    • relatedentityid: Foreign Key (Lead, Contact, Property, Opportunity, etc.)
    • relatedentitytype: Enum (Lead, Contact, Property, Opportunity, etc.)
    • status: Enum (Active, Open, Completed, Archived)