Files
sam-api/LOGICAL_RELATIONSHIPS.md
김보곤 b9137c93b0 feat:AI 음성녹음 테이블 마이그레이션 및 모델 추가
- ai_voice_recordings 테이블 마이그레이션 생성
- AiVoiceRecording 모델 추가 (Tenants 네임스페이스)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 12:52:28 +09:00

30 KiB

논리적 데이터베이스 관계 문서

자동 생성: 2026-02-07 09:56:46 소스: Eloquent 모델 관계 분석

📊 모델별 관계 현황

bad_debts

모델: App\Models\BadDebts\BadDebt

  • client(): belongsTo → clients
  • assignedUser(): belongsTo → users
  • creator(): belongsTo → users
  • documents(): hasMany → bad_debt_documents
  • memos(): hasMany → bad_debt_memos

bad_debt_documents

모델: App\Models\BadDebts\BadDebtDocument

  • badDebt(): belongsTo → bad_debts
  • file(): belongsTo → files

bad_debt_memos

모델: App\Models\BadDebts\BadDebtMemo

  • badDebt(): belongsTo → bad_debts
  • creator(): belongsTo → users

biddings

모델: App\Models\Bidding\Bidding

  • quote(): belongsTo → quotes
  • client(): belongsTo → clients
  • bidder(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users

boards

모델: App\Models\Boards\Board

  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • customFields(): hasMany → board_settings
  • posts(): hasMany → posts

board_comments

모델: App\Models\Boards\BoardComment

  • post(): belongsTo → posts
  • user(): belongsTo → users
  • parent(): belongsTo → board_comments
  • children(): hasMany → board_comments

board_settings

모델: App\Models\Boards\BoardSetting

  • board(): belongsTo → boards

posts

모델: App\Models\Boards\Post

  • board(): belongsTo → boards
  • files(): hasMany → files
  • comments(): hasMany → board_comments

post_custom_field_values

모델: App\Models\Boards\PostCustomFieldValue

  • post(): belongsTo → posts
  • field(): belongsTo → board_settings

category_groups

모델: App\Models\CategoryGroup

  • tenant(): belongsTo → tenants

categorys

모델: App\Models\Commons\Category

  • parent(): belongsTo → categories
  • children(): hasMany → categories
  • products(): hasMany → products
  • categoryFields(): hasMany → category_fields

category_fields

모델: App\Models\Commons\CategoryField

  • category(): belongsTo → categories

category_logs

모델: App\Models\Commons\CategoryLog

  • category(): belongsTo → categories

category_templates

모델: App\Models\Commons\CategoryTemplate

  • category(): belongsTo → categories

files

모델: App\Models\Commons\File

  • tenant(): belongsTo → tenants
  • folder(): belongsTo → folders
  • uploader(): belongsTo → users
  • shareLinks(): hasMany → file_share_links
  • fileable(): morphTo → (Polymorphic)

global_menus

모델: App\Models\Commons\GlobalMenu

  • parent(): belongsTo → global_menus
  • children(): hasMany → global_menus
  • tenantMenus(): hasMany → menus

menus

모델: App\Models\Commons\Menu

  • parent(): belongsTo → menus
  • globalMenu(): belongsTo → global_menus
  • children(): hasMany → menus

tags

모델: App\Models\Commons\Tag

  • tenant(): belongsTo → tenants

company_requests

모델: App\Models\CompanyRequest

  • user(): belongsTo → users
  • approver(): belongsTo → users
  • createdTenant(): belongsTo → tenants

contracts

모델: App\Models\Construction\Contract

  • contractManager(): belongsTo → users
  • constructionPm(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • handoverReport(): hasOne → handover_reports

handover_reports

모델: App\Models\Construction\HandoverReport

  • contract(): belongsTo → contracts
  • contractManager(): belongsTo → users
  • constructionPm(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • managers(): hasMany → handover_report_managers
  • items(): hasMany → handover_report_items

handover_report_items

모델: App\Models\Construction\HandoverReportItem

  • handoverReport(): belongsTo → handover_reports
  • creator(): belongsTo → users
  • updater(): belongsTo → users

handover_report_managers

모델: App\Models\Construction\HandoverReportManager

  • handoverReport(): belongsTo → handover_reports
  • creator(): belongsTo → users
  • updater(): belongsTo → users

structure_reviews

모델: App\Models\Construction\StructureReview

  • creator(): belongsTo → users
  • updater(): belongsTo → users

bom_templates

모델: App\Models\Design\BomTemplate

  • modelVersion(): belongsTo → model_versions
  • items(): hasMany → bom_template_items

bom_template_items

모델: App\Models\Design\BomTemplateItem

  • template(): belongsTo → bom_templates

design_models

모델: App\Models\Design\DesignModel

  • versions(): hasMany → model_versions

model_versions

모델: App\Models\Design\ModelVersion

  • model(): belongsTo → models
  • bomTemplates(): hasMany → bom_templates

documents

모델: App\Models\Documents\Document

  • template(): belongsTo → document_templates
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • approvals(): hasMany → document_approvals
  • data(): hasMany → document_data
  • attachments(): hasMany → document_attachments
  • linkable(): morphTo → (Polymorphic)

document_approvals

모델: App\Models\Documents\DocumentApproval

  • document(): belongsTo → documents
  • user(): belongsTo → users
  • creator(): belongsTo → users

document_attachments

모델: App\Models\Documents\DocumentAttachment

  • document(): belongsTo → documents
  • file(): belongsTo → files
  • creator(): belongsTo → users

document_datas

모델: App\Models\Documents\DocumentData

  • document(): belongsTo → documents

모델: App\Models\Documents\DocumentLink

  • document(): belongsTo → documents
  • linkDefinition(): belongsTo → document_template_links

document_templates

모델: App\Models\Documents\DocumentTemplate

  • approvalLines(): hasMany → document_template_approval_lines
  • basicFields(): hasMany → document_template_basic_fields
  • sections(): hasMany → document_template_sections
  • columns(): hasMany → document_template_columns
  • sectionFields(): hasMany → document_template_section_fields
  • links(): hasMany → document_template_links

document_template_approval_lines

모델: App\Models\Documents\DocumentTemplateApprovalLine

  • template(): belongsTo → document_templates

document_template_basic_fields

모델: App\Models\Documents\DocumentTemplateBasicField

  • template(): belongsTo → document_templates

document_template_columns

모델: App\Models\Documents\DocumentTemplateColumn

  • template(): belongsTo → document_templates

모델: App\Models\Documents\DocumentTemplateLink

  • template(): belongsTo → document_templates
  • linkValues(): hasMany → document_template_link_values

모델: App\Models\Documents\DocumentTemplateLinkValue

  • template(): belongsTo → document_templates
  • link(): belongsTo → document_template_links

document_template_sections

모델: App\Models\Documents\DocumentTemplateSection

  • template(): belongsTo → document_templates
  • items(): hasMany → document_template_section_items

document_template_section_fields

모델: App\Models\Documents\DocumentTemplateSectionField

  • template(): belongsTo → document_templates

document_template_section_items

모델: App\Models\Documents\DocumentTemplateSectionItem

  • section(): belongsTo → document_template_sections

estimates

모델: App\Models\Estimate\Estimate

  • modelSet(): belongsTo → categories
  • items(): hasMany → estimate_items

estimate_items

모델: App\Models\Estimate\EstimateItem

  • estimate(): belongsTo → estimates

fcm_send_logs

모델: App\Models\FcmSendLog

모델: App\Models\FileShareLink

  • file(): belongsTo → files
  • tenant(): belongsTo → tenants

folders

모델: App\Models\Folder

interview_answers

모델: App\Models\Interview\InterviewAnswer

  • session(): belongsTo → interview_sessions
  • question(): belongsTo → interview_questions
  • template(): belongsTo → interview_templates

interview_categorys

모델: App\Models\Interview\InterviewCategory

  • templates(): hasMany → interview_templates
  • sessions(): hasMany → interview_sessions

interview_questions

모델: App\Models\Interview\InterviewQuestion

  • template(): belongsTo → interview_templates

interview_sessions

모델: App\Models\Interview\InterviewSession

  • category(): belongsTo → interview_categories
  • answers(): hasMany → interview_answers

interview_templates

모델: App\Models\Interview\InterviewTemplate

  • category(): belongsTo → interview_categories
  • questions(): hasMany → interview_questions

custom_tabs

모델: App\Models\ItemMaster\CustomTab

  • columnSetting(): hasOne → tab_columns

entity_relationships

모델: App\Models\ItemMaster\EntityRelationship

  • parent(): morphTo → (Polymorphic)
  • child(): morphTo → (Polymorphic)

item_pages

모델: App\Models\ItemMaster\ItemPage

  • sectionRelationships(): hasMany → entity_relationships
  • fieldRelationships(): hasMany → entity_relationships
  • allRelationships(): hasMany → entity_relationships

item_sections

모델: App\Models\ItemMaster\ItemSection

  • fieldRelationships(): hasMany → entity_relationships
  • bomRelationships(): hasMany → entity_relationships
  • allChildRelationships(): hasMany → entity_relationships

tab_columns

모델: App\Models\ItemMaster\TabColumn

  • tab(): belongsTo → custom_tabs

items

모델: App\Models\Items\Item

  • category(): belongsTo → categories
  • files(): hasMany → files
  • details(): hasOne → item_details
  • stock(): hasOne → stocks

item_details

모델: App\Models\Items\ItemDetail

  • item(): belongsTo → items

item_receipts

모델: App\Models\Items\ItemReceipt

  • item(): belongsTo → items
  • creator(): belongsTo → users

login_tokens

모델: App\Models\LoginToken

  • user(): belongsTo → users

main_requests

모델: App\Models\MainRequest

  • flows(): hasMany → main_request_flows

main_request_flows

모델: App\Models\MainRequestFlow

  • mainRequest(): belongsTo → main_requests
  • flowable(): morphTo → (Polymorphic)

materials

모델: App\Models\Materials\Material

  • category(): belongsTo → categories
  • receipts(): hasMany → material_receipts
  • lots(): hasMany → lots
  • files(): morphMany → files

material_inspections

모델: App\Models\Materials\MaterialInspection

  • receipt(): belongsTo → material_receipts
  • items(): hasMany → material_inspection_items

material_inspection_items

모델: App\Models\Materials\MaterialInspectionItem

  • inspection(): belongsTo → material_inspections

material_receipts

모델: App\Models\Materials\MaterialReceipt

  • material(): belongsTo → materials
  • inspections(): hasMany → material_inspections

users

모델: App\Models\Members\User

  • userTenants(): hasMany → user_tenants
  • userRoles(): hasMany → user_roles
  • tenantProfiles(): hasMany → tenant_user_profiles
  • userTenant(): hasOne → user_tenants
  • userTenantById(): hasOne → user_tenants
  • tenantProfile(): hasOne → tenant_user_profiles
  • tenantsMembership(): belongsToMany → tenants
  • files(): morphMany → files

user_menu_permissions

모델: App\Models\Members\UserMenuPermission

  • user(): belongsTo → users
  • menu(): belongsTo → menus

user_roles

모델: App\Models\Members\UserRole

  • user(): belongsTo → users
  • tenant(): belongsTo → tenants
  • role(): belongsTo → roles

user_tenants

모델: App\Models\Members\UserTenant

  • user(): belongsTo → users
  • tenant(): belongsTo → tenants

notification_settings

모델: App\Models\NotificationSetting

notification_setting_groups

모델: App\Models\NotificationSettingGroup

  • items(): hasMany → notification_setting_group_items

notification_setting_group_items

모델: App\Models\NotificationSettingGroupItem

  • group(): belongsTo → notification_setting_groups

notification_setting_group_states

모델: App\Models\NotificationSettingGroupState

clients

모델: App\Models\Orders\Client

  • clientGroup(): belongsTo → client_groups
  • orders(): hasMany → orders
  • badDebts(): hasMany → bad_debts
  • activeBadDebts(): hasMany → bad_debts

client_groups

모델: App\Models\Orders\ClientGroup

  • clients(): hasMany → clients

orders

모델: App\Models\Orders\Order

  • quote(): belongsTo → quotes
  • client(): belongsTo → clients
  • writer(): belongsTo → users
  • item(): belongsTo → items
  • sale(): belongsTo → sales
  • items(): hasMany → order_items
  • histories(): hasMany → order_histories
  • versions(): hasMany → order_versions
  • workOrders(): hasMany → work_orders
  • shipments(): hasMany → shipments
  • sales(): hasMany → sales

order_historys

모델: App\Models\Orders\OrderHistory

  • order(): belongsTo → orders

order_items

모델: App\Models\Orders\OrderItem

  • order(): belongsTo → orders
  • item(): belongsTo → items
  • quote(): belongsTo → quotes
  • quoteItem(): belongsTo → quote_items
  • components(): hasMany → order_item_components

order_item_components

모델: App\Models\Orders\OrderItemComponent

  • orderItem(): belongsTo → order_items

order_versions

모델: App\Models\Orders\OrderVersion

  • order(): belongsTo → orders

permissions

모델: App\Models\Permissions\Permission

  • tenant(): belongsTo → tenants

permission_overrides

모델: App\Models\Permissions\PermissionOverride

  • permission(): belongsTo → permissions

roles

모델: App\Models\Permissions\Role

  • tenant(): belongsTo → tenants
  • menuPermissions(): hasMany → role_menu_permissions
  • userRoles(): hasMany → user_roles
  • users(): belongsToMany → users
  • permissions(): belongsToMany → permissions

role_menu_permissions

모델: App\Models\Permissions\RoleMenuPermission

  • role(): belongsTo → roles
  • menu(): belongsTo → menus

popups

모델: App\Models\Popups\Popup

  • department(): belongsTo → departments
  • creator(): belongsTo → users
  • updater(): belongsTo → users

process

모델: App\Models\Process

  • classificationRules(): hasMany → process_classification_rules
  • processItems(): hasMany → process_items
  • steps(): hasMany → process_steps

process_classification_rules

모델: App\Models\ProcessClassificationRule

  • process(): belongsTo → processes

process_items

모델: App\Models\ProcessItem

  • process(): belongsTo → processes
  • item(): belongsTo → items

process_steps

모델: App\Models\ProcessStep

  • process(): belongsTo → processes

work_orders

모델: App\Models\Production\WorkOrder

  • salesOrder(): belongsTo → orders
  • process(): belongsTo → processes
  • assignee(): belongsTo → users
  • team(): belongsTo → departments
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • assignees(): hasMany → work_order_assignees
  • primaryAssignee(): hasMany → work_order_assignees
  • items(): hasMany → work_order_items
  • issues(): hasMany → work_order_issues
  • shipments(): hasMany → shipments
  • bendingDetail(): hasOne → work_order_bending_details

work_order_assignees

모델: App\Models\Production\WorkOrderAssignee

  • workOrder(): belongsTo → work_orders
  • user(): belongsTo → users

work_order_bending_details

모델: App\Models\Production\WorkOrderBendingDetail

  • workOrder(): belongsTo → work_orders

work_order_issues

모델: App\Models\Production\WorkOrderIssue

  • workOrder(): belongsTo → work_orders
  • reporter(): belongsTo → users
  • resolver(): belongsTo → users

work_order_items

모델: App\Models\Production\WorkOrderItem

  • workOrder(): belongsTo → work_orders
  • item(): belongsTo → items

work_results

모델: App\Models\Production\WorkResult

  • workOrder(): belongsTo → work_orders
  • workOrderItem(): belongsTo → work_order_items
  • worker(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users

common_codes

모델: App\Models\Products\CommonCode

  • parent(): belongsTo → common_codes
  • children(): hasMany → common_codes

parts

모델: App\Models\Products\Part

  • category(): belongsTo → common_codes
  • partType(): belongsTo → common_codes

prices

모델: App\Models\Products\Price

  • clientGroup(): belongsTo → client_groups
  • revisions(): hasMany → price_revisions

price_revisions

모델: App\Models\Products\PriceRevision

  • price(): belongsTo → prices

products

모델: App\Models\Products\Product

  • category(): belongsTo → categories
  • componentLines(): hasMany → product_components
  • parentLines(): hasMany → product_components
  • children(): belongsToMany → products
  • parents(): belongsToMany → products
  • files(): morphMany → files

product_components

모델: App\Models\Products\ProductComponent

  • parentProduct(): belongsTo → products
  • product(): belongsTo → products
  • material(): belongsTo → materials

push_device_tokens

모델: App\Models\PushDeviceToken

push_notification_settings

모델: App\Models\PushNotificationSetting

inspections

모델: App\Models\Qualitys\Inspection

  • item(): belongsTo → items
  • inspector(): belongsTo → users
  • creator(): belongsTo → users

lots

모델: App\Models\Qualitys\Lot

  • item(): belongsTo → items
  • sales(): hasMany → lot_sales

lot_sales

모델: App\Models\Qualitys\LotSale

  • lot(): belongsTo → lots

quotes

모델: App\Models\Quote\Quote

  • client(): belongsTo → clients
  • item(): belongsTo → items
  • order(): belongsTo → orders
  • siteBriefing(): belongsTo → site_briefings
  • finalizer(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • items(): hasMany → quote_items
  • revisions(): hasMany → quote_revisions
  • orders(): hasMany → orders

quote_formulas

모델: App\Models\Quote\QuoteFormula

  • category(): belongsTo → quote_formula_categories
  • ranges(): hasMany → quote_formula_ranges
  • mappings(): hasMany → quote_formula_mappings
  • items(): hasMany → quote_formula_items

quote_formula_categorys

모델: App\Models\Quote\QuoteFormulaCategory

  • formulas(): hasMany → quote_formulas

quote_formula_items

모델: App\Models\Quote\QuoteFormulaItem

  • formula(): belongsTo → quote_formulas

quote_formula_mappings

모델: App\Models\Quote\QuoteFormulaMapping

  • formula(): belongsTo → quote_formulas

quote_formula_ranges

모델: App\Models\Quote\QuoteFormulaRange

  • formula(): belongsTo → quote_formulas

quote_items

모델: App\Models\Quote\QuoteItem

  • quote(): belongsTo → quotes

quote_revisions

모델: App\Models\Quote\QuoteRevision

  • quote(): belongsTo → quotes
  • reviser(): belongsTo → users

ai_reports

모델: App\Models\Tenants\AiReport

  • creator(): belongsTo → users

ai_token_usages

모델: App\Models\Tenants\AiTokenUsage

  • creator(): belongsTo → users

approvals

모델: App\Models\Tenants\Approval

  • form(): belongsTo → approval_forms
  • drafter(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • steps(): hasMany → approval_steps
  • approverSteps(): hasMany → approval_steps
  • referenceSteps(): hasMany → approval_steps

approval_forms

모델: App\Models\Tenants\ApprovalForm

  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • approvals(): hasMany → approvals

approval_lines

모델: App\Models\Tenants\ApprovalLine

  • creator(): belongsTo → users
  • updater(): belongsTo → users

approval_steps

모델: App\Models\Tenants\ApprovalStep

  • approval(): belongsTo → approvals
  • approver(): belongsTo → users

attendances

모델: App\Models\Tenants\Attendance

  • user(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users

bank_accounts

모델: App\Models\Tenants\BankAccount

  • assignedUser(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users

barobill_settings

모델: App\Models\Tenants\BarobillSetting

  • tenant(): belongsTo → tenants
  • creator(): belongsTo → users
  • updater(): belongsTo → users

bills

모델: App\Models\Tenants\Bill

  • client(): belongsTo → clients
  • bankAccount(): belongsTo → bank_accounts
  • creator(): belongsTo → users
  • installments(): hasMany → bill_installments

bill_installments

모델: App\Models\Tenants\BillInstallment

  • bill(): belongsTo → bills
  • creator(): belongsTo → users

cards

모델: App\Models\Tenants\Card

  • assignedUser(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users

data_exports

모델: App\Models\Tenants\DataExport

  • tenant(): belongsTo → tenants
  • creator(): belongsTo → users

departments

모델: App\Models\Tenants\Department

  • parent(): belongsTo → departments
  • children(): hasMany → departments
  • departmentUsers(): hasMany → department_user
  • users(): belongsToMany → users
  • permissionOverrides(): morphMany → permission_overrides

deposits

모델: App\Models\Tenants\Deposit

  • client(): belongsTo → clients
  • bankAccount(): belongsTo → bank_accounts
  • creator(): belongsTo → users

expected_expenses

모델: App\Models\Tenants\ExpectedExpense

  • client(): belongsTo → clients
  • bankAccount(): belongsTo → bank_accounts
  • creator(): belongsTo → users
  • source(): morphTo → (Polymorphic)

expense_accounts

모델: App\Models\Tenants\ExpenseAccount

  • vendor(): belongsTo → clients

leaves

모델: App\Models\Tenants\Leave

  • user(): belongsTo → users
  • approver(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • userProfile(): hasOne → tenant_user_profiles

leave_balances

모델: App\Models\Tenants\LeaveBalance

  • user(): belongsTo → users

leave_grants

모델: App\Models\Tenants\LeaveGrant

  • user(): belongsTo → users
  • creator(): belongsTo → users

leave_policys

모델: App\Models\Tenants\LeavePolicy

  • tenant(): belongsTo → tenants

loans

모델: App\Models\Tenants\Loan

  • withdrawal(): belongsTo → withdrawals

payments

모델: App\Models\Tenants\Payment

  • subscription(): belongsTo → subscriptions

payrolls

모델: App\Models\Tenants\Payroll

  • user(): belongsTo → users
  • confirmer(): belongsTo → users
  • withdrawal(): belongsTo → withdrawals
  • creator(): belongsTo → users
  • updater(): belongsTo → users

payroll_settings

모델: App\Models\Tenants\PayrollSetting

  • tenant(): belongsTo → tenants

department_users

모델: App\Models\Tenants\Pivots\DepartmentUser

  • department(): belongsTo → departments
  • user(): belongsTo → users

plans

모델: App\Models\Tenants\Plan

  • subscriptions(): hasMany → subscriptions

purchases

모델: App\Models\Tenants\Purchase

  • client(): belongsTo → clients
  • withdrawal(): belongsTo → withdrawals
  • approval(): belongsTo → approvals
  • creator(): belongsTo → users

receivings

모델: App\Models\Tenants\Receiving

  • item(): belongsTo → items
  • creator(): belongsTo → users

salarys

모델: App\Models\Tenants\Salary

  • employee(): belongsTo → users
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • employeeProfile(): hasOne → tenant_user_profiles

sales

모델: App\Models\Tenants\Sale

  • order(): belongsTo → orders
  • shipment(): belongsTo → shipments
  • client(): belongsTo → clients
  • deposit(): belongsTo → deposits
  • creator(): belongsTo → users

schedules

모델: App\Models\Tenants\Schedule

  • creator(): belongsTo → users
  • updater(): belongsTo → users

setting_field_defs

모델: App\Models\Tenants\SettingFieldDef

  • tenantSettings(): hasMany → tenant_field_settings

shipments

모델: App\Models\Tenants\Shipment

  • order(): belongsTo → orders
  • workOrder(): belongsTo → work_orders
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • items(): hasMany → shipment_items

shipment_items

모델: App\Models\Tenants\ShipmentItem

  • shipment(): belongsTo → shipments
  • stockLot(): belongsTo → stock_lots

sites

모델: App\Models\Tenants\Site

  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • client(): belongsTo → clients

site_briefings

모델: App\Models\Tenants\SiteBriefing

  • partner(): belongsTo → clients
  • site(): belongsTo → sites
  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • quotes(): hasMany → quotes

stocks

모델: App\Models\Tenants\Stock

  • item(): belongsTo → items
  • creator(): belongsTo → users
  • lots(): hasMany → stock_lots
  • transactions(): hasMany → stock_transactions

stock_lots

모델: App\Models\Tenants\StockLot

  • stock(): belongsTo → stocks
  • receiving(): belongsTo → receivings
  • creator(): belongsTo → users

stock_transactions

모델: App\Models\Tenants\StockTransaction

  • stock(): belongsTo → stocks
  • stockLot(): belongsTo → stock_lots
  • creator(): belongsTo → users

subscriptions

모델: App\Models\Tenants\Subscription

  • tenant(): belongsTo → tenants
  • plan(): belongsTo → plans
  • payments(): hasMany → payments

tax_invoices

모델: App\Models\Tenants\TaxInvoice

  • creator(): belongsTo → users
  • updater(): belongsTo → users
  • reference(): morphTo → (Polymorphic)

tenants

모델: App\Models\Tenants\Tenant

  • plan(): belongsTo → plans
  • subscription(): belongsTo → subscriptions
  • userTenants(): hasMany → user_tenants
  • roles(): hasMany → roles
  • userRoles(): hasMany → user_roles
  • users(): belongsToMany → users
  • files(): morphMany → files

tenant_field_settings

모델: App\Models\Tenants\TenantFieldSetting

  • fieldDef(): belongsTo → setting_field_defs
  • optionGroup(): belongsTo → tenant_option_groups

tenant_option_groups

모델: App\Models\Tenants\TenantOptionGroup

  • values(): hasMany → tenant_option_values

tenant_option_values

모델: App\Models\Tenants\TenantOptionValue

  • group(): belongsTo → tenant_option_groups

tenant_stat_fields

모델: App\Models\Tenants\TenantStatField

  • tenant(): belongsTo → tenants

tenant_user_profiles

모델: App\Models\Tenants\TenantUserProfile

  • user(): belongsTo → users
  • department(): belongsTo → departments
  • manager(): belongsTo → users
  • rankPosition(): belongsTo → positions
  • titlePosition(): belongsTo → positions

today_issues

모델: App\Models\Tenants\TodayIssue

withdrawals

모델: App\Models\Tenants\Withdrawal

  • client(): belongsTo → clients
  • bankAccount(): belongsTo → bank_accounts
  • card(): belongsTo → cards
  • creator(): belongsTo → users

user_invitations

모델: App\Models\UserInvitation

  • tenant(): belongsTo → tenants
  • role(): belongsTo → roles
  • inviter(): belongsTo → users