Initial commit: Material Texture API service

- Go + Gin + GORM + PostgreSQL backend
- RESTful API for material management
- Docker deployment support
- Database partitioning for billion-scale data
- API documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
likegears
2025-12-11 15:29:49 +08:00
commit 85ba15c564
31 changed files with 1518167 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
-- ============================================
-- Migration: 004_add_version_column.sql
-- Purpose: 添加乐观锁版本字段
-- ============================================
-- 添加 version 字段到 materials 表 (用于乐观锁)
ALTER TABLE materials
ADD COLUMN IF NOT EXISTS version BIGINT NOT NULL DEFAULT 0;
-- 注释
COMMENT ON COLUMN materials.version IS '乐观锁版本号,用于防止并发更新覆盖';