co_interface

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2023 License: MIT Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ICompany

type ICompany[TR co_model.ICompanyRes] interface {
	GetCompanyById(ctx context.Context, id int64) (response TR, err error)
	GetCompanyByName(ctx context.Context, name string) (response TR, err error)
	HasCompanyByName(ctx context.Context, name string, excludeIds ...int64) bool
	QueryCompanyList(ctx context.Context, filter *base_model.SearchParams) (*base_model.CollectRes[TR], error)
	CreateCompany(ctx context.Context, info *co_model.Company) (response TR, err error)
	UpdateCompany(ctx context.Context, info *co_model.Company) (response TR, err error)
	GetCompanyDetail(ctx context.Context, id int64) (response TR, err error)
	FilterUnionMainId(ctx context.Context, search *base_model.SearchParams) *base_model.SearchParams
}

type IConfig added in v0.3.0

type IConfig interface {
	GetConfig() *co_model.Config
}

type IEmployee

type IEmployee[TR co_model.IEmployeeRes] interface {
	GetEmployeeById(ctx context.Context, id int64) (response TR, err error)
	GetEmployeeByName(ctx context.Context, name string) (response TR, err error)
	HasEmployeeByName(ctx context.Context, name string, unionMainId int64, excludeIds ...int64) bool
	HasEmployeeByNo(ctx context.Context, no string, unionMainId int64, excludeIds ...int64) bool
	GetEmployeeBySession(ctx context.Context) (response TR, err error)
	QueryEmployeeList(ctx context.Context, search *base_model.SearchParams) (*base_model.CollectRes[TR], error)
	CreateEmployee(ctx context.Context, info *co_model.Employee) (response TR, err error)
	UpdateEmployee(ctx context.Context, info *co_model.Employee) (response TR, err error)
	DeleteEmployee(ctx context.Context, id int64) (bool, error)
	GetEmployeeDetailById(ctx context.Context, id int64) (response TR, err error)
	GetEmployeeListByRoleId(ctx context.Context, roleId int64) (*base_model.CollectRes[TR], error)
	GetEmployeeListByTeamId(ctx context.Context, teamId int64) (*base_model.CollectRes[TR], error)
}

type IFdAccount added in v0.1.112

type IFdAccount[TR co_model.IFdAccountRes] interface {
	CreateAccount(ctx context.Context, info co_model.FdAccountRegister) (response TR, err error)
	GetAccountById(ctx context.Context, id int64) (response TR, err error)
	UpdateAccountIsEnable(ctx context.Context, id int64, isEnabled int64) (bool, error)
	HasAccountByName(ctx context.Context, name string) (response TR, err error)
	UpdateAccountLimitState(ctx context.Context, id int64, limitState int64) (bool, error)
	QueryAccountListByUserId(ctx context.Context, userId int64) (*base_model.CollectRes[TR], error)
	UpdateAccountBalance(ctx context.Context, accountId int64, amount int64, version int, inOutType int) (int64, error)
	GetAccountByUnionUserIdAndCurrencyCode(ctx context.Context, unionUserId int64, currencyCode string) (response TR, err error)
}

type IFdAccountBill added in v0.1.112

type IFdAccountBill[TR co_model.IFdAccountBillRes] interface {
	InstallHook(filter co_hook.AccountBillHookFilter, hookFunc co_hook.AccountBillHookFunc)
	UnInstallHook(filter co_hook.AccountBillHookFilter)
	ClearAllHook()
	CreateAccountBill(ctx context.Context, info co_model.AccountBillRegister) (bool, error)
	GetAccountBillByAccountId(ctx context.Context, accountId int64, pagination *base_model.Pagination) (*base_model.CollectRes[TR], error)
}

type IFdBankCard added in v0.1.112

type IFdBankCard[TR co_model.IFdBankCardRes] interface {
	CreateBankCard(ctx context.Context, info co_model.BankCardRegister, user *sys_model.SysUser) (response TR, err error)
	GetBankCardById(ctx context.Context, id int64) (response TR, err error)
	GetBankCardByCardNumber(ctx context.Context, cardNumber string) (response TR, err error)
	UpdateBankCardState(ctx context.Context, bankCardId int64, state int) (bool, error)
	DeleteBankCardById(ctx context.Context, bankCardId int64) (bool, error)
	QueryBankCardListByUserId(ctx context.Context, userId int64) (*base_model.CollectRes[TR], error)
}

type IFdCurrency added in v0.1.112

type IFdCurrency[TR co_model.IFdCurrencyRes] interface {
	GetCurrencyByCurrencyCode(ctx context.Context, currencyCode string) (response TR, err error)
	GetCurrencyByCnName(ctx context.Context, cnName string) (response TR, err error)
}

type IFdInvoice added in v0.1.112

