You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
597 B
33 lines
597 B
//
|
|
// MonthData.swift
|
|
// PadelClub
|
|
//
|
|
// Created by Razmig Sarkissian on 18/04/2024.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
import LeStorage
|
|
|
|
@Observable
|
|
final public class MonthData: BaseMonthData {
|
|
|
|
public init(monthKey: String) {
|
|
super.init()
|
|
self.monthKey = monthKey
|
|
self.creationDate = Date()
|
|
}
|
|
|
|
required init(from decoder: Decoder) throws {
|
|
try super.init(from: decoder)
|
|
}
|
|
|
|
required public init() {
|
|
super.init()
|
|
}
|
|
|
|
public func total() -> Int {
|
|
return (maleCount ?? 0) + (femaleCount ?? 0)
|
|
}
|
|
|
|
}
|
|
|