export interface ItemCategory {
    id: number
    uuid: string
    code: string
    name: string
    is_asset_category: boolean
    description: string | null
    icon: string | null
    display_order: number
    is_active: boolean
    deactivated_at: string | null
    created_at: string
    updated_at: string
}

export interface Item {
    id: number
    uuid: string
    code: string
    name: string
    category_id: number
    branch_id: number | null
    category?: Pick<ItemCategory, 'id' | 'code' | 'name'>
    branch?: { id: number; code: string; name: string }
    unit: string | null
    brand: string | null
    model_number: string | null
    specification: string | null
    description: string | null
    min_stock: number
    gramasi: number | null
    satuan_gramasi: string | null
    is_asset: boolean
    is_active: boolean
    deactivated_at: string | null
    created_at: string
    updated_at: string
}

export type AssetCondition = 'GOOD' | 'FAIR' | 'DAMAGED' | 'DISPOSED'
export type AssetStatus = 'ACTIVE' | 'IN_MAINTENANCE' | 'RETIRED'

export interface Asset {
    id: number
    uuid: string
    asset_code: string
    item_id: number
    branch_id: number | null
    asset_group_id: number | null
    no_urut: number | null
    supplier_id: number | null
    item?: Pick<Item, 'id' | 'code' | 'name' | 'category_id'> & { category?: Pick<ItemCategory, 'id' | 'code' | 'name'> }
    supplier?: Pick<Supplier, 'id' | 'code' | 'name' | 'supplier_type'>
    branch?: { id: number; code: string; name: string }
    asset_group?: { id: number; code: string; name: string }
    serial_number: string | null
    purchase_date: string | null
    purchase_price: string | null
    vendor: string | null
    location: string | null
    condition: AssetCondition
    status: AssetStatus
    warranty_expiry: string | null
    last_calibration_date: string | null
    next_calibration_date: string | null
    notes: string | null
    is_active: boolean
    deactivated_at: string | null
    created_at: string
    updated_at: string
}

export type SupplierType = 'REGULAR' | 'LAB_SUBKON' | 'KALIBRASI' | 'SERVICE'

export interface Supplier {
    id: number
    uuid: string
    code: string
    name: string
    supplier_type: SupplierType
    contact_person: string | null
    phone: string | null
    email: string | null
    address: string | null
    notes: string | null
    is_active: boolean
    deactivated_at: string | null
    created_at: string
    updated_at: string
}

export interface SelectOption {
    value: string | number
    label: string
}

export interface Customer {
    id: number
    uuid: string
    customer_code: string | null
    company_name: string
    company_type: string | null
    legacy_id: number | null
    legacy_kode_nomor: string | null
    lead_prospect_customer_id: number | null
    group_customer_id: number | null
    group_sampling_customer_id: number | null
    business_scale: string | null
    business_unit: string | null
    is_proper: boolean
    company_address: string | null
    document_delivery_address: string | null
    province_id: number | null
    city_id: number | null
    district_id: number | null
    office_phone: string | null
    npwp: string | null
    nama_sesuai_npwp: string | null
    alamat_sesuai_npwp: string | null
    cp_nama: string | null
    cp_telp: string | null
    cp_email: string | null
    cp_nama_keuangan: string | null
    cp_telp_keuangan: string | null
    cp_email_keuangan: string | null
    product: string | null
    area: string | null
    company_note: string | null
    accurate_id: string | null
    accurate_code: string | null
    virtual_account_code: string | null
    virtual_account_bank_id: number | null
    is_verified: boolean
    verified_at: string | null
    is_active: boolean
    deactivated_at: string | null
    created_at: string
    updated_at: string
}