00001 #ifndef GLOBAL_CONTENT_H 00002 #define GLOBAL_CONTENT_H 00003 00004 #include "read_write_base.hpp" 00005 00006 00007 /* 00008 CREATE TABLE global_content ( 00009 id bigint not null primary key auto_increment, 00010 site_id bigint NOT NULL, -- site 00011 name text NOT NULL, -- name 00012 content text NOT NULL -- content 00013 ); 00014 */ 00015 class global_content: public read_write_base 00016 { 00017 public: 00018 identifier id; 00019 long long site_id; 00020 string name; 00021 string content; 00022 00023 global_content():read_write_base(),id(0LL),name("top") 00024 { 00025 // set name 00026 data_name("metasite.global_content"); 00027 // add fields 00028 addDXMap( new llongXfer("id", &id )); 00029 addDXMap( new llongXfer("site_id", &site_id )); 00030 addDXMap( new stringXfer("name", &name )); 00031 addDXMap( new stringXfer("content", &content )); 00032 } 00033 }; 00034 00035 #endif
1.5.5