param_company.go 3.6 KB
package allied_creation_user

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
	"time"
)

//创建企业
type (
	ReqCompanyCreate struct {
	}

	DataCompanyCreate struct {
	}
)

//更新企业
type (
	ReqCompanyUpdate struct {
		CompanyId   int64
		CompanyName string `json:"companyName"`
		Address     string `json:"address"`
		SystemName  string `json:"systemName"`
		Logo        string `json:"logo"`
	}

	DataCompanyUpdate struct {
	}
)

//更新自定义菜单
type (
	ReqCompanySetCustomizeMenus struct {
		CompanyId int64  `json:"companyId"`
		MenuAlias string `json:"menuAlias"`
		MenuId    int    `json:"menuId"`
		Sort      int    `json:"sort"`
	}

	DataCompanySetCustomizeMenus struct {
	}
)

//移除企业
type (
	ReqCompanyRemove struct {
		CompanyId int64
	}

	DataCompanyRemove struct {
	}
)

//返回企业
type (
	ReqCompanyGet struct {
		CompanyId int `json:"companyId"`
	}

	DataCompanyGet CompanyItem
)

type (
	ReqCompanyAudit struct {
		CompanyId int `json:"-"`
		// 审核状态
		Status int `cname:"审核状态" json:"status" valid:"Required"`
		// 备注
		Remark string `cname:"备注" json:"remark" valid:"Required"`
	}

	DataCompanyAudit map[string]interface{}
)

type (
	ReqCompanyEnable struct {
		CompanyId int `json:"-"`
		// 审核状态
		Status int `cname:"审核状态" json:"status" valid:"Required"`
	}

	DataCompanyEnable map[string]interface{}
)

//返回企业列表
type (
	ReqCompanySearch struct {
		// 查询偏离量
		Offset int `cname:"查询偏离量" json:"offset,omitempty"`
		// 查询限制
		Limit int `cname:"查询限制" json:"limit,omitempty"`
		// 状态
		Status int `cname:"状态" json:"status,omitempty"`
		// 企业名称
		CompanyName string `cname:"企业名称" json:"companyName,omitempty"`
	}

	DataCompanySearch struct {
		Companys []CompanyItem `json:"companys"`
		Count    int           `json:"count"`
	}

	CompanyItem struct {
		CompanyId     int `json:"companyId"`
		CompanyConfig struct {
			SystemName string `json:"systemName"`
			Theme      string `json:"theme"`
		} `json:"companyConfig"`
		CompanyInfo struct {
			CompanyName      string    `json:"companyName"`
			Scale            string    `json:"scale"`
			IndustryCategory string    `json:"industryCategory"`
			RegisteredTime   time.Time `json:"registeredTime"`
			Legal            struct {
				LegalPerson            string `json:"legalPerson"`
				SocialCreditCode       string `json:"socialCreditCode"`
				BusinessLicenseAddress struct {
					Province string `json:"province"`
					City     string `json:"city"`
					Address  string `json:"address"`
				} `json:"businessLicenseAddress"`
				BusinessLicenseAttachments []domain.Attachment `json:"businessLicenseAttachments"`
			} `json:"legal"`
			Remark string `json:"备注"`
		} `json:"companyInfo"`
		Status    int       `json:"status"`
		CreatedAt time.Time `json:"createdAt"`
		UpdatedAt time.Time `json:"updatedAt"`
	}
)

//返回自定义菜单列表
type (
	ReqCompanyGetCustomizeMenus struct {
		CompanyId int64 `json:"companyId"`
		// 菜单类别 web app
		MenuCategory string `cname:"菜单类别" json:"menuCategory,omitempty"`
	}

	DataCompanyGetCustomizeMenus struct {
		Menus []struct {
			Code           string  `json:"code"`
			EnableStatus   float64 `json:"enableStatus"`
			Icon           string  `json:"icon"`
			MenuAlias      string  `json:"menuAlias"`
			MenuID         float64 `json:"menuId"`
			MenuName       string  `json:"menuName"`
			MenuType       string  `json:"menuType"`
			ParentID       float64 `json:"parentId"`
			ParentMenuName string  `json:"parentMenuName"`
			Remark         string  `json:"remark"`
			Sort           float64 `json:"sort"`
		} `json:"menus"`
	}
)