Here is my code:
#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)]
#[scale_info(skip_type_params(T))]
pub struct PayInstallmentOrder<Account, Balance, Time> {
pub creator: Account,
pub created_at: Time,
pub periods_left: u8,
pub paid: Balance,
pub nft_id: [u8; 16],
}
#[pallet::config]
pub trait Config: frame_system::Config {
/// Because this pallet emits events, it depends on the runtime's definition of an event.
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
type Currency: ReservableCurrency<Self::AccountId> + Currency<Self::AccountId>;
type NFTRandomness: Randomness<Self::Hash, Self::BlockNumber>;
type WeightInfo: WeightInfo;
/// Deposit required for per byte.
#[pallet::constant]
type DataDepositPerByte: Get<BalanceOf<Self>>;
type Moment: Parameter
+ Default
+ Scale<Self::BlockNumber, Output = Self::Moment>
+ Copy
+ MaxEncodedLen
+ StaticTypeInfo
+ MaybeSerializeDeserialize
+ Send;
type Timestamp: Time<Moment = Self::Moment>;
}
impl<T: Config> Pallet<T> {
pub fn get_installment_orders() -> Vec<PayInstallmentOrder<T::AccountId, BalanceOf<T>, T::Moment>> {
OrderByTokenId::<T>::iter_values().collect()
}
}
// then I do tightly coupling in another pallet to call get_installment_orders() and take the created_at field in orders
I have this error when I try to convert T::Moment to u64: in the other pallet