1
# Copyright 2009-2010 Canonical Ltd.
3
# This file is part of desktopcouch-notes.
5
# desktopcouch is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU Lesser General Public License version 3
7
# as published by the Free Software Foundation.
9
# desktopcouch is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU Lesser General Public License for more details.
14
# You should have received a copy of the GNU Lesser General Public License
15
# along with desktopcouch. If not, see <http://www.gnu.org/licenses/>.
17
# Authors: Rodrigo Moya <rodrigo.moya@canonical.com>
18
# Vincenzo Di Somma <vincenzo.di.somma@canonical.com>
20
"""Note record representation."""
22
from desktopcouch.records import Record, RecordField, DateRecordField
25
'http://www.freedesktop.org/wiki/Specifications/desktopcouch/note'
31
note_format = RecordField('note_format')
32
title = RecordField('title')
33
content = RecordField('content')
34
last_change_date = DateRecordField('last_change_date')
35
create_date = DateRecordField('create_date')
37
def __init__(self, data=None, record_id=None):
38
super(Note, self).__init__(
39
record_id=record_id, data=data, record_type=NOTE_RECORD_TYPE)