export const PLANTING_RESTRICTION_REPOSITORY = Symbol('IPlantingRestrictionRepository')

export interface PlantingRestrictionData {
  id: string
  restrictionType: string
  accountLimitDays: number | null
  accountLimitCount: number | null
  totalLimitDays: number | null
  totalLimitCount: number | null
  currentTotalCount: number
  startAt: Date
  endAt: Date
  isActive: boolean
  createdBy: string
  createdAt: Date
  updatedAt: Date
}

export interface IPlantingRestrictionRepository {
  save(restriction: PlantingRestrictionData): Promise<void>
  findActiveAccountRestriction(): Promise<PlantingRestrictionData | null>
  findActiveTotalRestriction(): Promise<PlantingRestrictionData | null>
  incrementTotalCount(restrictionId: string, count: number): Promise<void>
  findById(id: string): Promise<PlantingRestrictionData | null>
  findAll(): Promise<PlantingRestrictionData[]>
  delete(id: string): Promise<void>
}
