Short-term Borrowings and Long-term Borrowings - Borrowings (Details)
¥ in Thousands, $ in Thousands
1 Months Ended 12 Months Ended
Dec. 31, 2022
CNY (¥)
Dec. 31, 2022
CNY (¥)
Dec. 31, 2021
CNY (¥)
Dec. 31, 2022
USD ($)
Feb. 28, 2022
CNY (¥)
Dec. 31, 2021
USD ($)
Apr. 30, 2021
USD ($)
Short term Borrowings and Long-term Borrowings              
Principal amount         ¥ 900,000   $ 862,500
Short-term borrowings ¥ 390,750 ¥ 390,750 ¥ 37,042   110,000    
Long-term borrowings 9,230,807 9,230,807 5,960,899 $ 1,338,341 ¥ 790,000    
Total borrowings ¥ 9,621,557 9,621,557 ¥ 5,997,941 9,621,557   $ 5,997,941  
5-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent) (0.40%)            
1-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent) (0.90%)            
Secured borrowing matures February 15, 2027              
Short term Borrowings and Long-term Borrowings              
Principal amount ¥ 900,000 900,000          
Total borrowings 900,000 ¥ 900,000          
Secured borrowing matures February 15, 2027 | 5-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   0.40% 0.40%        
Secured borrowing matures September 28, 2029              
Short term Borrowings and Long-term Borrowings              
Principal amount 600,000 ¥ 600,000          
Total borrowings 600,000 ¥ 600,000 ¥ 600,000        
Secured borrowing matures September 28, 2029 | 5-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   0.31% 0.31%        
Secured borrowing              
Short term Borrowings and Long-term Borrowings              
Short-term borrowings 283,785 ¥ 283,785 ¥ 37,042        
Long-term borrowings 1,440,544 1,440,544 562,958        
Convertible debt              
Short term Borrowings and Long-term Borrowings              
Principal amount | $       $ 862,500      
Long-term borrowings ¥ 5,913,715 ¥ 5,913,715 ¥ 5,397,941        
Interest rate per annum (as a percent) 0.25% 0.25% 0.25% 0.25%   0.25%  
Total borrowings | $       $ 5,913,715   $ 5,397,941  
Secured bank loan 2              
Short term Borrowings and Long-term Borrowings              
Long-term borrowings ¥ 541,265 ¥ 541,265          
Secured borrowing 1              
Short term Borrowings and Long-term Borrowings              
Principal amount 625,383 625,383          
Long-term borrowings 625,383 625,383          
Total borrowings 625,383 ¥ 625,383          
Secured borrowing 1 | 5-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   0.80% 0.80%        
Secured borrowing 2              
Short term Borrowings and Long-term Borrowings              
Principal amount 224,329 ¥ 224,329          
Total borrowings 224,329 ¥ 224,329          
Secured borrowing 2 | 5-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   (0.60%) (0.60%)        
Credit guaranteed borrowing 1              
Short term Borrowings and Long-term Borrowings              
Principal amount | $       50,000      
Long-term borrowings 500,000 ¥ 500,000          
Total borrowings | $       $ 348,230      
Credit guaranteed borrowing 2              
Short term Borrowings and Long-term Borrowings              
Principal amount 300,000 300,000          
Short-term borrowings 106,965 106,965          
Total borrowings 300,000 300,000          
Credit guaranteed borrowing 3              
Short term Borrowings and Long-term Borrowings              
Principal amount 209,900 209,900          
Total borrowings 209,900 ¥ 209,900          
Credit guaranteed borrowing 3 | 1-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   (0.90%) (0.90%)        
Unsecured borrowing 1              
Short term Borrowings and Long-term Borrowings              
Principal amount 260,000 ¥ 260,000          
Long-term borrowings 209,900 209,900          
Total borrowings 260,000 ¥ 260,000          
Unsecured borrowing 1 | 1-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   0.70% 0.70%        
Unsecured borrowing 2              
Short term Borrowings and Long-term Borrowings              
Principal amount 240,000 ¥ 240,000          
Total borrowings ¥ 240,000 ¥ 240,000          
Unsecured borrowing 2 | 1-year LPR              
Short term Borrowings and Long-term Borrowings              
Interest rate per annum (as a percent)   (0.70%) (0.70%)