BASEDIR "/src/"; MODULE mcms.Guestbook EXTENDS Base { VERSION "1.0.1"; GENTABLEXML; MODEL Entry { id ObjectID; site_id Integer; instance String(32); langu String(5); state Short; content Text; created_by_id NULLABLE UserID; created_by_name String(128); created_at DateTime; modified_by_id NULLABLE UserID; modified_by_name NULLABLE String(128); modified_at NULLABLE DateTime; revision Integer; ~comments Object; PKEY id; INDEX site site_id; } MODEL Comment { id ObjectID; entry_id REF Entry:id; state Integer; comment Text; created_at DateTime; created_by_id UserID; PKEY id; INDEX entry entry_id; } SERVICE Repos { METHOD storeEntry(Entry e) STORES e:id IN "m_mcms#guestbook_entries"; METHOD removeEntry(Entry e) REMOVES e(id=id) FROM "m_mcms#guestbook_entries"; } view index { LIST Entry entries:entry { SHOW Entry entry; } } view add { FORM Entry entry; } action addPost { } view addOK { } view delAsk { CHECKPERM delEntry; } action removeEntry { CHECKPERM delEntry; } }