Ejemplo n.º 1
0
class Messages(db.Document):

    sender = db.GenericReferenceField(db_field='sd',
                                      verbose_name='De la',
                                      required=True)
    recipients = db.ListField(db.GenericReferenceField(),
                              db_field='rc',
                              verbose_name='Catre',
                              required=True)
    date = db.DateTimeField(db_field='dt',
                            verbose_name='Data trimitere',
                            default=datetime.datetime.now())
    title = db.StringField(db_field='tl', verbose_name='Subiect')
    content = db.StringField(db_field='ct', verbose_name='Continut')
    read = db.BooleanField(db_field='rd',
                           verbose_name='Status citire',
                           default=False)
    msgid = db.StringField(db_field='mi',
                           verbose_name='Id mesaj',
                           required=True)
    ownerid = db.GenericReferenceField(db_field='ow',
                                       verbose_name='Id proprietar mesaj',
                                       unique_with='msgid')
    folder = db.StringField(db_field='fl',
                            verbose_name='Folder',
                            choices=['inbox', 'arhiva', 'trimise'])
    threadid = db.StringField(db_field='th', verbose_name='Id thread')
Ejemplo n.º 2
0
class ProjPosts(db.Document):

	author = db.GenericReferenceField(db_field='au', verbose_name='Autor')
	title = db.StringField(db_field='tl', verbose_name='Titlu')
	content = db.StringField(db_field='ct', verbose_name='Continut', required=True)
	timestamp = db.DateTimeField(db_field='ts', verbose_name='Data')
	project = db.GenericReferenceField(db_field='pr', verbose_name='Proiect')
	comments = db.ListField(db.GenericReferenceField(), db_field='cm',verbose_name='Comentarii')
Ejemplo n.º 3
0
class Projects(db.Document):

	author = db.GenericReferenceField(db_field='au', verbose_name='Autor')
	title = db.StringField(db_field='tl', verbose_name='Titlu')
	content = db.StringField(db_field='ct', verbose_name='Descriere', required=True)
	timestamp = db.DateTimeField(db_field='ts', verbose_name='Data')
	posts = db.ListField(db.GenericReferenceField(), db_field='ps',verbose_name='Postari')
	members = db.ListField(db.GenericReferenceField(), db_field='mb', verbose_name='Participanti')
	applicants = db.ListField(db.GenericReferenceField(), db_field='ap', verbose_name='Aplicatii')
Ejemplo n.º 4
0
class WallPosts(db.Document):

	author = db.GenericReferenceField(db_field='au', verbose_name='Autor')
	title = db.StringField(db_field='tl', verbose_name='Titlu')
	content = db.StringField(db_field='ct', verbose_name='Continut', required=True)
	timestamp = db.DateTimeField(db_field='ts', verbose_name='Data')
	sticky = db.BooleanField(db_field='st', verbose_name='Sticky', default=False)
	announce = db.BooleanField(db_field='an', verbose_name='Anunt')
	comments = db.ListField(db.GenericReferenceField(), db_field='cm',verbose_name='Comentarii')
Ejemplo n.º 5
0
class Inventory(db.Document):

    operation = db.IntField(db_field='on',
                            verbose_name='Tip operatie',
                            required=True)  # 1 for buying, 2 for selling
    product = db.ReferenceField('Products',
                                db_field='sk',
                                verbose_name='Produs',
                                required=True)
    number = db.IntField(db_field='nb',
                         verbose_name='Numar produse',
                         required=True)
    timestamp = db.DateTimeField(db_field='tm',
                                 verbose_name='Data operatie',
                                 required=True)
    reference = db.StringField(db_field='rf', verbose_name='Referinta')
    operator = db.GenericReferenceField(db_field='op',
                                        verbose_name='Operator',
                                        required=True)
Ejemplo n.º 6
0
class ProjComments(db.Document):

	author = db.GenericReferenceField(db_field='au', verbose_name='Autor')
	content = db.StringField(db_field='ct', verbose_name='Continut', required=True)
	timestamp = db.DateTimeField(db_field='ts', verbose_name='Data')
	reference = db.GenericReferenceField(db_field='rf', verbose_name='Referinta')