Some checks failed
Test before pr merge / test-lint (pull_request) Failing after 7s
Build on push / prepare (push) Successful in 10s
Build on push / core (push) Successful in 18s
Build on push / query (push) Successful in 17s
Build on push / dependency (push) Successful in 17s
Build on push / application (push) Successful in 16s
Build on push / mail (push) Successful in 15s
Build on push / database (push) Successful in 15s
Build on push / translation (push) Successful in 18s
Build on push / auth (push) Successful in 23s
Build on push / api (push) Successful in 16s
31 lines
718 B
Python
31 lines
718 B
Python
from datetime import datetime
|
|
from typing import Optional
|
|
|
|
from cpl.core.typing import SerialId
|
|
from cpl.database.abc.db_model_abc import DbModelABC
|
|
|
|
|
|
class User(DbModelABC):
|
|
|
|
def __init__(
|
|
self,
|
|
id: int,
|
|
name: str,
|
|
city_id: int = 0,
|
|
deleted: bool = False,
|
|
editor_id: Optional[SerialId] = None,
|
|
created: Optional[datetime] = None,
|
|
updated: Optional[datetime] = None,
|
|
):
|
|
DbModelABC.__init__(self, id, deleted, editor_id, created, updated)
|
|
self._name = name
|
|
self._city_id = city_id
|
|
|
|
@property
|
|
def name(self) -> str:
|
|
return self._name
|
|
|
|
@property
|
|
def city_id(self) -> int:
|
|
return self._city_id
|