Stores and manages collections of post addresses associated with an entity.
use sui::table;
Posts
Post
public struct Posts has store
Show Fields
posts: sui::table::Table<u64, address>
add
public fun add(posts: &mut Posts, post_timestamp: u64, post_address: address)
Show Implementation
public fun add( posts: &mut Posts, post_timestamp: u64, post_address: address ) { posts.posts.add( post_timestamp, post_address ); }
create
public fun create(ctx: &mut TxContext): Posts
public fun create( ctx: &mut TxContext ): Posts { Posts { posts: table::new(ctx) } }
get_length
public fun get_length(posts: &Posts): u64
public fun get_length( posts: &Posts ): u64 { posts.posts.length() }
has_record
public fun has_record(posts: &Posts, post_timestamp: u64): bool
public fun has_record( posts: &Posts, post_timestamp: u64 ): bool { posts.posts.contains(post_timestamp) }