Пример #1
0
class pwr_Task(models.Model):
	class Meta:
		managed = False
		db_table = 'Task'
	
	task_id = models.Integer(primary_key=True)
	query = models.CharField(max_length=21840)
	occurrence_num = models.Integer()
	status = models.CharField(max_length=20)
	start_time = models.DateTimeField(null=True)
	end_time = models.DateTimeField(null=True)
	user_id = models.ForeignKey('pwr_User', models.DO_NOTHING)# Doprecyzowac czy to klucz obcy
	note_title = models.ForeignKey('pwr_Note', models.DO_NOTHING)# Doprecyzowac: czy to klucz obcy
Пример #2
0
class Affiliate (models.Model):
    id_client=models.models.OneToOneField(
        'Client', on_delete=models.CASCADE, null=False, blank=False, primary_key=True)
    name = models.CharField(max_length=30, null=True)
    identification = models.CharField(max_length=8, unique=True)
    points = models.Integer(default=0)
    def __str__(self):
        return self.name
Пример #3
0
class Article(models.Model)
    author = models.CharField(max_length=50)
    title = models.CharField(max_length=200)
    text = models.TextField()
    picture=models.ImageField(upload_to="user")
    likes= models.Integer()
     published_date = models.DateTimeField(
            blank=True, null=True)
Пример #4
0
class Category(models.Model):
    id = models.Integer(primary_key=True)
    name = models.CharField(max_length=32)
    hide_for_review = models.BooleanField(default=False)

    class Meta:
        db_table = 'category'
        verbose_name = '分类'
        verbose_name_plural = '分类'
Пример #5
0
class Post(models.Model):
    created_at = models.DateField()
    title = models.CharField(default = '', max_length = 100)
    picture = models.ImageField(default = '', max_length = 100)
    content = models.CharField(default = '', max_length = 100)
    site_url = models.URLField(default = '', max_length = 100)
    vote_total = models.Integer(default = '', max_length = 100)

    def __str__(self):
        return self.title
Пример #6
0
 def __init__(self,
              name,
              pos_x,
              pos_y,
              pos_z,
              roll,
              pitch,
              yaw,
              order='zyx'):
     number = models.Integer(max_size=20)
     pass
Пример #7
0
class MeetingType(models.Model):
    meetingtitle=models.Charfield (max_length='64')
    meetingdate=models.Datefield()
    meetingtime=models=models.Integer(max_length = '4')
    meetinglocation==models.Charfield (max_length='256')
    meetingagenda=models.Textfield()
Пример #8
0
class Meta:
    db_table= 'minutes'
    verbose_name_plural='MeetingMinutes'


    def __str__(self):
        return self.typename
    


class MeetingResource
    resourcename=models.Charfield (max_length='64')
    resourcetype=models.Charfield (max_length='64')
    resourceurl=models.URLField(null=True, blank=True)
    resourceentrydate=models.Datefield()
    resourceuserid=models.Integer(max_length = '7')
    resourcedescription=models.TextField()

    class Meta:
    db_table= 'resource'
    verbose_name_plural='MeetingResources'

    def __str__(self):
        return self.typename
    

class MeetingEvent
    eventtitle=models.Charfield (max_length='64')
    eventlocation=models.Charfield (max_length='64')
    eventdate=models.Datefield()
    eventtime=models.Integer(max_length = '4')