1use alloy_primitives::{Address, TxHash};
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Clone, Serialize, Deserialize)]
6pub struct GroupRow {
7 pub block_number: u64,
8 pub timestamp: u64,
9 pub transaction_index: u32,
10 pub log_index: u32,
11 pub transaction_hash: TxHash,
12 pub group: Address,
13 #[serde(rename = "type")]
14 pub group_type: String,
15 pub owner: Address,
16 pub mint_policy: Option<Address>,
17 pub mint_handler: Option<Address>,
18 pub treasury: Option<Address>,
19 pub service: Option<Address>,
20 pub fee_collection: Option<Address>,
21 pub member_count: Option<u32>,
22 pub name: Option<String>,
23 pub symbol: Option<String>,
24 pub cid_v0_digest: Option<String>,
25 pub erc20_wrapper_demurraged: Option<Address>,
26 pub erc20_wrapper_static: Option<Address>,
27}
28
29#[derive(Debug, Clone, Serialize, Deserialize)]
31pub struct GroupMembershipRow {
32 pub block_number: u64,
33 pub timestamp: u64,
34 pub transaction_index: u32,
35 pub log_index: u32,
36 pub transaction_hash: TxHash,
37 pub group: Address,
38 pub member: Address,
39 pub expiry_time: u64,
40}
41
42#[derive(Debug, Clone, Default, Serialize, Deserialize)]
44pub struct GroupQueryParams {
45 pub name_starts_with: Option<String>,
46 pub symbol_starts_with: Option<String>,
47 pub group_address_in: Option<Vec<Address>>,
48 pub group_type_in: Option<Vec<String>>,
49 pub owner_in: Option<Vec<Address>>,
50 pub mint_handler_equals: Option<Address>,
51 pub treasury_equals: Option<Address>,
52}