| 7 | |
| 8 | |
| 9 | class Project(DBMLObject): |
| 10 | dont_compare_fields = ('database',) |
| 11 | |
| 12 | def __init__(self, |
| 13 | name: str, |
| 14 | items: Optional[Dict[str, str]] = None, |
| 15 | note: Optional[Union[Note, str]] = None, |
| 16 | comment: Optional[str] = None): |
| 17 | self.database = None |
| 18 | self.name = name |
| 19 | self.items = items or {} |
| 20 | self.note = Note(note) |
| 21 | self.comment = comment |
| 22 | |
| 23 | def __repr__(self): |
| 24 | """<Project 'myproject'>""" |
| 25 | return f'<Project {self.name!r}>' |
| 26 | |
| 27 | @property |
| 28 | def note(self): |
| 29 | return self._note |
| 30 | |
| 31 | @note.setter |
| 32 | def note(self, val: Note) -> None: |
| 33 | self._note = val |
| 34 | val.parent = self |
no outgoing calls