libreccm-legacy/ccm-core/pdl/com/arsdigita/versioning/Txn.pdl

60 lines
1.8 KiB
Plaintext
Executable File

//
// Copyright (C) 2003-2004 Red Hat Inc. All Rights Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License
// as published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// $Id: Txn.pdl 1169 2006-06-14 13:08:25Z fabrice $
// $DateTime: 2004/08/16 18:10:38 $
model com.arsdigita.versioning;
import com.arsdigita.kernel.*;
object type Txn {
BigInteger[1..1] id = vcx_txns.id INTEGER;
// audit info
String[0..1] modifyingIP = vcx_txns.modifying_ip VARCHAR(400);
Date[1..1] timestamp = vcx_txns.timestamp TIMESTAMP;
User[0..1] modUser = join vcx_txns.modifying_user
to users.user_id;
component Tag[0..n] tags = join vcx_txns.id to vcx_tags.txn_id;
DataObjectChange[0..n] changes = join vcx_txns.id
to vcx_obj_changes.txn_id;
object key (id);
}
object type Tag {
BigInteger[1..1] id = vcx_tags.id INTEGER;
String[0..1] tag = vcx_tags.tag VARCHAR;
String[0..1] taggedOID = vcx_tags.tagged_oid VARCHAR;
object key(id);
}
query UserPublications
{
Integer theCount;
do
{
select count(*) as c from vcx_txns
where modifying_user = :value
} map {
theCount = c;
}
}