cartodb-4.42/app/models/carto/visualization_backup.rb
2024-04-06 05:25:13 +00:00

22 lines
632 B
Ruby

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