22 lines
935 B
Go
22 lines
935 B
Go
package repositories
|
|
|
|
import (
|
|
"context"
|
|
|
|
"tyapi-server/internal/domains/user/entities"
|
|
)
|
|
|
|
// ContractInfoRepository 合同信息仓储接口
|
|
type ContractInfoRepository interface {
|
|
// 基础CRUD操作
|
|
Save(ctx context.Context, contract *entities.ContractInfo) error
|
|
FindByID(ctx context.Context, contractID string) (*entities.ContractInfo, error)
|
|
Delete(ctx context.Context, contractID string) error
|
|
|
|
// 查询方法
|
|
FindByEnterpriseInfoID(ctx context.Context, enterpriseInfoID string) ([]*entities.ContractInfo, error)
|
|
FindByUserID(ctx context.Context, userID string) ([]*entities.ContractInfo, error)
|
|
FindByContractType(ctx context.Context, enterpriseInfoID string, contractType entities.ContractType) ([]*entities.ContractInfo, error)
|
|
ExistsByContractFileID(ctx context.Context, contractFileID string) (bool, error)
|
|
ExistsByContractFileIDExcludeID(ctx context.Context, contractFileID, excludeID string) (bool, error)
|
|
} |