v0.1
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user