template <> void register_class(QxClass<Lieu> & t) { t.id(& Lieu::m_id, "lieu_id"); t.data(& Lieu::m_nom, "nom"); //t.data(& Lieu::m_latitude, "latitude"); //t.data(& Lieu::m_longitude, "longitude"); }}
template <> void register_class(QxClass<Departement> & t) { t.id(& Departement::m_id, "departement_id"); t.data(& Departement::m_nom, "nom"); t.data(& Departement::m_abbreviation, "abbreviation"); t.data(& Departement::m_adresse, "adresse"); }}
template<> void register_class(QxClass<Entidades::Documento> &t) { t.setName("t_documento"); t.id(&Entidades::Documento::m_codigo, "c_codigo"); t.data(&Entidades::Documento::m_nome, "c_nome"); t.data(&Entidades::Documento::m_descricao, "c_descricao"); t.data(&Entidades::Documento::m_ultimaAlteracao, "c_ultimaalteracao"); t.data(&Entidades::Documento::m_versao, "c_versao"); t.data(&Entidades::Documento::m_arquivo, "c_arquivo"); }
template <> void register_class(QxClass<blog> & t) { t.id(& blog::m_id, "blog_id"); t.data(& blog::m_text, "blog_text"); t.data(& blog::m_dt_creation, "date_creation"); t.relationManyToOne(& blog::m_author, "author_id"); t.relationOneToMany(& blog::m_commentX, "list_comment", "blog_id"); t.relationManyToMany(& blog::m_categoryX, "list_category", "category_blog", "blog_id", "category_id"); }}
void register_class(QxClass<qx::QxPersistable> & t) { t.setPropertyBag("QX_NOT_PERSISTABLE", "1"); t.setSoftDelete(qx::QxSoftDelete("qx_deleted_at")); t.id(& qx::QxPersistable::m_qxId, "qx_id"); t.data(& qx::QxPersistable::m_qxDateCreation, "qx_date_creation"); t.data(& qx::QxPersistable::m_qxDateModification, "qx_date_modification"); QxValidatorX<qx::QxPersistable> * pAllValidator = t.getAllValidator(); pAllValidator->add_CustomValidator(& qx::QxPersistable::qxIsValidInternal); }
template <> void register_class(QxClass<drug> & t) { t.id(& drug::id, "id"); t.data(& drug::name, "name", 1); t.data(& drug::description, "desc"); }}