Files
web_template/internal/database/seed_enterprise.go

84 lines
10 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package database
import (
"log"
"gotest/internal/model"
"gorm.io/gorm"
)
// seedEnterpriseData initializes enterprise data shared across 3 corporate websites
func seedEnterpriseData(db *gorm.DB) error {
var count int64
db.Model(&model.Company{}).Count(&count)
if count > 0 {
log.Println("检测到已有企业数据,跳过初始化")
return nil
}
company := model.Company{
Name: "Nexus Technologies",
Logo: "",
Slogan: "Innovation Drives · Intelligence Leads",
Description: "Nexus Technologies, founded in 2010, is a high-tech enterprise specializing in artificial intelligence, cloud computing, and the Internet of Things. We are dedicated to providing digital transformation solutions for global clients, with business spanning smart manufacturing, smart cities, fintech, and more. After over a decade of growth, the group has more than 2,000 employees, serves over 5,000 clients, and has a presence across Asia, Europe, and North America.",
Vision: "To become the world's leading intelligent technology enterprise, empowering every industry through technology.",
Mission: "Driven by innovative technology, we create value for clients, take responsibility for society, and provide a platform for our people.",
Phone: "400-888-9999",
Email: "contact@nexus-tech.com",
Address: "No. 2 Boyun Road, Zhangjiang Hi-Tech Park, Pudong New Area, Shanghai",
Website: "www.nexus-tech.com",
FoundedYear: 2010,
EmployeeCount: "2000+",
Stats: `[{"label":"Clients Served","value":"5000+","icon":"users"},{"label":"Patents","value":"320+","icon":"patent"},{"label":"Global Offices","value":"18","icon":"globe"},{"label":"Annual Revenue","value":"$5B+","icon":"revenue"}]`,
}
if err := db.Create(&company).Error; err != nil {
return err
}
services := []model.EnterpriseService{
{Title: "AI Solutions", Description: "Leveraging deep learning and natural language processing, we deliver intelligent customer service, image recognition, predictive analytics, and other AI services to help businesses achieve intelligent transformation.", Icon: "ai", Features: `["Intelligent Customer Service","Image Recognition & Analysis","Natural Language Processing","Predictive Analytics Models"]`, Sort: 1},
{Title: "Cloud Computing Platform", Description: "Flexible and scalable cloud infrastructure services supporting public, private, and hybrid cloud deployments with 99.99% high availability guarantee.", Icon: "cloud", Features: `["Elastic Compute Resources","Containerized Deployment","Automated Operations","Multi-Cloud Management"]`, Sort: 2},
{Title: "IoT Platform", Description: "End-to-end IoT solutions covering device connectivity, data collection, edge computing, and remote management, with over 1 million connected devices.", Icon: "iot", Features: `["Million-Device Connectivity","Edge Computing Nodes","Real-Time Data Processing","Remote Device Management"]`, Sort: 3},
{Title: "Big Data Analytics", Description: "A one-stop big data platform supporting petabyte-scale data storage and real-time analytics to power business decision-making.", Icon: "data", Features: `["PB-Scale Data Storage","Real-Time Stream Processing","Data Visualization","Intelligent Recommendation Engine"]`, Sort: 4},
{Title: "Cybersecurity Services", Description: "Full-stack security protection including threat detection, vulnerability scanning, data encryption, and compliance auditing to safeguard enterprise digital assets.", Icon: "security", Features: `["Threat Intelligence Detection","Web Application Firewall","Encrypted Data Transmission","Security Compliance Auditing"]`, Sort: 5},
{Title: "Digital Consulting", Description: "A team of seasoned experts provides strategic digital transformation consulting, from business process optimization to technical architecture design, supporting enterprises at every stage.", Icon: "consulting", Features: `["Digital Transformation Planning","Technical Architecture Design","Business Process Optimization","Implementation Roadmap Guidance"]`, Sort: 6},
}
for i := range services {
if err := db.Create(&services[i]).Error; err != nil {
return err
}
}
news := []model.EnterpriseNews{
{Title: "Nexus Technologies Launches Next-Gen AI Model NexusGPT 4.0", Summary: "The new-generation large language model achieves major breakthroughs in reasoning, multimodal understanding, and code generation. API access is now available.", Content: "NexusGPT 4.0 is a next-generation large language model independently developed by Nexus Technologies, delivering significant improvements in natural language understanding, code generation, mathematical reasoning, and multimodal processing. With 175 billion parameters and training on high-quality bilingual corpora in Chinese and English, NexusGPT 4.0 has been deployed in intelligent customer service, content creation, and code assistance, providing clients with a more intelligent experience.", Category: "product", Author: "Product Department", Status: 1},
{Title: "Nexus Named Among Top 100 China AI Innovation Enterprises of 2026", Summary: "Nexus Technologies is recognized as one of the top 100 AI innovation enterprises in China for its sustained innovation and outstanding contributions in the AI field.", Content: "In the recently released Top 100 China AI Innovation Enterprises of 2026, Nexus Technologies was selected for its deep technical expertise and innovative product portfolio in artificial intelligence. This recognition affirms the group's continued investment and innovation capabilities in AI. Nexus will further increase R&D investment to drive AI technology adoption across more industries.", Category: "company", Author: "Brand Department", Status: 1},
{Title: "Nexus Cloud Platform Achieves SOC2 Type II Security Certification", Summary: "Nexus Cloud passes the internationally recognized SOC2 Type II security audit standard, reaching world-class security compliance capabilities.", Content: "Nexus Cloud has successfully passed the SOC2 Type II security audit certification, confirming that the platform meets international leading standards in data security, availability, processing integrity, and confidentiality. The certification was completed by a globally recognized auditing firm and covers all core service regions of the platform. Nexus Cloud will continue to deliver secure and reliable cloud services to global clients.", Category: "company", Author: "Security Department", Status: 1},
{Title: "Nexus Establishes Strategic Partnership with Leading Automaker to Build Smart Driving Ecosystem", Summary: "Nexus Technologies signs a strategic cooperation agreement with a top domestic automaker to jointly advance autonomous driving technology R&D and commercialization.", Content: "Nexus Technologies has signed a strategic cooperation agreement with a prominent domestic automobile manufacturer. The two parties will collaborate deeply on autonomous driving perception algorithms, vehicle-to-everything communication technology, and smart cockpit systems. This partnership leverages Nexus's strengths in AI and IoT alongside the automaker's expertise in vehicle manufacturing and supply chain management to co-develop the next generation of intelligent driving solutions.", Category: "industry", Author: "Business Development Department", Status: 1},
{Title: "Nexus IoT Platform Surpasses 1 Million Connected Devices", Summary: "The group's IoT platform reaches the milestone of over 1 million connected devices, spanning smart manufacturing, smart cities, smart agriculture, and more.", Content: "As of Q2 2026, the Nexus IoT platform has surpassed 1 million connected devices, covering multiple verticals including smart manufacturing, smart cities, smart agriculture, and smart energy. The platform processes over 5 billion data points daily, providing IoT data services to more than 800 enterprise clients. This milestone marks a new height for Nexus in IoT technical capabilities and market scale.", Category: "product", Author: "Product Department", Status: 1},
{Title: "Nexus Releases 2026 ESG Report, Upholding Sustainability Commitments", Summary: "Nexus Technologies publishes its annual ESG report, showcasing achievements and future commitments in environmental, social, and governance practices.", Content: "Nexus Technologies has officially released its 2026 ESG (Environmental, Social, Governance) report. The report highlights a 35% reduction in carbon emissions through green data center construction, over 20 million yuan invested in public welfare initiatives, and continued improvements in data privacy protection and corporate governance. The group has committed to achieving operational carbon neutrality by 2030, driving sustainable development through technological innovation.", Category: "company", Author: "Brand Department", Status: 1},
}
for i := range news {
if err := db.Create(&news[i]).Error; err != nil {
return err
}
}
team := []model.TeamMember{
{Name: "Michael Zhang", Position: "Founder & CEO", Bio: "Ph.D. in Computer Science from Tsinghua University. Former researcher at Google and Microsoft Research. Over 20 years of experience in AI. Recipient of a national talent program award.", Sort: 1},
{Name: "Emily Li", Position: "Co-Founder & CTO", Bio: "Ph.D. from Stanford University. Expert in cloud computing and distributed systems. Led architecture design for platforms serving hundreds of millions of users.", Sort: 2},
{Name: "David Wang", Position: "Chief AI Scientist", Bio: "Ph.D. in Artificial Intelligence from MIT. Renowned scholar in deep learning and natural language processing. Published over 50 papers at top-tier conferences.", Sort: 3},
{Name: "Sarah Chen", Position: "Chief Operating Officer", Bio: "Harvard MBA. Former Senior Partner at McKinsey & Company. 15 years of experience in enterprise operations and strategic consulting.", Sort: 4},
{Name: "Robert Liu", Position: "Chief Financial Officer", Bio: "Certified Public Accountant. Former executive at Deloitte and a publicly listed company. Extensive experience in corporate finance management and capital operations.", Sort: 5},
{Name: "Jessica Zhao", Position: "VP of Engineering", Bio: "Master's degree from UC Berkeley. Former Senior Engineering Director at Amazon. Led engineering teams of over 1,000 engineers.", Sort: 6},
}
for i := range team {
if err := db.Create(&team[i]).Error; err != nil {
return err
}
}
log.Println("企业数据初始化完成(1 企业 + 6 服务 + 6 新闻 + 6 团队)")
return nil
}