Model Contact¶
class Contact(Base)¶
-
class
toardb.contacts.models.
Contact
(**kwargs)[source]¶ Bases:
sqlalchemy.orm.decl_api._DynamicAttributesType
,sqlalchemy.inspection.Inspectable
[sqlalchemy.orm.mapper.Mapper
[Any
]]Table “public.contacts”
Column
Type
Collation
Nullable
Default
id
integer
not null
nextval(‘contacts_id_seq’::regclass)
person_id
integer
organisation_id
integer
- Indexes:
“contacts_pkey” PRIMARY KEY, btree (id) “contacts_person_id_organisation_id” UNIQUE CONSTRAINT, btree (person_id, organisation_id)
- Foreign-key constraints:
“contacts_organisation_id_fkey” FOREIGN KEY (organisation_id) REFERENCES organisations(id) “contacts_person_id_fkey” FOREIGN KEY (person_id) REFERENCES persons(id)
- Referenced by:
TABLE “stationmeta_roles” CONSTRAINT “stationmeta_roles_contact_id_fk_contacts_id” FOREIGN KEY (contact_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED TABLE “timeseries_roles” CONSTRAINT “timeseries_roles_contact_id_fk_contacts_id” FOREIGN KEY (contact_id) REFERENCES contacts(id) DEFERRABLE INITIALLY DEFERRED
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
id
¶
-
person_id
¶
-
organisation_id
¶
-
organisation
¶
-
person
¶
-
metadata
: MetaData = MetaData()¶
-
registry
: RegistryType = <sqlalchemy.orm.decl_api.registry object>¶
class Organisation (Base)¶
-
class
toardb.contacts.models_organisation.
Organisation
(**kwargs)[source]¶ Bases:
sqlalchemy.orm.decl_api._DynamicAttributesType
,sqlalchemy.inspection.Inspectable
[sqlalchemy.orm.mapper.Mapper
[Any
]]Table “public.organisations”
Column
Type
Collation
Nullable
Default
id
integer
not null
nextval(‘organisations_id_seq’::regclass)
name
character varying(32)
not null
longname
character varying(256)
not null
kind
integer
not null
city
character varying(64)
not null
postcode
character varying(16)
not null
street_address
character varying(128)
not null
country
integer
not null
-1
homepage
character varying(200)
not null
contact_url
character varying(200)
not null
‘’
attribution
character varying(3000)
not null
‘’
- Indexes:
“organisations_pkey” PRIMARY KEY, btree (id)
- Check constraints:
“organisations_kind_check” CHECK (kind >= 0)
- Foreign-key constraints:
“organisations_kind_fk_ok_vocabulary_enum_val” FOREIGN KEY (kind) REFERENCES ok_vocabulary(enum_val) “organisations_country_fk_cn_vocabulary_enum_val” FOREIGN KEY (country) REFERENCES cn_vocabulary(enum_val)
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
id
¶
-
name
¶
-
longname
¶
-
kind
¶
-
city
¶
-
postcode
¶
-
street_address
¶
-
country
¶
-
homepage
¶
-
contact_url
¶
-
attribution
¶
-
metadata
: MetaData = MetaData()¶
-
registry
: RegistryType = <sqlalchemy.orm.decl_api.registry object>¶
class Person (Base)¶
-
class
toardb.contacts.models_person.
Person
(**kwargs)[source]¶ Bases:
sqlalchemy.orm.decl_api._DynamicAttributesType
,sqlalchemy.inspection.Inspectable
[sqlalchemy.orm.mapper.Mapper
[Any
]]Table “public.persons”
Column
Type
Collation
Nullable
Default
id
integer
not null
nextval(‘persons_id_seq’::regclass)
name
character varying(64)
not null
email
character varying(128)
not null
phone
character varying(32)
not null
‘’::character varying
orcid
character varying(19)
not null
‘0000-0002-0309-8010’::character varying
isprivate
boolean
not null
false
- Indexes:
“persons_pkey” PRIMARY KEY, btree (id) “persons_name_email” UNIQUE CONSTRAINT, btree (name, email)
- Referenced by:
TABLE “station_roles” CONSTRAINT “station_roles_person_id_3bd9c160_fk_persons_id” FOREIGN KEY (person_id) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED TABLE “timeseries_roles” CONSTRAINT “timeseries_roles_person_id_3e26200e_fk_persons_id” FOREIGN KEY (person_id) REFERENCES persons(id) DEFERRABLE INITIALLY DEFERRED
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
id
¶
-
name
¶
-
email
¶
-
phone
¶
-
orcid
¶
-
isprivate
¶
-
metadata
: MetaData = MetaData()¶
-
registry
: RegistryType = <sqlalchemy.orm.decl_api.registry object>¶