feat(figma): add local sync dashboard, API, and CLI tooling
Add Figma persistence and sync flow for one file source.
- create figma_files, figma_file_versions, and figma_comments tables with supporting migrations
- add FigmaSyncService for full and incremental sync, API fetch, pagination, dedupe, and upserts
- add CLI commands and shell wrappers for full and incremental sync runs
- expose Figma dashboard plus API endpoints for summary, snapshots, comments, and admin sync trigger
- wire route and sidebar entry for dashboard access
- trim legacy file_url and thumbnail_url fields, add version label/description support
2026-04-27 16:55:43 +07:00
|
|
|
<?php namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use CodeIgniter\Model;
|
|
|
|
|
|
|
|
|
|
class FigmaFileVersionsModel extends Model
|
|
|
|
|
{
|
|
|
|
|
protected $table = 'figma_file_versions';
|
|
|
|
|
protected $primaryKey = 'id';
|
|
|
|
|
protected $useAutoIncrement = true;
|
|
|
|
|
protected $returnType = 'array';
|
|
|
|
|
protected $useSoftDeletes = false;
|
|
|
|
|
protected $protectFields = true;
|
|
|
|
|
protected $allowedFields = [
|
|
|
|
|
'file_id',
|
|
|
|
|
'figma_version_id',
|
|
|
|
|
'version',
|
|
|
|
|
'label',
|
|
|
|
|
'description',
|
|
|
|
|
'name',
|
|
|
|
|
'editor_type',
|
2026-04-28 05:39:02 +07:00
|
|
|
'figma_user_id',
|
feat(figma): add local sync dashboard, API, and CLI tooling
Add Figma persistence and sync flow for one file source.
- create figma_files, figma_file_versions, and figma_comments tables with supporting migrations
- add FigmaSyncService for full and incremental sync, API fetch, pagination, dedupe, and upserts
- add CLI commands and shell wrappers for full and incremental sync runs
- expose Figma dashboard plus API endpoints for summary, snapshots, comments, and admin sync trigger
- wire route and sidebar entry for dashboard access
- trim legacy file_url and thumbnail_url fields, add version label/description support
2026-04-27 16:55:43 +07:00
|
|
|
'last_modified_figma',
|
|
|
|
|
'created_at_figma',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $useTimestamps = true;
|
|
|
|
|
protected $dateFormat = 'datetime';
|
|
|
|
|
protected $createdField = 'created_at';
|
|
|
|
|
protected $updatedField = 'updated_at';
|
|
|
|
|
}
|