コンテンツにスキップ

テーブル定義

作り変えで参照頻度が高い中核テーブルの代表カラムを抜粋します。型・コメントはDBダンプ(value.sql)のスキーマ定義に基づきます。

カラム意味
user_typeintユーザータイプ(Enum:UserType)
partner_company_idint加盟店(PartnerCompany)
name / kanavarchar氏名/フリガナ
emailvarcharメールアドレス(社用)
company_id / belongs_id / sub_belongs_idint会社/事業部/課
employee_postint役職(Enum:EmployeePost)
employment_typeint雇用形態(Enum:EmploymentType)
entry_datedate入社日
tfa_token / tfa_expires_at / tfa_is_used / tfa_verified二段階認証(OTP)
has_sales_experiencetinyint(1)営業経験歴
vendor_user_flagtinyint(1)ベンダーユーザフラグ
カラム意味
contract_idbigint成約ID
sales_person_idint営業担当者
name / kana / birth_date / age顧客基本情報
email / phone_number / postal_code / prefecture / city / address_line連絡先・住所
current_loan_statustinyint借入状況(Enum:LoanStatus)
construction_statusvarchar完工ステータス(Enum:ConstructionStatus)
order_statusvarchar発注ステータス
certification_application_statusvarchar認定申請ステータス
defect_resolution_status / defect_content不備解消ステータス/内容
power_selling_start_datedate売電開始日
construction_shop_idint施工店
カラム意味
customer_id / telemarketing_appointment_idbigint顧客/アポ
contract_datedateご契約日
total_amountdecimal(10,0)ご提案金額
settlement_amountbigint仕切り金額(税込)
settlement_contenttext仕切り内容
payment_count / down_payment支払回数/頭金
loan_companytinyintローン会社
pv_contract / bt_contract / eq_contract / ih_contract / ac_contracttinyint(1)各商材の契約有無
survey_datetime_1..3 / survey_datetime_confirmeddatetime現地調査日時(候補・確定)
construction_datetime_1..3 / construction_datetime_confirmeddate工事日時(候補・確定)
thank_you_call / loan_calldatetimeサンキューコール/ローン審査コール日時
status / status_changed_at審査状況/変更日時

*_guarantee_application_status(各商材の保証申請ステータス)は contracts のカラムではなく、次項の contract_additional_materials に属します。

contract_additional_materials(契約商材詳細・57列)

Section titled “contract_additional_materials(契約商材詳細・57列)”

contracts(58列)とは別テーブルで、契約に紐づく商材(PV/BT/EQ/IH/AC)の型番・容量・保証申請状況を保持します。*_guarantee_application_status はこちらのテーブルのカラムです。

telemarketing_appointments(アポ・商談・43列)

Section titled “telemarketing_appointments(アポ・商談・43列)”
カラム意味
assigned_staff_id / accompanying_staff_idbigint担当/同行
scheduled_visit_datetimedatetime訪問予定日時
channeltinyintチャネル
branchtinyint取次拠点(Enum:BranchOffice)
statustinyintステータス(Enum:AppointmentStatus)
pre_call_result / first_visit_result / talk_resulttinyintマエカク/初回訪問/商談結果
event_date / event_location / event_location_prefectures催事実施日・店舗・都道府県
toss_idbigintトスID
*_calendar_event_idvarcharGoogleカレンダー連携(訪問・マエカク等)
corporate_number_idint加盟店番号(PartnerCompany)

customer_progress(顧客進捗・28列)

Section titled “customer_progress(顧客進捗・28列)”

着工・完工・入金など、契約後のバックオフィス進捗を管理。

主なカラム:completion_call_datetime(完工コール)、construction_start_date(着工日)、construction_completion_date完工日=売上計上の起点)、payment_date(入金日)、各種書類の郵送日・追跡番号・格納状況、payment_pattern(決済パターン)。

テーブルチャネル代表カラム
operation_reports(29列)FS訪販work_date work_hours visit_count appointment_count company_car_usage usage_branch
es_reports(21列)催事event_date lottery_count(抽選)seated_count(着座)appointment_count
is_reports(17列)テレマ架電call_date call_count effective_call_count toss_count
  • partner_companies(45列):法人番号・代表者・口座・連帯保証人(乙/丙1/丙2)・販売実績歴・アポクローザー連携加盟店など、加盟店審査に必要な情報を網羅。
  • construction_shops(32列):対応エリア・各種休日・依頼方法・電力情報共有締め日など、施工依頼の運用情報を保持。