Spaces:
Sleeping
Sleeping
File size: 1,139 Bytes
32eb084 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | """
Database models for tasks.
"""
from datetime import datetime
from typing import Optional
from uuid import UUID
class ScmTask:
"""Model representing a task in the database"""
def __init__(
self,
id: UUID,
merchant_id: UUID,
assigned_to: UUID,
title: str,
description: Optional[str],
status: str,
latitude: Optional[float],
longitude: Optional[float],
address: Optional[str],
scheduled_at: Optional[datetime],
started_at: Optional[int],
completed_at: Optional[int],
created_at: datetime,
updated_at: datetime
):
self.id = id
self.merchant_id = merchant_id
self.assigned_to = assigned_to
self.title = title
self.description = description
self.status = status
self.latitude = latitude
self.longitude = longitude
self.address = address
self.scheduled_at = scheduled_at
self.started_at = started_at
self.completed_at = completed_at
self.created_at = created_at
self.updated_at = updated_at
|