cartodb-4.42/app/models/carto/visualization_backup.rb

22 lines
632 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
require 'active_record'
module Carto
class VisualizationBackup < ActiveRecord::Base
# @param Uuid id
# @param Uuid user_id
# @param Uuid visualization_id
# @param DateTime created_at (CURRENT_TIMESTAMP)
# @param String category
# @param JSON export
attr_accessible :id, :user_id, :visualization_id, :category, :export
validates :user_id, :visualization_id, :category, :export, presence: true
serialize :export, CartoJsonSymbolizerSerializer
validates :export, carto_json_symbolizer: true
CATEGORY_VISUALIZATION = 'visualization'.freeze
CATEGORY_LAYER = 'layer'.freeze
end
end