-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- use a semi-automated normalization method
- Loading branch information
1 parent
66fd009
commit c9f4800
Showing
22 changed files
with
813 additions
and
403 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from dataclasses import dataclass | ||
from typing import Dict, Union | ||
|
||
from ngohub.models.organization import OrganizationApplication | ||
|
||
|
||
@dataclass | ||
class CheckOrganizationUserApplication: | ||
user: Union[Dict, None] | ||
application: Union[OrganizationApplication, None] | ||
has_access: Union[bool, None] | ||
|
||
def __init__(self) -> None: | ||
self.user = None | ||
self.application = None | ||
self.has_access = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from dataclasses import dataclass | ||
|
||
|
||
@dataclass | ||
class BaseDataclass: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from dataclasses import dataclass | ||
from datetime import datetime | ||
|
||
|
||
@dataclass | ||
class City: | ||
id: int | ||
name: str | ||
county_id: int | ||
created_on: datetime | ||
|
||
|
||
@dataclass | ||
class County: | ||
id: int | ||
name: str | ||
abbreviation: str | ||
region_id: int | ||
created_on: datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from dataclasses import dataclass | ||
from datetime import datetime | ||
|
||
|
||
@dataclass | ||
class Domain: | ||
id: int | ||
name: str | ||
created_on: datetime | ||
updated_on: datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,197 @@ | ||
from dataclasses import dataclass | ||
from datetime import datetime | ||
from typing import List | ||
|
||
from ngohub.models.core import BaseDataclass | ||
from ngohub.models.locations import City, County | ||
from ngohub.models.nomenclatures import Domain | ||
|
||
|
||
@dataclass | ||
class OrganizationContact(BaseDataclass): | ||
email: str | ||
phone: str | ||
full_name: str | ||
|
||
|
||
@dataclass | ||
class OrganizationLegalReprezentative(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
full_name: str | ||
email: str | ||
phone: str | ||
role: str | ||
|
||
|
||
@dataclass | ||
class OrganizationDirector(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
full_name: str | ||
email: str | ||
phone: str | ||
role: str | ||
|
||
|
||
@dataclass | ||
class OrganizationReportFile(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
year: int | ||
status: str | ||
|
||
|
||
@dataclass | ||
class OrganizationReports(OrganizationReportFile): | ||
number_of_volunteers: int | ||
number_of_contractors: int | ||
report: str | ||
|
||
|
||
@dataclass | ||
class OrganizationPartners(OrganizationReportFile): | ||
number_of_partners: int | ||
path: str | ||
|
||
|
||
@dataclass | ||
class OrganizationInvestors(OrganizationReportFile): | ||
number_of_investors: int | ||
path: str | ||
|
||
|
||
@dataclass | ||
class OrganizationGeneral(BaseDataclass): | ||
id: str | ||
created_on: datetime | ||
updated_on: datetime | ||
name: str | ||
alias: str | ||
type: str | ||
email: str | ||
phone: str | ||
year_created: str | ||
cui: str | ||
association_registry_number: str | ||
association_registry_part: str | ||
association_registry_section: str | ||
association_registry_issuer_id: str | ||
national_registry_number: str | ||
raf_number: str | ||
short_description: str | ||
description: str | ||
address: str | ||
logo: str | ||
website: str | ||
facebook: str | ||
instagram: str | ||
twitter: str | ||
linkedin: str | ||
tiktok: str | ||
donation_website: str | ||
redirect_link: str | ||
donation_sms: str | ||
donation_keyword: str | ||
contact: OrganizationContact | ||
organization_address: str | ||
city: City | ||
county: County | ||
organization_city: str | ||
organization_county: str | ||
association_registry_issuer: str | ||
|
||
|
||
@dataclass | ||
class OrganizationActivity(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
area: str | ||
is_part_of_federation: bool | ||
is_part_of_coalition: bool | ||
is_part_of_international_organization: bool | ||
international_organization_name: str | ||
is_social_service_viable: bool | ||
offers_grants: bool | ||
is_public_interest_organization: bool | ||
has_branches: bool | ||
federations: List[str] | ||
coalitions: List[str] | ||
domains: List[Domain] | ||
cities: List[str] | ||
branches: List[str] | ||
regions: List[str] | ||
|
||
|
||
@dataclass | ||
class OrganizationLegal(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
others: str | ||
organization_statute: str | ||
non_political_affiliation_file: str | ||
balance_sheet_file: str | ||
legal_reprezentative: OrganizationLegalReprezentative | ||
directors: List[OrganizationDirector] | ||
|
||
|
||
@dataclass | ||
class OrganizationFinancial(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
type: str | ||
number_of_employees: int | ||
year: int | ||
total: int | ||
status: str | ||
report_status: str | ||
synced_anaf: bool | ||
data: str | ||
|
||
|
||
@dataclass | ||
class OrganizationReport(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
reports: List[OrganizationReports] | ||
partners: List[OrganizationPartners] | ||
investors: List[OrganizationInvestors] | ||
|
||
|
||
@dataclass | ||
class Organization(BaseDataclass): | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
status: str | ||
general_data: OrganizationGeneral | ||
activity_data: OrganizationActivity | ||
legal_data: OrganizationLegal | ||
financial_data: List[OrganizationFinancial] | ||
report_data: OrganizationReport | ||
|
||
|
||
@dataclass | ||
class Application(BaseDataclass): | ||
id: int | ||
name: str | ||
|
||
|
||
@dataclass | ||
class OrganizationApplication(Application): | ||
logo: str | ||
short_description: str | ||
login_link: str | ||
website: str | ||
status: str | ||
ngo_status: str | ||
created_on: datetime | ||
type: str | ||
application_label: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from dataclasses import dataclass | ||
|
||
from ngohub.models.core import BaseDataclass | ||
|
||
|
||
@dataclass | ||
class Version(BaseDataclass): | ||
version: str | ||
revision: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from dataclasses import dataclass | ||
from datetime import datetime | ||
|
||
|
||
@dataclass | ||
class User: | ||
id: int | ||
created_on: datetime | ||
updated_on: datetime | ||
cognito_id: str | ||
name: str | ||
email: str | ||
phone: str | ||
role: str | ||
status: str | ||
organization_id: int |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.