use linkme::distributed_slice;
use site_log::{HookLi, HookSlice, SiteLog};

use crate::{Domain, SiteAdmin, SiteOwner};

#[distributed_slice]
pub static DOMAIN: HookLi<Domain>;

impl SiteLog for Domain {
  const TYPE_ID: u64 = 33;
  const HOOK: HookSlice<Self> = &DOMAIN;
}

#[distributed_slice]
pub static SITE_ADMIN: HookLi<SiteAdmin>;

impl SiteLog for SiteAdmin {
  const TYPE_ID: u64 = 34;
  const HOOK: HookSlice<Self> = &SITE_ADMIN;
}

#[distributed_slice]
pub static SITE_OWNER: HookLi<SiteOwner>;

impl SiteLog for SiteOwner {
  const TYPE_ID: u64 = 35;
  const HOOK: HookSlice<Self> = &SITE_OWNER;
}
