package dbtypes

type CompanyModerationStatus string

const (
	CompanyModerationStatusNew      CompanyModerationStatus = "new"
	CompanyModerationStatusPending  CompanyModerationStatus = "pending"
	CompanyModerationStatusApproved CompanyModerationStatus = "approved"
	CompanyModerationStatusRejected CompanyModerationStatus = "rejected"
)

type (
	Company struct {
		Id                  string
		OwnerId             string
		Name                *string
		LegalPerson         *string
		Description         *string
		Website             *string
		PhysicalAddress     *string
		LegalAddress        *string
		Inn                 *string
		Kpp                 *string
		IsActive            bool
		HasModerationTicket bool
		Staff               []string
		Metadata            *string
		ExtraFieldsTemplate *string
	}
)

type (
	CompanyListGetRequest struct {
		Id string
	}

	CompanyListGetResponse struct {
		Companies []Company
	}
)

type (
	CompanyByIdGetRequest struct {
		Id        string
		CompanyId string
	}

	CompanyByIdGetResponse struct {
		Company Company
	}
)

type (
	CompanyCreateRequest struct {
		OwnerId             string
		Name                *string
		LegalPerson         *string
		Description         *string
		Website             *string
		PhysicalAddress     *string
		LegalAddress        *string
		Inn                 *string
		Kpp                 *string
		Staff               []string
		Metadata            *string
		ExtraFieldsTemplate *string
	}

	CompanyCreateResponse struct {
		Id string
	}
)

type (
	CompanyUpdateRequest struct {
		Id              string
		Name            *string
		LegalPerson     *string
		Description     *string
		Website         *string
		PhysicalAddress *string
		LegalAddress    *string
		Inn             *string // can be updated in several rare cases
		Kpp             *string // can be updated in several rare cases
		Staff           []string
		Metadata        *string
		ExtraFields     *string
	}

	CompanyUpdateResponse struct {
	}
)

type (
	CompanyDeleteRequest struct {
		Id string
	}

	CompanyDeleteResponse struct {
	}
)
