-- 客户信息表
CREATE TABLE IF NOT EXISTS asset_customer (
    id BIGINT AUTO_INCREMENT PRIMARY KEY,
    customer_no VARCHAR(50) NOT NULL,
    customer_name VARCHAR(100) NOT NULL,
    customer_type TINYINT NOT NULL DEFAULT 0,
    contact_person VARCHAR(50),
    contact_phone VARCHAR(20),
    contact_email VARCHAR(100),
    contact_address VARCHAR(255),
    id_card_no VARCHAR(18),
    id_card_front_url VARCHAR(255),
    id_card_back_url VARCHAR(255),
    driver_license_no VARCHAR(50),
    driver_license_url VARCHAR(255),
    company_name VARCHAR(200),
    unified_social_credit_code VARCHAR(50),
    business_license_url VARCHAR(255),
    legal_person VARCHAR(50),
    credit_level TINYINT DEFAULT 0,
    deposit_amount DECIMAL(10,2) DEFAULT 0.00,
    remark VARCHAR(500),
    status TINYINT NOT NULL DEFAULT 0,
    creator VARCHAR(64) DEFAULT '',
    create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    updater VARCHAR(64) DEFAULT '',
    update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    deleted TINYINT NOT NULL DEFAULT 0,
    tenant_id BIGINT NOT NULL DEFAULT 0
);