type IFdInvoice[TR co_model.IFdInvoiceRes] interface {
	CreateInvoice(ctx context.Context, info co_model.FdInvoiceRegister) (response TR, err error)
	GetInvoiceById(ctx context.Context, id int64) (response TR, err error)
	QueryInvoiceList(ctx context.Context, info *base_model.SearchParams, userId int64) (*base_model.CollectRes[TR], error)
	DeletesFdInvoiceById(ctx context.Context, invoiceId int64) (bool, error)
	GetFdInvoiceByTaxId(ctx context.Context, taxId string) (response TR, err error)
}

type IFdInvoiceDetail added in v0.1.112

type IFdInvoiceDetail[TR co_model.IFdInvoiceDetailRes] interface {
	CreateInvoiceDetail(ctx context.Context, info co_model.FdInvoiceDetailRegister) (response TR, err error)
	GetInvoiceDetailById(ctx context.Context, id int64) (response TR, err error)
	MakeInvoiceDetail(ctx context.Context, invoiceDetailId int64, makeInvoiceDetail co_model.FdMakeInvoiceDetail) (res bool, err error)
	AuditInvoiceDetail(ctx context.Context, invoiceDetailId int64, auditInfo co_model.FdInvoiceAuditInfo) (bool, error)
	QueryInvoiceDetailListByInvoiceId(ctx context.Context, invoiceId int64) (*base_model.CollectRes[TR], error)
	DeleteInvoiceDetail(ctx context.Context, id int64) (bool, error)
	QueryInvoiceDetail(ctx context.Context, info *base_model.SearchParams, userId int64, unionMainId int64) (*base_model.CollectRes[TR], error)
}

type IModules

type IModules[
	ITCompanyRes co_model.ICompanyRes,
	ITEmployeeRes co_model.IEmployeeRes,
	ITTeamRes co_model.ITeamRes,
	ITFdAccountRes co_model.IFdAccountRes,
	ITFdAccountBillRes co_model.IFdAccountBillRes,
	ITFdBankCardRes co_model.IFdBankCardRes,
	ITFdCurrencyRes co_model.IFdCurrencyRes,
	ITFdInvoiceRes co_model.IFdInvoiceRes,
	ITFdInvoiceDetailRes co_model.IFdInvoiceDetailRes,
] interface {
	IConfig
	Company() ICompany[ITCompanyRes]
	Team() ITeam[ITTeamRes]
	Employee() IEmployee[ITEmployeeRes]
	My() IMy
	Account() IFdAccount[ITFdAccountRes]
	AccountBill() IFdAccountBill[ITFdAccountBillRes]
	BankCard() IFdBankCard[ITFdBankCardRes]
	Currency() IFdCurrency[ITFdCurrencyRes]
	Invoice() IFdInvoice[ITFdInvoiceRes]
	InvoiceDetail() IFdInvoiceDetail[ITFdInvoiceDetailRes]

	SetI18n(i18n *gi18n.Manager) error
	T(ctx context.Context, content string) string
	Tf(ctx context.Context, format string, values ...interface{}) string
	Dao() *co_dao.XDao
}

type IMy

type IMy interface {
	GetProfile(ctx context.Context) (*co_model.MyProfileRes, error)
	GetCompany(ctx context.Context) (*co_model.MyCompanyRes, error)
	GetTeams(ctx context.Context) (res co_model.MyTeamListRes, err error)
	SetMyMobile(ctx context.Context, newMobile int64, captcha string, password string) (bool, error)
	SetMyAvatar(ctx context.Context, imageId int64) (bool, error)
}

type ITeam

type ITeam[TR co_model.ITeamRes] interface {
	GetTeamById(ctx context.Context, id int64) (TR, error)
	GetTeamByName(ctx context.Context, name string) (TR, error)
	HasTeamByName(ctx context.Context, name string, unionMainId int64, excludeIds ...int64) bool
	QueryTeamList(ctx context.Context, search *base_model.SearchParams) (*base_model.CollectRes[TR], error)
	QueryTeamMemberList(ctx context.Context, search *base_model.SearchParams) (*base_model.CollectRes[*co_model.TeamMemberRes], error)
	CreateTeam(ctx context.Context, info *co_model.Team) (TR, error)
	UpdateTeam(ctx context.Context, id int64, name string, remark string) (TR, error)
	QueryTeamListByEmployee(ctx context.Context, employeeId int64, unionMainId int64) (*base_model.CollectRes[TR], error)
	SetTeamMember(ctx context.Context, teamId int64, employeeIds []int64) (api_v1.BoolRes, error)
	SetTeamOwner(ctx context.Context, teamId int64, employeeId int64) (api_v1.BoolRes, error)
	SetTeamCaptain(ctx context.Context, teamId int64, employeeId int64) (api_v1.BoolRes, error)
	DeleteTeam(ctx context.Context, teamId int64) (api_v1.BoolRes, error)
	DeleteTeamMemberByEmployee(ctx context.Context, employeeId int64) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL