OSDN Git Service

fix extend
[pettanr/pettanr.git] / app / assets / javascripts / manifest / work / models.js.coffee.erb
index a198d4f..5858dbd 100644 (file)
@@ -1,34 +1,20 @@
 #マニフェスト\r
 @models = {\r
   scroll: {\r
-    class_name: 'Scroll',\r
-    table_name: 'scrolls',\r
     associations: {\r
       belongs_to: {\r
         author: {\r
-          id_column: 'author_id'\r
         }, \r
       },\r
       has_many: {\r
         scroll_panels: {\r
-          foreign_key: 'scroll_id',\r
-          model_name: 'scroll_panel',\r
         }, \r
         panels: {\r
           through: 'scroll_panel',\r
-          foreign_key: 'scroll_id',\r
-          model_name: 'panel',\r
         }, \r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       title: {\r
         type: 'text',\r
         rules : {\r
           number: true,\r
         },\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_author: {\r
-        type: 'filter',\r
-        args: {\r
-          filter_item_name: 'author',\r
-          filter_key: 'author_id',\r
-        },\r
-      },\r
-      by_panel: {\r
-        type: 'through_filter',\r
-        args: {\r
-          filter_item_name: 'panel',\r
-          through: 'scroll_panels',\r
-          filter_key: 'panel_id',\r
-        },\r
-      },\r
-      play: {\r
-        type: 'play',\r
-        args: {\r
-          filter_item_name: 'scroll',\r
-          filter_model_name: 'scroll_panel',\r
-          filter_key: 'scroll_id',\r
-        },\r
-      },\r
     },\r
   },\r
   scroll_panel: {\r
-    class_name: 'ScrollPanel',\r
-    table_name: 'scroll_panels',\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
-          id_column: 'panel_id'\r
         }, \r
         scroll: {\r
-          id_column: 'scroll_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       scroll_id: {\r
         type: 'number',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_scroll: {\r
-        type: 'filter',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   comic: {\r
-    class_name: 'Comic',\r
-    table_name: 'comics',\r
     associations: {\r
       belongs_to: {\r
         author: {\r
-          id_column: 'author_id'\r
         }, \r
       },\r
       has_many: {\r
         stories: {\r
-          foreign_key: 'comic_id',\r
-          model_name: 'story',\r
         }, \r
       },\r
-      has_many_through: {\r
-      },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       title: {\r
         type: 'text',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_author: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   story: {\r
-    class_name: 'Story',\r
-    table_name: 'stories',\r
     associations: {\r
       belongs_to: {\r
         comic: {\r
-          id_column: 'comic_id'\r
         }, \r
       },\r
       has_many: {\r
         story_sheets: {\r
-          foreign_key: 'story_id',\r
-          model_name: 'story_sheet',\r
         }, \r
         sheets: {\r
           through: 'story_sheets',\r
-          foreign_key: 'story_id',\r
-          model_name: 'sheet',\r
         }, \r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       comic_id: {\r
         type: 'number',\r
         rules : {\r
           },\r
         },\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_comic: {\r
-        type: 'filter',\r
-      },\r
-      by_sheet: {\r
-        type: 'through_filter',\r
-      },\r
-      by_author: {\r
-        type: 'element_filter',\r
-      },\r
-      play: {\r
-        type: 'play',\r
-      },\r
     },\r
   },\r
   story_sheet: {\r
-    class_name: 'StorySheet',\r
-    table_name: 'story_sheets',\r
     associations: {\r
       belongs_to: {\r
         story: {\r
-          id_column: 'story_id'\r
         }, \r
         sheet: {\r
-          id_column: 'sheet_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       story_id: {\r
         type: 'number',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_story: {\r
-        type: 'filter',\r
-      },\r
-      by_sheet: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   sheet: {\r
-    class_name: 'Sheet',\r
-    table_name: 'sheets',\r
     associations: {\r
       belongs_to: {\r
         author: {\r
-          id_column: 'author_id'\r
         }, \r
       },\r
       has_many: {\r
         story_sheets: {\r
-          foreign_key: 'story_id',\r
-          model_name: 'story_sheet',\r
         }, \r
         stories: {\r
           through: 'story_sheets',\r
-          foreign_key: 'sheet_id',\r
-          model_name: 'story',\r
         }, \r
         sheet_panels: {\r
-          foreign_key: 'sheet_id',\r
-          model_name: 'sheet_panel',\r
         }, \r
         panels: {\r
           through: 'sheet_panels',\r
-          foreign_key: 'sheet_id',\r
-          model_name: 'panel',\r
         }, \r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       caption: {\r
         type: 'text',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_story: {\r
-        type: 'through_filter',\r
-      },\r
-      by_panel: {\r
-        type: 'through_filter',\r
-      },\r
-      by_author: {\r
-        type: 'filter',\r
-      },\r
-      play: {\r
-        type: 'play',\r
-      },\r
     },\r
   },\r
   sheet_panel: {\r
-    class_name: 'SheetPanel',\r
-    table_name: 'sheet_panels',\r
     associations: {\r
       belongs_to: {\r
         sheet: {\r
-          id_column: 'sheet_id'\r
         }, \r
         panel: {\r
-          id_column: 'panel_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       sheet_id: {\r
         type: 'number',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_sheet: {\r
-        type: 'filter',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   panel: {\r
-    class_name: 'Panel',\r
-    table_name: 'panels',\r
     associations: {\r
       belongs_to: {\r
         author: {\r
-          id_column: 'author_id'\r
         }, \r
       },\r
       has_many: {\r
         scroll_panels: {\r
-          foreign_key: 'panel_id',\r
-          model_name: 'scroll_panel',\r
         }, \r
         scrolls: {\r
           through: 'scroll_panels',\r
-          foreign_key: 'panel_id',\r
-          model_name: 'scroll',\r
         }, \r
         sheet_panels: {\r
-          foreign_key: 'panel_id',\r
-          model_name: 'sheet_panel',\r
         }, \r
         sheets: {\r
           through: 'sheet_panels',\r
-          foreign_key: 'panel_id',\r
-          model_name: 'sheet',\r
         }, \r
         panel_pictures: {\r
-          foreign_key: 'panel_id',\r
-          model_name: 'panel_picture',\r
         }, \r
         speech_balloons: {\r
-          foreign_key: 'panel_id',\r
-          model_name: 'speech_balloon',\r
         }, \r
         ground_pictures: {\r
-          foreign_key: 'panel_id',\r
-          model_name: 'ground_picture',\r
         }, \r
         ground_colors: {\r
-          foreign_key: 'panel_id',\r
-          model_name: 'ground_color',\r
         }, \r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       width: {\r
         type: 'number',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_scroll: {\r
-        type: 'through_filter',\r
-      },\r
-      by_sheet: {\r
-        type: 'through_filter',\r
-      },\r
-      by_author: {\r
-        type: 'filter',\r
-      },\r
-      by_speech_balloon_template: {\r
-        type: 'through_filter',\r
-      },\r
     },\r
   },\r
   panel_picture: {\r
-    class_name: 'PanelPicture',\r
-    table_name: 'panel_pictures',\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
-          id_column: 'panel_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       panel_id: {\r
         type: 'number',\r
         rules : {\r
           min: 0,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
-      by_author: {\r
-        type: 'element_filter',\r
-      },\r
     },\r
   },\r
   speech_balloon: {\r
-    class_name: 'SpeechBalloon',\r
-    table_name: 'speech_balloons',\r
-    extend: 'classname', \r
     associations: {\r
       belongs_to: {\r
         panel: {\r
-          id_column: 'panel_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
       has_one: {\r
         balloon: {\r
-          foreign_key: 'speech_balloon_id',\r
-          model_name: 'balloon',\r
         }, \r
         speech: {\r
-          foreign_key: 'speech_balloon_id',\r
-          model_name: 'speech',\r
         }, \r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       panel_id: {\r
         type: 'number',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      classname: {\r
+      speech_balloon_template_classname: {\r
         type: 'text',\r
         rules : {\r
           required: true,\r
           min: 0,\r
         }\r
       },\r
-      settings: {\r
+      speech_balloon_template_settings: {\r
         type: 'text',\r
         rules : {\r
         }\r
         rules : {\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
-      by_speech_balloon_template: {\r
-        type: 'filter',\r
-      },\r
-      by_author: {\r
-        type: 'element_filter',\r
-      },\r
     },\r
   }, \r
   balloon: {\r
-    class_name: 'Balloon',\r
-    table_name: 'balloons',\r
     associations: {\r
       belongs_to: {\r
         speech_balloon: {\r
-          id_column: 'speech_balloon_id'\r
         }, \r
         system_picture: {\r
-          id_column: 'system_picture_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
+      speech_balloon_id: {\r
         type: 'number',\r
-        primary_key: 1,\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      speech_balloon_id: {\r
+      speech_balloon_template_id: {\r
         type: 'number',\r
         rules : {\r
+          required: true,\r
           number: true,\r
         }\r
       },\r
+      speech_balloon_template_classname: {\r
+        type: 'text',\r
+        rules : {\r
+          required: true,\r
+        }\r
+      },\r
       system_picture_id: {\r
         type: 'number',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      settings: {\r
+      speech_balloon_template_settings: {\r
         type: 'text',\r
         rules : {\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
-      by_speech_balloon: {\r
-        type: 'filter',\r
-      },\r
-      by_author: {\r
-        type: 'element_filter',\r
-      },\r
     },\r
   },\r
   speech: {\r
-    class_name: 'Speech',\r
-    table_name: 'speeches',\r
     associations: {\r
       belongs_to: {\r
         speech_balloon: {\r
-          id_column: 'speech_balloon_id'\r
         }, \r
         writing_format: {\r
-          id_column: 'writing_format_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
+      speech_balloon_id: {\r
         type: 'number',\r
-        primary_key: 1,\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      speech_balloon_id: {\r
+      speech_balloon_template_id: {\r
         type: 'number',\r
         rules : {\r
+          required: true,\r
           number: true,\r
         }\r
       },\r
+      speech_balloon_template_classname: {\r
+        type: 'text',\r
+        rules : {\r
+          required: true,\r
+        }\r
+      },\r
       writing_format_id: {\r
         type: 'number',\r
         source: {\r
           number: true,\r
         }\r
       },\r
+      writing_format_classname: {\r
+        type: 'text',\r
+        rules : {\r
+          required: true,\r
+        }\r
+      },\r
       content: {\r
         type: 'text',\r
         rules : {\r
         rules : {\r
         }\r
       },\r
-      settings: {\r
+      speech_balloon_template_settings: {\r
         type: 'text',\r
         rules : {\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      by_speech_balloon: {\r
-        type: 'filter',\r
-      },\r
-      by_writing_format: {\r
-        type: 'filter',\r
+      writing_format_settings: {\r
+        type: 'text',\r
+        rules : {\r
+        }\r
       },\r
     },\r
   },\r
   ground_picture: {\r
-    class_name: 'GroundPicture',\r
-    table_name: 'ground_pictures',\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
-          id_column: 'panel_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       panel_id: {\r
         type: 'number',\r
         rules : {\r
           min: 0,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
-      by_author: {\r
-        type: 'element_filter',\r
-      },\r
     },\r
   },\r
   ground_color: {\r
-    class_name: 'GroundColor',\r
-    table_name: 'ground_colors',\r
     associations: {\r
       belongs_to: {\r
         panel: {\r
-          id_column: 'panel_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       panel_id: {\r
         type: 'number',\r
         rules : {\r
           min: 0,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_panel: {\r
-        type: 'filter',\r
-      },\r
-      by_author: {\r
-        type: 'element_filter',\r
-      },\r
     },\r
   },\r
   original_picture: {\r
-    class_name: 'OriginalPicture',\r
-    table_name: 'original_pictures',\r
     associations: {\r
       belongs_to: {\r
         artist: {\r
-          id_column: 'artist_id'\r
         }, \r
       },\r
       has_many: {\r
         pictures: {\r
-          foreign_key: 'original_picture_id',\r
-          model_name: 'picture',\r
         }, \r
       },\r
       has_one: {\r
         resource_picture: {\r
-          foreign_key: 'original_picture_id',\r
-          model_name: 'resource_picture',\r
         }, \r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       ext: {\r
         type: 'text',\r
         rules : {\r
       stopped_at: {\r
         type: 'datetime',\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
     },\r
   },\r
   picture: {\r
-    class_name: 'Picture',\r
-    table_name: 'pictures',\r
     associations: {\r
       belongs_to: {\r
         license: {\r
-          id_column: 'license_id'\r
         }, \r
         artist: {\r
-          id_column: 'artist_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       original_picture_id: {\r
         type: 'number',\r
         rules : {\r
           required: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
     }\r
   },\r
   resource_picture: {\r
-    class_name: 'ResourcePicture',\r
-    table_name: 'resource_pictures',\r
     associations: {\r
       belongs_to: {\r
         original_picture: {\r
-          id_column: 'original_picture_id'\r
         }, \r
         license: {\r
-          id_column: 'license_id'\r
         }, \r
         artist: {\r
-          id_column: 'artist_id'\r
         }, \r
       },\r
       has_many: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       original_picture_id: {\r
         type: 'number',\r
         rules : {\r
           required: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      private_list: {\r
-        type: 'private',\r
-      },\r
-      by_license: {\r
-        type: 'filter',\r
-      },\r
-      by_artist: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   speech_balloon_template: {\r
-    class_name: 'SpeechBalloonTemplate',\r
-    table_name: 'speech_balloon_templates',\r
     associations: {\r
       belongs_to: {\r
         system_picture: {\r
-          id_column: 'system_picture_id'\r
         }, \r
       },\r
       has_many: {\r
         speech_balloons: {\r
-          foreign_key: 'speech_balloon_template_id',\r
-          model_name: 'speech_balloon',\r
         }, \r
         panels: {\r
           through: 'speech_balloons',\r
-          foreign_key: 'speech_balloon_template_id',\r
-          model_name: 'panel',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       name: {\r
         type: 'text',\r
         rules : {\r
           required: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      select_items: {\r
-        type: 'system_resource',\r
-        args: {\r
-          select_item_name: 'panel_visible_items',\r
-        },\r
-      },\r
     },\r
   },\r
   writing_format: {\r
-    class_name: 'WritingFormat',\r
-    table_name: 'writing_formats',\r
     associations: {\r
       belongs_to: {\r
         system_picture: {\r
-          id_column: 'system_picture_id'\r
         }, \r
       },\r
       has_many: {\r
         speeches: {\r
-          foreign_key: 'writing_format_id',\r
-          model_name: 'speech',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       name: {\r
         type: 'text',\r
         rules : {\r
           required: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      select_items: {\r
-        type: 'system_resource',\r
-      },\r
-      by_system_picture: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   license_group: {\r
-    class_name: 'LicenseGroup',\r
-    table_name: 'license_groups',\r
     associations: {\r
       belongs_to: {\r
       },\r
       has_many: {\r
         licenses: {\r
-          foreign_key: 'license_group_id',\r
-          model_name: 'license',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       name: {\r
         type: 'text',\r
         rules : {\r
           required: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      select_items: {\r
-        type: 'system_resource',\r
-      },\r
     },\r
   },\r
   license: {\r
-    class_name: 'License',\r
-    table_name: 'licenses',\r
     associations: {\r
       belongs_to: {\r
         license_group: {\r
-          id_column: 'license_group_id'\r
         }, \r
         system_picture: {\r
-          id_column: 'system_picture_id'\r
         }, \r
       },\r
       has_many: {\r
         resource_pictures: {\r
-          foreign_key: 'license_id',\r
-          model_name: 'resource_picture',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
+      license_group_id: {\r
         type: 'number',\r
-        primary_key: 1,\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      license_group_id: {\r
-        type: 'number',\r
+      license_group_classname: {\r
+        type: 'text',\r
         rules : {\r
-          number: true,\r
+          required: true,\r
         }\r
       },\r
       name: {\r
           required: true,\r
         }\r
       },\r
-      settings: {\r
+      license_group_settings: {\r
         type: 'text',\r
         rules : {\r
         }\r
         rules : {\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
-      by_license_group: {\r
-        type: 'filter',\r
-      },\r
-      by_system_picture: {\r
-        type: 'filter',\r
-      },\r
     },\r
   },\r
   author: {\r
-    class_name: 'Author',\r
-    table_name: 'authors',\r
     associations: {\r
       belongs_to: {\r
       },\r
       has_many: {\r
         scrolls: {\r
-          foreign_key: 'author_id',\r
-          model_name: 'scroll',\r
         }, \r
         comics: {\r
-          foreign_key: 'author_id',\r
-          model_name: 'comic',\r
         }, \r
         stories: {\r
-          foreign_key: 'author_id',\r
-          model_name: 'story',\r
         }, \r
         sheets: {\r
-          foreign_key: 'author_id',\r
-          model_name: 'sheet',\r
         }, \r
         panels: {\r
-          foreign_key: 'author_id',\r
-          model_name: 'panel',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       name: {\r
         type: 'text',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
     },\r
   },\r
   artist: {\r
-    class_name: 'Artist',\r
-    table_name: 'artists',\r
     associations: {\r
       belongs_to: {\r
       },\r
       has_many: {\r
         resource_pictures: {\r
-          foreign_key: 'artist_id',\r
-          model_name: 'resource_picture',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       name: {\r
         type: 'text',\r
         rules : {\r
           number: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
-      },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
-    },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
-      },\r
     },\r
   },\r
   system_picture: {\r
-    class_name: 'SystemPicture',\r
-    table_name: 'system_pictures',\r
     associations: {\r
       belongs_to: {\r
       },\r
       has_many: {\r
         balloons: {\r
-          foreign_key: 'system_picture_id',\r
-          model_name: 'balloon',\r
         }, \r
-        balloon_templates: {\r
-          foreign_key: 'system_picture_id',\r
-          model_name: 'balloon_template',\r
+        speech_balloon_templates: {\r
         }, \r
         licenses: {\r
-          foreign_key: 'system_picture_id',\r
-          model_name: 'license',\r
         }, \r
       },\r
       has_one: {\r
       },\r
     },\r
     attributes: {\r
-      id: {\r
-        type: 'number',\r
-        primary_key: 1,\r
-        rules : {\r
-          number: true,\r
-        }\r
-      },\r
       ext: {\r
         type: 'text',\r
         rules : {\r
           required: true,\r
         }\r
       },\r
-      created_at: {\r
-        type: 'datetime',\r
+    },\r
+  },\r
+  ###############################################################\r
+  #\r
+  # extend models\r
+  #\r
+  ################################################################\r
+  circle_speech_balloon_speech_balloon: {\r
+    attributes: {\r
+      width: {\r
+        type: 'number',\r
+        rules : {\r
+          required: true,\r
+          number: true,\r
+        }\r
+      },\r
+    },\r
+  },\r
+  circle_speech_balloon_speech_balloon: {\r
+    attributes: {\r
+      width: {\r
+        type: 'number',\r
+        rules : {\r
+          required: true,\r
+          number: true,\r
+        }\r
       },\r
-      updated_at: {\r
-        type: 'datetime',\r
-      }\r
     },\r
-    lists: {\r
-      public_list: {\r
-        type: 'public',\r
+  },\r
+  circle_speech_balloon_speech_balloon: {\r
+    attributes: {\r
+      width: {\r
+        type: 'number',\r
+        rules : {\r
+          required: true,\r
+          number: true,\r
+        }\r
+      },\r
+    },\r
+  },\r
+  pettanr_pettan_commons_v01_licenses_attribute: {\r
+    attributes: {\r
+      license_id: {\r
+        type: 'number',\r
+        rules : {\r
+          required: true,\r
+          number: true,\r
+        }\r
+      },\r
+      artist_name: {\r
+        type: 'text',\r
+        rules : {\r
+          required: true,\r
+        }\r
+      },\r
+      caption: {\r
+        type: 'text',\r
+        rules : {\r
+          required: true,\r
+        }\r
+      },\r
+      sources: {\r
+        type: 'text',\r
+        rules : {\r
+          required: true,\r
+        }\r
       },\r
     },\r
   },\r