BMS_ERD_mssql
Tables (66)
access_log
- access_log_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → app_user.user_id
- username — VARCHAR(64)
- action_code — VARCHAR(20) — NOT NULL
- resource_path — NVARCHAR(500)
- http_method — VARCHAR(10)
- ip_address — VARCHAR(45)
- user_agent — NVARCHAR(500)
- http_status — INT
- created_at — DATETIME2(3) — NOT NULL
app_role
- role_code — VARCHAR(64) — Primary key — NOT NULL
- role_name — NVARCHAR(100) — NOT NULL
- description — NVARCHAR(500)
- is_system — BIT — NOT NULL
- is_active — BIT — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
app_user
- user_id — BIGINT — Primary key — NOT NULL
- username — VARCHAR(64) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- display_name — NVARCHAR(100)
- role_code — VARCHAR(64) — Foreign key → app_role.role_code — NOT NULL
- status — VARCHAR(16) — NOT NULL
- contact_name — NVARCHAR(100)
- contact_phone — VARCHAR(30)
- email — VARCHAR(254)
- biz_area_code — VARCHAR(20)
- biz_area_name — NVARCHAR(100)
- dept_code — VARCHAR(20)
- dept_name — NVARCHAR(100)
- position_name — NVARCHAR(100)
- is_demo — BIT — NOT NULL
- approved_by — BIGINT — Foreign key → app_user.user_id
- approved_at — DATETIME2(3)
- last_login_at — DATETIME2(3)
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
approval_event
- approval_event_id — BIGINT — Primary key — NOT NULL
- approval_request_id — BIGINT — Foreign key → approval_request.approval_request_id — NOT NULL
- approval_step_id — BIGINT — Foreign key → approval_step.approval_step_id
- event_type — VARCHAR(20) — NOT NULL
- actor_user_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- status_before — VARCHAR(20)
- status_after — VARCHAR(20)
- comment — NVARCHAR(1000)
- created_at — DATETIME2(3) — NOT NULL
approval_link
- entity_type — VARCHAR(40) — Primary key — NOT NULL
- entity_id — BIGINT — Primary key — NOT NULL
- approval_request_id — BIGINT — Foreign key → approval_request.approval_request_id — NOT NULL
- request_sequence — INT — NOT NULL
- submit_group_id — VARCHAR(100)
- created_at — DATETIME2(3) — NOT NULL
approval_request
- approval_request_id — BIGINT — Primary key — NOT NULL
- document_type — VARCHAR(40) — NOT NULL
- document_no — VARCHAR(50)
- title — NVARCHAR(300) — NOT NULL
- summary — NVARCHAR(2000)
- requester_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- route_template_id — BIGINT — Foreign key → approval_route_template.route_template_id
- status — VARCHAR(20) — NOT NULL
- current_step_order — SMALLINT
- submit_comment — NVARCHAR(1000)
- final_comment — NVARCHAR(1000)
- submitted_at — DATETIME2(3)
- decided_at — DATETIME2(3)
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
approval_route_template
- route_template_id — BIGINT — Primary key — NOT NULL
- template_name — NVARCHAR(100) — NOT NULL
- document_type — VARCHAR(40) — NOT NULL
- dept_code — VARCHAR(20)
- is_default — BIT — NOT NULL
- is_active — BIT — NOT NULL
- created_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
approval_route_template_step
- route_template_step_id — BIGINT — Primary key — NOT NULL
- route_template_id — BIGINT — Foreign key → approval_route_template.route_template_id — NOT NULL
- step_order — SMALLINT — NOT NULL
- approver_user_id — BIGINT — Foreign key → app_user.user_id
- approver_role_code — VARCHAR(64) — Foreign key → app_role.role_code
- step_name — NVARCHAR(100)
- is_required — BIT — NOT NULL
approval_step
- approval_step_id — BIGINT — Primary key — NOT NULL
- approval_request_id — BIGINT — Foreign key → approval_request.approval_request_id — NOT NULL
- step_order — SMALLINT — NOT NULL
- approver_user_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- approver_name — NVARCHAR(100) — NOT NULL
- approver_dept — NVARCHAR(100)
- approver_position — NVARCHAR(100)
- status — VARCHAR(20) — NOT NULL
- decision_comment — NVARCHAR(1000)
- decided_at — DATETIME2(3)
- created_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
audit_log
- audit_log_id — BIGINT — Primary key — NOT NULL
- entity_type — VARCHAR(40) — NOT NULL
- entity_id — BIGINT — NOT NULL
- action_type — VARCHAR(20) — NOT NULL
- field_name — NVARCHAR(100)
- before_value — NVARCHAR(MAX)
- after_value — NVARCHAR(MAX)
- actor_user_id — BIGINT — Foreign key → app_user.user_id
- reason — NVARCHAR(1000)
- created_at — DATETIME2(3) — NOT NULL
business_card
- business_card_id — BIGINT — Primary key — NOT NULL
- contact_name — NVARCHAR(100) — NOT NULL
- title_name — NVARCHAR(100)
- company_name — NVARCHAR(200)
- department_name — NVARCHAR(100)
- phone — VARCHAR(40)
- email — VARCHAR(254)
- address — NVARCHAR(500)
- memo — NVARCHAR(MAX)
- is_favorite — BIT — NOT NULL
- last_contact_date — DATE
- manager_id — BIGINT — Foreign key → app_user.user_id
- registered_by — BIGINT — Foreign key → app_user.user_id — NOT NULL
- registered_date — DATE — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
business_card_tag
- tag_name — NVARCHAR(60) — Primary key — NOT NULL
- business_card_id — BIGINT — Foreign key → business_card.business_card_id — NOT NULL
code_group
- group_code — VARCHAR(40) — Primary key — NOT NULL
- group_name — NVARCHAR(100) — NOT NULL
- description — NVARCHAR(500)
- is_active — BIT — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
combination_daily_log
- combination_log_id — BIGINT — Primary key — NOT NULL
- region1_code — VARCHAR(60) — NOT NULL
- region2_name — NVARCHAR(100) — NOT NULL
- union_name — NVARCHAR(300) — NOT NULL
- grade_code — VARCHAR(10)
- business_type_code — VARCHAR(60)
- progress_stage_code — VARCHAR(60)
- stage_assigned_month — DATE
- completion_expected_month — DATE
- constructor_name — NVARCHAR(200)
- union_households — INT
- total_households — INT
- manager1_id — BIGINT — Foreign key → app_user.user_id
- manager2_id — BIGINT — Foreign key → app_user.user_id
- union_office_phone — VARCHAR(50)
- note — NVARCHAR(MAX)
- deleted_at — DATETIME2(3)
- deleted_by — BIGINT — Foreign key → app_user.user_id
- created_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
common_code
- code — VARCHAR(60) — Primary key — NOT NULL
- group_code — VARCHAR(40) — Foreign key → code_group.group_code — NOT NULL
- id — BIGINT — NOT NULL
- code_name — NVARCHAR(100) — NOT NULL
- description — NVARCHAR(500)
- sort_order — INT — NOT NULL
- is_active — BIT — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
daily_number_counter
- counter_name — VARCHAR(40) — Primary key — NOT NULL
- counter_date — DATE — Primary key — NOT NULL
- last_sequence — INT — NOT NULL
data_collection_entry
- collection_entry_id — BIGINT — Primary key — NOT NULL
- vendor_id — BIGINT — Foreign key → data_collection_vendor.vendor_id — NOT NULL
- file_id — BIGINT — Foreign key → file_asset.file_id — NOT NULL
- category_code — VARCHAR(40) — NOT NULL
- version_name — NVARCHAR(40) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- uploader_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
data_collection_vendor
- vendor_id — BIGINT — Primary key — NOT NULL
- vendor_name — NVARCHAR(120) — NOT NULL
- created_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
delivery_partial
- delivery_partial_id — BIGINT — Primary key — NOT NULL
- delivery_plan_id — BIGINT — Foreign key → delivery_plan.delivery_plan_id — NOT NULL
- delivered_date — DATE — NOT NULL
- delivered_quantity — INT — NOT NULL
- reason — NVARCHAR(1000)
- recorded_by — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
delivery_plan
- delivery_plan_id — BIGINT — Primary key — NOT NULL
- source_key — VARCHAR(100)
- source_type — VARCHAR(20) — NOT NULL
- sales_info_id — BIGINT — Foreign key → sales_info.sales_info_id
- company_name — NVARCHAR(200)
- site_name — NVARCHAR(300)
- agency_partner_id — BIGINT — Foreign key → partner.partner_id
- agency_name — NVARCHAR(200)
- delivery_date — DATE
- delivery_date_precision — VARCHAR(8)
- move_in_date — DATE
- move_in_date_precision — VARCHAR(8)
- completed_date — DATE
- item_code — VARCHAR(100)
- item_name — NVARCHAR(200)
- color_name — NVARCHAR(100)
- quantity — INT — NOT NULL
- agency_unit_price — DECIMAL(19,2) — NOT NULL
- unit_weight_kg — DECIMAL(19,4) — NOT NULL
- total_weight_kg — DECIMAL(19,4) — NOT NULL
- amount — DECIMAL(19,2) — NOT NULL
- specification — NVARCHAR(500)
- memo — NVARCHAR(1000)
- manager_id — BIGINT — Foreign key → app_user.user_id
- manager_name — NVARCHAR(100)
- product_type_code — VARCHAR(60)
- category_code — VARCHAR(60)
- spec_manager_id — BIGINT — Foreign key → app_user.user_id
- spec_manager_name — NVARCHAR(100)
- status — VARCHAR(20) — NOT NULL
- created_by — BIGINT — Foreign key → app_user.user_id
- updated_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
demand_forecast
- demand_forecast_id — BIGINT — Primary key — NOT NULL
- item_code — VARCHAR(100) — NOT NULL
- item_name — NVARCHAR(200) — NOT NULL
- forecast_quantity — INT — NOT NULL
- latest_reason — NVARCHAR(MAX)
- updated_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
erp_release_request
- delivery_no — VARCHAR(30) — Primary key — NOT NULL
- status_code — VARCHAR(10)
- business_partner_code — VARCHAR(30)
- business_partner_name — NVARCHAR(200)
- plant_code — VARCHAR(10)
- plant_name — NVARCHAR(100)
- promise_date — DATE
- goods_issue_amount — DECIMAL(19,2)
- vat_amount — DECIMAL(19,2)
- sales_group_code — VARCHAR(20)
- sales_group_name — NVARCHAR(100)
- movement_type_code — VARCHAR(20)
- movement_type_name — NVARCHAR(100)
- address — NVARCHAR(500)
- inserted_user_id — VARCHAR(30)
- inserted_user_name — NVARCHAR(100)
- updated_user_id — VARCHAR(30)
- updated_user_name — NVARCHAR(100)
- source_updated_at — DATETIME2(3)
- transport_company — NVARCHAR(100)
- confirmed_by — NVARCHAR(100)
- confirmed_at — DATETIME2(3)
- synced_at — DATETIME2(3) — NOT NULL
file_asset
- file_id — BIGINT — Primary key — NOT NULL
- storage_type — VARCHAR(16) — NOT NULL
- storage_key — NVARCHAR(700) — NOT NULL
- original_name — NVARCHAR(255) — NOT NULL
- content_type — VARCHAR(150)
- size_bytes — BIGINT — NOT NULL
- sha256_hex — CHAR(64)
- created_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- deleted_at — DATETIME2(3)
file_link
- file_link_id — BIGINT — Primary key — NOT NULL
- entity_type — VARCHAR(40) — NOT NULL
- entity_id — BIGINT — NOT NULL
- file_id — BIGINT — Foreign key → file_asset.file_id — NOT NULL
- file_role — VARCHAR(30) — NOT NULL
- sort_order — INT — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
mst_item_class
- item_class_code — VARCHAR(20) — Primary key — NOT NULL
- item_class_name — NVARCHAR(100) — NOT NULL
- sort_order — SMALLINT — NOT NULL
- is_active — BIT — NOT NULL
- source_updated_at — DATETIME2(3)
- synced_at — DATETIME2(3) — NOT NULL
mst_item_group
- item_group_code — VARCHAR(20) — Primary key — NOT NULL
- item_group_name — NVARCHAR(100) — NOT NULL
- sort_order — SMALLINT — NOT NULL
- is_active — BIT — NOT NULL
- source_updated_at — DATETIME2(3)
- synced_at — DATETIME2(3) — NOT NULL
mst_plant
- plant_code — VARCHAR(10) — Primary key — NOT NULL
- plant_name — NVARCHAR(100) — NOT NULL
- sort_order — SMALLINT — NOT NULL
- is_active — BIT — NOT NULL
- source_updated_at — DATETIME2(3)
- synced_at — DATETIME2(3) — NOT NULL
mst_storage_location
- storage_code — VARCHAR(20) — Primary key — NOT NULL
- plant_code — VARCHAR(10) — Foreign key → mst_plant.plant_code — NOT NULL
- storage_name — NVARCHAR(100) — NOT NULL
- sort_order — SMALLINT — NOT NULL
- is_active — BIT — NOT NULL
- source_updated_at — DATETIME2(3)
- synced_at — DATETIME2(3) — NOT NULL
notification
- notification_id — BIGINT — Primary key — NOT NULL
- recipient_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- notification_type — VARCHAR(40) — NOT NULL
- title — NVARCHAR(200) — NOT NULL
- message — NVARCHAR(1000) — NOT NULL
- link_path — NVARCHAR(500)
- source_key — VARCHAR(100)
- created_at — DATETIME2(3) — NOT NULL
- read_at — DATETIME2(3)
partner
- partner_id — BIGINT — Primary key — NOT NULL
- partner_code — VARCHAR(30) — NOT NULL
- partner_name — NVARCHAR(200) — NOT NULL
- manager_user_id — BIGINT — Foreign key → app_user.user_id
- region_code — VARCHAR(60)
- status — VARCHAR(16) — NOT NULL
- division — VARCHAR(16) — NOT NULL
- business_no — VARCHAR(20)
- ceo_name — NVARCHAR(100)
- address — NVARCHAR(500)
- phone — VARCHAR(30)
- fax — VARCHAR(30)
- business_type — NVARCHAR(100)
- business_item — NVARCHAR(200)
- established_date — DATE
- partner_memo — NVARCHAR(MAX)
- history_notes — NVARCHAR(MAX)
- business_card_linked — BIT — NOT NULL
- map_latitude — DECIMAL(10,7)
- map_longitude — DECIMAL(10,7)
- map_radius_km — DECIMAL(8,2)
- created_by — BIGINT — Foreign key → app_user.user_id
- updated_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- deleted_at — DATETIME2(3)
- row_ver — ROWVERSION — NOT NULL
partner_business_card
- partner_id — BIGINT — Foreign key → partner.partner_id — NOT NULL
- business_card_id — BIGINT — Foreign key → business_card.business_card_id — NOT NULL
partner_competitor
- partner_competitor_id — BIGINT — Primary key — NOT NULL
- partner_id — BIGINT — Foreign key → partner.partner_id — NOT NULL
- brand_name — NVARCHAR(100) — NOT NULL
- is_handling — BIT — NOT NULL
- handling_scale — NVARCHAR(100)
- created_at — DATETIME2(3) — NOT NULL
partner_contact
- partner_contact_id — BIGINT — Primary key — NOT NULL
- partner_id — BIGINT — Foreign key → partner.partner_id — NOT NULL
- contact_type — VARCHAR(20) — NOT NULL
- contact_name — NVARCHAR(100) — NOT NULL
- birth_date — DATE
- mobile — VARCHAR(30)
- phone — VARCHAR(30)
- email — VARCHAR(254)
- address — NVARCHAR(500)
- position_name — NVARCHAR(100)
- memo — NVARCHAR(1000)
- sort_order — INT — NOT NULL
- is_active — BIT — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
partner_nearby_point
- nearby_point_id — BIGINT — Primary key — NOT NULL
- partner_id — BIGINT — Foreign key → partner.partner_id — NOT NULL
- point_name — NVARCHAR(200) — NOT NULL
- point_type — VARCHAR(20)
- latitude — DECIMAL(10,7) — NOT NULL
- longitude — DECIMAL(10,7) — NOT NULL
- distance_km — DECIMAL(8,2)
- memo — NVARCHAR(500)
partner_notice
- partner_notice_id — BIGINT — Primary key — NOT NULL
- notice_type — VARCHAR(16) — NOT NULL
- title — NVARCHAR(300) — NOT NULL
- body — NVARCHAR(MAX)
- expose_from — DATE — NOT NULL
- expose_to — DATE — NOT NULL
- show_on_login — BIT — NOT NULL
- registrant_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
partner_trait
- trait_code — VARCHAR(60) — Primary key — NOT NULL
- partner_id — BIGINT — Foreign key → partner.partner_id — NOT NULL
- ratio_percent — DECIMAL(7,4)
- memo — NVARCHAR(500)
partner_yearly_metric
- partner_yearly_metric_id — BIGINT — Primary key — NOT NULL
- partner_id — BIGINT — Foreign key → partner.partner_id — NOT NULL
- metric_year — SMALLINT — NOT NULL
- total_sales — DECIMAL(19,2)
- bidet_sales — DECIMAL(19,2)
- kitchen_sales — DECIMAL(19,2)
- bath_sales — DECIMAL(19,2)
- manager_count — INT
- sales_rep_count — INT
- receivable_amount — DECIMAL(19,2)
- collateral_amount — DECIMAL(19,2)
- bill_amount — DECIMAL(19,2)
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
permission
- permission_code — VARCHAR(64) — Primary key — NOT NULL
- permission_name — NVARCHAR(100) — NOT NULL
- description — NVARCHAR(1000)
- created_at — DATETIME2(3) — NOT NULL
price_catalog
- price_catalog_id — BIGINT — Primary key — NOT NULL
- item_code — VARCHAR(100)
- major_category_code — VARCHAR(60) — NOT NULL
- middle_category_code — VARCHAR(60)
- series_code — VARCHAR(100)
- series_name — NVARCHAR(100)
- model_name — NVARCHAR(200) — NOT NULL
- weight_kg — DECIMAL(12,4)
- ks_spec — NVARCHAR(100)
- water_saving_grade — NVARCHAR(50)
- pack_unit — NVARCHAR(50)
- shipping_origin — NVARCHAR(100)
- base_date — DATE
- note — NVARCHAR(MAX)
- image_label — NVARCHAR(100)
- created_by — BIGINT — Foreign key → app_user.user_id
- updated_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
price_catalog_component
- price_catalog_component_id — BIGINT — Primary key — NOT NULL
- price_catalog_id — BIGINT — Foreign key → price_catalog.price_catalog_id — NOT NULL
- component_order — INT — NOT NULL
- part_name — NVARCHAR(200)
- part_code — VARCHAR(100)
- factory_price — DECIMAL(19,2) — NOT NULL
- consumer_price — DECIMAL(19,2) — NOT NULL
- pack_info — NVARCHAR(200)
- remark — NVARCHAR(1000)
profit_analysis
- profit_analysis_id — BIGINT — Primary key — NOT NULL
- title — NVARCHAR(300) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- order_year — SMALLINT
- delivery_year — SMALLINT
- author_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- spec_type — VARCHAR(50)
- cost_increase_rate — DECIMAL(9,4)
- builder_name — NVARCHAR(200)
- builder_erp_code — VARCHAR(30)
- partner_id — BIGINT — Foreign key → partner.partner_id
- partner_name — NVARCHAR(200)
- partner_erp_code — VARCHAR(30)
- site_name — NVARCHAR(300)
- region_code — VARCHAR(60)
- order_type_code — VARCHAR(60)
- business_type_code — VARCHAR(60)
- sales_manager_id — BIGINT — Foreign key → app_user.user_id
- sales_manager_name — NVARCHAR(100)
- sales_manager_erp_code — VARCHAR(30)
- spec_date — DATE
- progress_status_code — VARCHAR(60)
- expected_delivery_date — DATE
- bidet_progress_code — VARCHAR(60)
- paid_option_code — VARCHAR(60)
- total_households — INT
- applied_households — INT
- completion_date — DATE
- origin_spec_no — VARCHAR(50)
- partner_delivery_amount — DECIMAL(19,2)
- expected_profit_rate — DECIMAL(9,4)
- commission_enabled — BIT — NOT NULL
- commission_fee — DECIMAL(19,2)
- remark — NVARCHAR(MAX)
- total_sales — DECIMAL(19,2) — NOT NULL
- total_cost — DECIMAL(19,2) — NOT NULL
- gross_profit — DECIMAL(19,2) — NOT NULL
- gross_profit_rate — DECIMAL(9,4) — NOT NULL
- operating_expense — DECIMAL(19,2) — NOT NULL
- operating_profit — DECIMAL(19,2) — NOT NULL
- operating_profit_rate — DECIMAL(9,4) — NOT NULL
- summary_calculated_at — DATETIME2(3) — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- deleted_at — DATETIME2(3)
- row_ver — ROWVERSION — NOT NULL
profit_analysis_item
- profit_analysis_item_id — BIGINT — Primary key — NOT NULL
- profit_analysis_id — BIGINT — Foreign key → profit_analysis.profit_analysis_id — NOT NULL
- item_order — INT — NOT NULL
- item_type_code — VARCHAR(60)
- set_code — VARCHAR(50)
- item_code — VARCHAR(100)
- item_name — NVARCHAR(200)
- order_type_code — VARCHAR(60)
- factory_price — DECIMAL(19,2) — NOT NULL
- ton_unit_price — DECIMAL(19,2) — NOT NULL
- cost_base — DECIMAL(19,2) — NOT NULL
- cost_expected — DECIMAL(19,2) — NOT NULL
- standard_cost — DECIMAL(19,2) — NOT NULL
- expected_standard_cost — DECIMAL(19,2) — NOT NULL
- pottery_ratio — DECIMAL(9,6) — NOT NULL
- total_weight_kg — DECIMAL(19,4) — NOT NULL
- cost_missing — BIT — NOT NULL
- quantity — INT — NOT NULL
- bid_price — DECIMAL(19,2) — NOT NULL
- dealer_margin_rate — DECIMAL(9,4) — NOT NULL
- dealer_unit_price — DECIMAL(19,2) — NOT NULL
- discount_rate — DECIMAL(9,4) — NOT NULL
- gross_profit_unit — DECIMAL(19,2) — NOT NULL
- gross_profit_rate — DECIMAL(9,4) — NOT NULL
- operating_profit_unit — DECIMAL(19,2) — NOT NULL
- operating_profit_rate — DECIMAL(9,4) — NOT NULL
- net_profit_unit — DECIMAL(19,2) — NOT NULL
- net_profit_rate — DECIMAL(9,4) — NOT NULL
- sales_amount — DECIMAL(19,2) — NOT NULL
- gross_profit_amount — DECIMAL(19,2) — NOT NULL
- operating_profit_amount — DECIMAL(19,2) — NOT NULL
- net_profit_amount — DECIMAL(19,2) — NOT NULL
- remark — NVARCHAR(1000)
profit_analysis_item_component
- profit_analysis_item_component_id — BIGINT — Primary key — NOT NULL
- profit_analysis_item_id — BIGINT — Foreign key → profit_analysis_item.profit_analysis_item_id — NOT NULL
- component_order — INT — NOT NULL
- component_code — VARCHAR(100) — NOT NULL
- component_name — NVARCHAR(200)
- quantity — DECIMAL(19,4) — NOT NULL
- factory_price — DECIMAL(19,2)
- standard_cost — DECIMAL(19,2)
- total_cost — DECIMAL(19,2)
- weight_kg — DECIMAL(19,4)
- is_cost_missing — BIT — NOT NULL
promotion
- promotion_id — BIGINT — Primary key — NOT NULL
- promotion_name — NVARCHAR(200) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- created_by — BIGINT — Foreign key → app_user.user_id — NOT NULL
- updated_by — BIGINT — Foreign key → app_user.user_id
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
promotion_item
- promotion_item_id — BIGINT — Primary key — NOT NULL
- promotion_id — BIGINT — Foreign key → promotion.promotion_id — NOT NULL
- item_order — INT — NOT NULL
- division_code — VARCHAR(60)
- item_type_code — VARCHAR(60)
- set_code — VARCHAR(100)
- component_code — VARCHAR(100)
- erp_code — VARCHAR(100)
- stock_quantity — DECIMAL(19,4) — NOT NULL
- stock_amount — DECIMAL(19,2) — NOT NULL
- reserve_amount — DECIMAL(19,2) — NOT NULL
- estimated_sales — DECIMAL(19,2) — NOT NULL
- sale_price — DECIMAL(19,2) — NOT NULL
- cost_price — DECIMAL(19,2) — NOT NULL
- margin_rate — DECIMAL(9,4) — NOT NULL
- target_quantity — DECIMAL(19,4) — NOT NULL
- promotion_price — DECIMAL(19,2) — NOT NULL
- discount_rate — DECIMAL(9,4) — NOT NULL
- promotion_sales — DECIMAL(19,2) — NOT NULL
- promotion_margin — DECIMAL(19,2) — NOT NULL
- promotion_margin_rate — DECIMAL(9,4) — NOT NULL
- sales_contribution — DECIMAL(9,4) — NOT NULL
- promotion_contribution — DECIMAL(9,4) — NOT NULL
- contribution_gap — DECIMAL(9,4) — NOT NULL
- remark — NVARCHAR(MAX)
- row_type — VARCHAR(20) — NOT NULL
refresh_token
- refresh_token_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- token_hash — VARCHAR(128) — NOT NULL
- issued_at — DATETIME2(3) — NOT NULL
- expires_at — DATETIME2(3) — NOT NULL
- revoked_at — DATETIME2(3)
- user_agent — NVARCHAR(500)
- ip_address — VARCHAR(45)
report_comment
- report_comment_id — BIGINT — Primary key — NOT NULL
- report_id — BIGINT — Foreign key → report_document.report_id — NOT NULL
- comment_text — NVARCHAR(MAX) — NOT NULL
- author_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
report_document
- report_id — BIGINT — Primary key — NOT NULL
- report_type — VARCHAR(16) — NOT NULL
- title — NVARCHAR(300) — NOT NULL
- summary — NVARCHAR(500)
- status — VARCHAR(20) — NOT NULL
- author_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- author_name — NVARCHAR(100)
- dept_name — NVARCHAR(100)
- team_name — NVARCHAR(100)
- week_year — SMALLINT
- week_no — TINYINT
- key_task_detail — NVARCHAR(MAX)
- issues — NVARCHAR(MAX)
- next_week_detail — NVARCHAR(MAX)
- next_week_issues — NVARCHAR(MAX)
- trip_from — DATE
- trip_to — DATE
- destination — NVARCHAR(200)
- purpose — NVARCHAR(500)
- activity_result_html — NVARCHAR(MAX)
- follow_up — NVARCHAR(MAX)
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
role_permission
- role_code — VARCHAR(64) — Foreign key → app_role.role_code — NOT NULL
- permission_code — VARCHAR(64) — Foreign key → permission.permission_code — NOT NULL
- updated_by — BIGINT — Foreign key → app_user.user_id
- updated_at — DATETIME2(3) — NOT NULL
sales_info
- sales_info_id — BIGINT — Primary key — NOT NULL
- sw_spec_no — VARCHAR(20) — NOT NULL
- profit_analysis_id — BIGINT — Foreign key → profit_analysis.profit_analysis_id
- partner_id — BIGINT — Foreign key → partner.partner_id
- spec_type — VARCHAR(50)
- builder_name — NVARCHAR(200) — NOT NULL
- partner_name — NVARCHAR(200)
- site_name — NVARCHAR(300) — NOT NULL
- region_code — VARCHAR(60)
- order_type_code — VARCHAR(60)
- business_type_code — VARCHAR(60)
- sales_manager_id — BIGINT — Foreign key → app_user.user_id
- sales_manager_name — NVARCHAR(100)
- progress_status_code — VARCHAR(60)
- paid_option_code — VARCHAR(60)
- bidet_progress_code — VARCHAR(60)
- total_households — INT
- applied_households — INT
- origin_spec_no — VARCHAR(50)
- delivery_manager_id — BIGINT — Foreign key → app_user.user_id
- delivery_manager_name — NVARCHAR(100)
- remark — NVARCHAR(MAX)
- spec_register_date — DATE
- spec_date — DATE
- expected_delivery_date — DATE
- completion_date — DATE
- author_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- deleted_at — DATETIME2(3)
- row_ver — ROWVERSION — NOT NULL
sales_info_pyeong
- sales_info_pyeong_id — BIGINT — Primary key — NOT NULL
- sales_info_id — BIGINT — Foreign key → sales_info.sales_info_id — NOT NULL
- title — NVARCHAR(100)
- apply_household — INT
- product_type_code — VARCHAR(60)
- item_type_code — VARCHAR(60)
- product_company — NVARCHAR(100) — NOT NULL
- manufacturer — NVARCHAR(100) — NOT NULL
- set_part_no — VARCHAR(100)
- quantity — INT
- construction_price — DECIMAL(19,2)
- agency_price — DECIMAL(19,2)
- order_type_code — VARCHAR(60)
- factory_price — DECIMAL(19,2)
- set_unit_price — DECIMAL(19,2)
- standard_cost — DECIMAL(19,2)
- dealer_margin_rate — DECIMAL(9,4)
- sort_order — INT — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
sales_info_pyeong_part
- sales_info_pyeong_part_id — BIGINT — Primary key — NOT NULL
- sales_info_pyeong_id — BIGINT — Foreign key → sales_info_pyeong.sales_info_pyeong_id — NOT NULL
- child_part_no — VARCHAR(100) — NOT NULL
- factory_price — DECIMAL(19,2)
- standard_cost — DECIMAL(19,2)
- quantity — INT — NOT NULL
- order_type_code — VARCHAR(60)
- set_unit_price — DECIMAL(19,2)
- remark — NVARCHAR(500)
- sort_order — INT — NOT NULL
sales_material
- sales_material_id — BIGINT — Primary key — NOT NULL
- title — NVARCHAR(300) — NOT NULL
- partner_id — BIGINT — Foreign key → partner.partner_id
- partner_name — NVARCHAR(200)
- content_html — NVARCHAR(MAX)
- registrant_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
saved_approval_line
- saved_line_id — BIGINT — Primary key — NOT NULL
- owner_user_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- line_name — NVARCHAR(100) — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
saved_approval_line_step
- saved_line_step_id — BIGINT — Primary key — NOT NULL
- saved_line_id — BIGINT — Foreign key → saved_approval_line.saved_line_id — NOT NULL
- step_order — SMALLINT — NOT NULL
- approver_user_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
short_project_item
- short_project_item_id — BIGINT — Primary key — NOT NULL
- short_project_site_id — BIGINT — Foreign key → short_project_site.short_project_site_id — NOT NULL
- item_order — INT — NOT NULL
- item_code — VARCHAR(100) — NOT NULL
- item_name — NVARCHAR(200)
- quantity — INT — NOT NULL
- unit_code — VARCHAR(20) — NOT NULL
- standard_price — DECIMAL(19,2) — NOT NULL
- discount_rate — DECIMAL(9,4) — NOT NULL
- note — NVARCHAR(1000)
short_project_site
- short_project_site_id — BIGINT — Primary key — NOT NULL
- dealer_partner_id — BIGINT — Foreign key → partner.partner_id
- dealer_name — NVARCHAR(200) — NOT NULL
- site_name — NVARCHAR(300) — NOT NULL
- builder_name — NVARCHAR(200)
- is_government — BIT — NOT NULL
- delivery_from — DATE
- delivery_to — DATE
- notes — NVARCHAR(MAX)
- status — VARCHAR(20) — NOT NULL
- author_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
showroom_interest_item
- item_code — VARCHAR(100) — Primary key — NOT NULL
- showroom_reservation_id — BIGINT — Foreign key → showroom_reservation.showroom_reservation_id — NOT NULL
- item_name — NVARCHAR(200)
- sort_order — INT — NOT NULL
showroom_reservation
- showroom_reservation_id — BIGINT — Primary key — NOT NULL
- reservation_no — VARCHAR(30) — NOT NULL
- sales_rep_id — BIGINT — Foreign key → app_user.user_id
- sales_rep_name — NVARCHAR(100) — NOT NULL
- company_name — NVARCHAR(200) — NOT NULL
- site_name — NVARCHAR(200)
- purpose — NVARCHAR(500) — NOT NULL
- visit_date — DATE — NOT NULL
- start_time — TIME(0) — NOT NULL
- end_time — TIME(0) — NOT NULL
- headcount — INT — NOT NULL
- internal_manager_id — BIGINT — Foreign key → app_user.user_id
- internal_manager_name — NVARCHAR(150) — NOT NULL
- note — NVARCHAR(MAX)
- status — VARCHAR(20) — NOT NULL
- decided_by — BIGINT — Foreign key → app_user.user_id
- decided_at — DATETIME2(3)
- reject_reason — NVARCHAR(500)
- author_id — BIGINT — Foreign key → app_user.user_id — NOT NULL
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- active_visit_date — AS(CASE WHEN status = 'PENDING' OR status = 'APPROVED' THEN visit_date ELSE NULL END)
- active_start_time — AS(CASE WHEN status = 'PENDING' OR status = 'APPROVED' THEN start_time ELSE NULL END)
- active_end_time — AS(CASE WHEN status = 'PENDING' OR status = 'APPROVED' THEN end_time ELSE NULL END)
- active_slot_discriminator — AS(CONVERT(BIGINT, CASE WHEN status = 'PENDING' OR status = 'APPROVED' THEN 0 ELSE showroom_reservation_id END))
- row_ver — ROWVERSION — NOT NULL
showroom_visitor
- showroom_visitor_id — BIGINT — Primary key — NOT NULL
- showroom_reservation_id — BIGINT — Foreign key → showroom_reservation.showroom_reservation_id — NOT NULL
- visitor_type_code — VARCHAR(60)
- visitor_name — NVARCHAR(100) — NOT NULL
- affiliation — NVARCHAR(200)
- position_name — NVARCHAR(100)
- contact — VARCHAR(50)
- sort_order — INT — NOT NULL
standard_cost
- standard_cost_id — BIGINT — Primary key — NOT NULL
- standard_cost_version_id — BIGINT — Foreign key → standard_cost_version.standard_cost_version_id — NOT NULL
- division_code — VARCHAR(60)
- item_group_code — VARCHAR(100)
- subcategory1 — NVARCHAR(100)
- subcategory2 — NVARCHAR(100)
- subcategory3 — NVARCHAR(100)
- set_part_no — VARCHAR(100)
- child_part_no — VARCHAR(100) — NOT NULL
- part_no — VARCHAR(100)
- part_name — NVARCHAR(200)
- erp_part_no — VARCHAR(100)
- erp_item_name — NVARCHAR(200)
- weight_kg — DECIMAL(19,4)
- factory_price — DECIMAL(19,2)
- standard_cost_amount — DECIMAL(19,2)
- total_cost — DECIMAL(19,2)
- other_cost_rate — DECIMAL(9,4)
- sale_price — DECIMAL(19,2)
- status — VARCHAR(30)
- note — NVARCHAR(MAX)
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
standard_cost_ratio
- division_code — VARCHAR(60) — Primary key — NOT NULL
- standard_cost_version_id — BIGINT — Foreign key → standard_cost_version.standard_cost_version_id — NOT NULL
- ratio_percent — DECIMAL(9,4) — NOT NULL
standard_cost_version
- standard_cost_version_id — BIGINT — Primary key — NOT NULL
- version_code — VARCHAR(40) — NOT NULL
- version_name — NVARCHAR(100) — NOT NULL
- cost_year — SMALLINT
- is_active — BIT — NOT NULL
- source_type — VARCHAR(40) — NOT NULL
- status — VARCHAR(20) — NOT NULL
- note — NVARCHAR(MAX)
- created_by — BIGINT — Foreign key → app_user.user_id — NOT NULL
- requested_by — BIGINT — Foreign key → app_user.user_id
- requested_at — DATETIME2(3)
- assignee_id — BIGINT — Foreign key → app_user.user_id
- filled_by — BIGINT — Foreign key → app_user.user_id
- filled_at — DATETIME2(3)
- created_at — DATETIME2(3) — NOT NULL
- updated_at — DATETIME2(3) — NOT NULL
- row_ver — ROWVERSION — NOT NULL
sync_state
- job_name — VARCHAR(100) — Primary key — NOT NULL
- last_watermark_at — DATETIME2(3)
- last_run_started_at — DATETIME2(3)
- last_run_ended_at — DATETIME2(3)
- last_status — VARCHAR(20)
- last_message — NVARCHAR(MAX)
- rows_processed — BIGINT
- row_ver — ROWVERSION — NOT NULL
trip_companion
- trip_companion_id — BIGINT — Primary key — NOT NULL
- report_id — BIGINT — Foreign key → report_document.report_id — NOT NULL
- companion_user_id — BIGINT — Foreign key → app_user.user_id
- companion_name — NVARCHAR(100) — NOT NULL
- sort_order — INT — NOT NULL
weekly_report_task
- weekly_report_task_id — BIGINT — Primary key — NOT NULL
- report_id — BIGINT — Foreign key → report_document.report_id — NOT NULL
- task_period — VARCHAR(16) — NOT NULL
- task_text — NVARCHAR(1000) — NOT NULL
- sort_order — INT — NOT NULL