gpl_core/state/
profile.rs

1use anchor_lang::prelude::*;
2
3use strum_macros::{AsRefStr, EnumString};
4
5#[account]
6pub struct Profile {
7    // The user PDA that owns this profile
8    pub user: Pubkey,
9    // The namespace that this profile is in
10    pub namespace: Namespace,
11    // should there be metadata here?
12}
13
14impl Profile {
15    pub const LEN: usize = 8 + std::mem::size_of::<Self>();
16}
17
18#[derive(
19    AnchorSerialize, AnchorDeserialize, Clone, Copy, Debug, PartialEq, AsRefStr, EnumString,
20)]
21pub enum Namespace {
22    #[strum(ascii_case_insensitive)]
23    Professional,
24    #[strum(ascii_case_insensitive)]
25    Personal,
26    #[strum(ascii_case_insensitive)]
27    Gaming,
28    #[strum(ascii_case_insensitive)]
29    Degen,
30}